/* ===========================
   Root Variables & Reset
   =========================== */
:root {
    --bg-base: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --border-light: #262626;
    --border-normal: #404040;
    --primary: #ffffff;
    --primary-hover: #e5e5e5;
    --primary-light: #262626;
    --success: #22c55e;
    --success-light: #14532d;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 80px 20px 60px;
    text-align: center;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-normal);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.badge:hover {
    background: var(--bg-secondary);
    border-color: var(--border-normal);
    transform: translateY(-2px);
}

.badge svg {
    flex-shrink: 0;
}

/* ===========================
   App Wrapper
   =========================== */
.app-wrapper {
    margin: -40px auto 60px;
    max-width: 900px;
}

/* ===========================
   Steps Indicator
   =========================== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--text-primary);
    color: var(--bg-base);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

.step-line {
    width: 80px;
    height: 2px;
    background: var(--border-light);
    margin: 0 12px;
}

/* ===========================
   Card Styles
   =========================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    animation: fadeInUp 0.4s ease-out;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

/* ===========================
   Upload Zone
   =========================== */
.upload-zone {
    border: 2px dashed var(--border-normal);
    border-radius: var(--radius-md);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.upload-zone:hover {
    border-color: var(--text-primary);
    background: var(--bg-card);
}

.upload-zone svg {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.upload-zone h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.file-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ===========================
   Layout Grid
   =========================== */
.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.layout-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.layout-card:hover {
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.layout-card.selected {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.layout-preview {
    margin-bottom: 16px;
}

.grid-preview {
    display: grid;
    gap: 4px;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.grid-preview::before {
    content: '';
    display: block;
    background: var(--text-primary);
    border-radius: 4px;
}

.grid-3x3 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.grid-3x3::before,
.grid-3x3::after {
    grid-column: span 1;
}

.grid-3x2 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.grid-2x1 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
}

.layout-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.layout-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.badge-small {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.badge-small.recommended {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

/* ===========================
   Settings
   =========================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-group select,
.setting-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--text-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.info-box svg {
    color: var(--text-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box strong {
    color: var(--text-primary);
}

/* ===========================
   Buttons
   =========================== */
.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-normal);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
}

.btn-download {
    background: var(--text-primary);
    color: var(--bg-base);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   Progress & Results
   =========================== */
.progress-container {
    padding: 40px 0;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 50px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-card {
    text-align: center;
    padding: 40px 0;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: scaleIn 0.5s ease-out;
    color: var(--text-primary);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.printing-guide {
    text-align: left;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-top: 32px;
}

.printing-guide h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.printing-guide ol {
    margin-left: 20px;
}

.printing-guide li {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.printing-guide strong {
    color: var(--text-primary);
}

/* ===========================
   Footer
   =========================== */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-light);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .trust-badges {
        flex-direction: column;
        align-items: stretch;
    }

    .steps {
        flex-wrap: wrap;
        padding: 16px;
    }

    .step-line {
        width: 40px;
    }

    .card {
        padding: 24px;
    }

    .card-footer {
        flex-direction: column;
    }

    .layout-grid {
        grid-template-columns: 1fr 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}
