:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --gold: #f59e0b;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 40%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08), transparent 40%);
    min-height: 100vh;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header & Disclaimer */
header {
    text-align: center;
    margin-bottom: 3rem;
}

.disclaimer-bar {
    background: rgba(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    text-align: left;
}

.disclaimer-bar p {
    font-size: 0.95rem;
    color: var(--gold);
}

h1 {
    font-size: 3rem;
    font-weight: 850;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: #fff;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
}

.main-editor-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

@media (max-width: 1100px) {
    .main-editor-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-column {
        position: static;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Canvas Editor Area */
.canvas-container {
    position: relative;
    background: #020617;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    margin-bottom: 1.5rem;
}

#editor-canvas {
    max-width: 100%;
    max-height: 100%;
    cursor: grab;
}

#editor-canvas:active {
    cursor: grabbing;
}

/* Crop Overlay & Biometric Guide */
.crop-overlay {
    position: absolute;
    pointer-events: none;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
    z-index: 10;
}

.biometric-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.face-oval {
    position: absolute;
    top: 10%;
    left: 15%;
    width: 70%;
    height: 80%;
    border: 1px dashed white;
    border-radius: 50% 50% 45% 45%;
}

.eye-line, .chin-line {
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 1px dashed white;
}
.eye-line { top: 35%; }
.chin-line { bottom: 10%; }

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 20;
    width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.zoom-controls button {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-controls button:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

#zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #334155;
    border-radius: 2px;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Controls & Fields */
.control-group h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1.2rem;
}

.field {
    margin-bottom: 1.2rem;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

select, input[type="number"] {
    width: 100%;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
}

select:focus {
    border-color: var(--primary);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    background: #020617;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.segment {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.segment.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Preview Section */
.preview-canvas-wrapper {
    background: #020617;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

#preview-canvas {
    max-width: 100%;
    max-height: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: white;
}

button.primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    padding: 1.1rem;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

button.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding: 0.9rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.download-group {
    display: flex;
    flex-direction: column;
}

.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* Range Inputs */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #334155;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border: 3px solid #0f172a;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Redesigned Info Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-item {
    text-align: center;
}

.info-item h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.info-item p {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* Hero Steps Restoration */
#hero-demo {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.demo-steps {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.step h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.step p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.step-arrow {
    padding-top: 15px;
    font-size: 1.2rem;
    color: var(--text-dim);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .demo-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    .step-arrow {
        transform: rotate(90deg);
    }
}

/* Upload Zone Mini (Inside Canvas Container) */
.upload-zone-mini {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.01);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.upload-zone-mini:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
}

.upload-zone-mini .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-zone-mini p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-zone-mini .support-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-tip {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
    display: flex;
    gap: 0.5rem;
}

.format-tip .icon {
    font-size: 1rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Redesigned Info Section (Preserve existing) */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.separator {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2rem 0;
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.req-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: background 0.2s;
}

.req-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.req-card.full-width {
    grid-column: 1 / -1;
}

.accent-box {
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 4px 12px 12px 4px;
    margin-top: 2.5rem;
}

.accent-box p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.mb-4 { margin-bottom: 1rem; }

@media (max-width: 900px) {
    .req-grid {
        grid-template-columns: 1fr;
    }
}
