* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f1419;
    min-height: 100vh;
}

header {
    background: rgba(26, 32, 44, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    border-bottom: 1px solid #2d3748;
}

h1 {
    color: #e2e8f0;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

h1 .subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: #718096;
    background: linear-gradient(90deg, #667eea 0%, #9f7aea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
    background: #1a202c;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid #2d3748;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #9f7aea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 1.2rem;
    color: #a0aec0;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    color: #a0aec0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #667eea;
}

main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

#app-container {
    background: #1a202c;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 600px;
    border: 1px solid #2d3748;
}

.editor-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.controls-panel {
    background: #2d3748;
    padding: 1.5rem;
    border-radius: 10px;
    height: fit-content;
}

.controls-panel h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    background: #667eea;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 2rem;
    font-weight: 500;
}

.file-label:hover {
    background: #5a67d8;
}

.filters-section, .adjustments-section {
    margin-bottom: 2rem;
}

.filter-btn {
    display: block;
    width: 100%;
    background: #4a5568;
    color: #e2e8f0;
    border: none;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #667eea;
    transform: translateX(5px);
}

.adjustments-section label {
    display: block;
    color: #a0aec0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.adjustments-section input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
    background: #4a5568;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.adjustments-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    cursor: pointer;
    border-radius: 50%;
}

.adjustments-section input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.adjustments-section .value {
    float: right;
    color: #667eea;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    background: #4a5568;
    color: #e2e8f0;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.action-btn:hover {
    background: #718096;
}

.action-btn.primary {
    background: #48bb78;
    color: white;
}

.action-btn.primary:hover {
    background: #38a169;
}

.canvas-container {
    background: #2d3748;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

#imageCanvas {
    max-width: 100%;
    max-height: 600px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.placeholder {
    color: #718096;
    font-size: 1.2rem;
    text-align: center;
}

.ad-container {
    background: #1a202c;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #2d3748;
}

.features-section {
    background: #1a202c;
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid #2d3748;
}

.features-section h2 {
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature {
    background: #2d3748;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.feature p {
    color: #a0aec0;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #1a202c;
    border-top: 1px solid #2d3748;
    color: #718096;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    main {
        padding: 0 1rem;
    }

    .editor-container {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        order: 2;
    }

    .canvas-container {
        order: 1;
        min-height: 300px;
    }

    #app-container, .ad-container {
        padding: 1rem;
    }
}