/* ==========================================================================
   QRCraft - Modern QR Code Generator Stylesheet
   ========================================================================== */

/* 1. Design Tokens & Themes */
:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-base: #0a0f1d;
    --bg-surface: rgba(18, 26, 47, 0.75);
    --bg-surface-hover: rgba(28, 38, 66, 0.85);
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-input: rgba(10, 15, 29, 0.6);
    --bg-chip: rgba(255, 255, 255, 0.06);
    --bg-chip-hover: rgba(255, 255, 255, 0.12);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: #6366f1;
    --border-card: rgba(255, 255, 255, 0.1);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --brand-primary: #6366f1;
    --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --brand-glow: rgba(99, 102, 241, 0.35);

    --emerald-primary: #10b981;
    --emerald-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --emerald-glow: rgba(16, 185, 129, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --glow-color-1: rgba(99, 102, 241, 0.15);
    --glow-color-2: rgba(217, 70, 239, 0.12);
}

[data-theme="light"] {
    --bg-base: #f4f6fc;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-surface-hover: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-input: #ffffff;
    --bg-chip: rgba(0, 0, 0, 0.05);
    --bg-chip-hover: rgba(0, 0, 0, 0.09);

    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-focus: #4f46e5;
    --border-card: rgba(0, 0, 0, 0.08);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --brand-glow: rgba(79, 70, 229, 0.2);
    --emerald-glow: rgba(16, 185, 129, 0.2);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.1);

    --glow-color-1: rgba(99, 102, 241, 0.08);
    --glow-color-2: rgba(217, 70, 239, 0.06);
}

/* 2. Global Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: 10%;
    background: var(--glow-color-1);
}

.glow-2 {
    width: 600px;
    height: 600px;
    bottom: 5%;
    right: 5%;
    background: var(--glow-color-2);
}

.app-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* 3. Header & Navigation */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--brand-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--brand-glow);
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.badge-subtle {
    background: var(--bg-chip);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-chip);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg-chip-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Theme Icon Visibility */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* 4. Hero Section */
.hero-section {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-chip);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--emerald-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 5. Main Generator Workspace Layout */
.generator-workspace {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 32px;
    align-items: stretch;
    margin-bottom: 60px;
}

/* Glassmorphism Cards */
.config-card, .preview-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.config-card:hover, .preview-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* 6. Tabs & Mode Switcher */
.type-tabs {
    display: flex;
    background: var(--bg-input);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.tab-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--brand-glow);
}

/* 7. Form Panels & Inputs */
.form-container {
    margin-bottom: 24px;
}

.type-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.type-panel.active {
    display: block;
}

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

.input-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.custom-input, .custom-textarea, .custom-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.custom-input.has-icon {
    padding-left: 42px;
    padding-right: 86px;
}

.custom-input:focus, .custom-textarea:focus, .custom-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--brand-glow);
    background: var(--bg-card);
}

.custom-textarea {
    resize: vertical;
    min-height: 95px;
}

.action-inside-btn {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-chip);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-inside-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: transparent;
}

/* Quick Tags */
.quick-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tag-pill {
    background: var(--bg-chip);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    background: var(--bg-chip-hover);
    color: var(--text-primary);
    border-color: var(--brand-primary);
}

/* Form Groups & Rows */
.form-group {
    margin-bottom: 14px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    margin-top: 4px;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 8. Customization Accordion */
.customize-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.customize-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
}

.customize-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chevron-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.customize-box.open .chevron-icon {
    transform: rotate(180deg);
}

.customize-body {
    display: none;
    padding: 0 18px 18px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.customize-box.open .customize-body {
    display: block;
    animation: fadeIn 0.25s ease;
}

.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.color-picker-item label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.color-input-wrapper input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
}

.color-hex-val {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Palette Swatches */
.palette-swatches {
    margin-top: 10px;
}

.swatch-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.swatches-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swatch-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.swatch-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 8.1 Logo & Branding Styles */
.upload-dropzone {
    width: 100%;
    padding: 18px 14px;
    background: var(--bg-card);
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.upload-dropzone:hover {
    border-color: var(--brand-primary);
    background: var(--bg-chip-hover);
    color: var(--brand-primary);
}

.upload-dropzone small {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 400;
}

.preset-icons-section {
    margin-top: 16px;
}

.preset-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.preset-icon-btn {
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-icon-btn:hover {
    background: var(--bg-chip-hover);
    color: var(--text-primary);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.preset-icon-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px var(--brand-glow);
}

.active-logo-controls {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    animation: fadeIn 0.25s ease;
}

.active-logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logo-preview-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-thumb {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-thumb img, .logo-thumb svg {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.logo-file-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-text-danger {
    background: none;
    border: none;
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.slider-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.slider-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--brand-primary);
    font-weight: 700;
}

.custom-range {
    width: 100%;
    accent-color: var(--brand-primary);
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
}

.input-hint {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.alert-hint {
    color: #f59e0b;
    font-weight: 500;
}

.custom-position-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}

/* 9. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--brand-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--brand-glow);
}

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

.btn-secondary {
    background: var(--bg-chip);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-chip-hover);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.btn-emerald {
    background: var(--emerald-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--emerald-glow);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--emerald-glow);
}

.btn-block {
    width: 100%;
    padding: 15px 24px;
    font-size: 1.05rem;
}

/* 10. Preview Card & QR Display */
.preview-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.preview-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-title h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.status-indicator.ready {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-indicator.generating {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.preview-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-chip);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.qr-canvas-container {
    flex: 1;
    min-height: 310px;
    background: var(--bg-input);
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.qr-canvas-container.has-qr {
    border-style: solid;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(15, 23, 42, 0.4);
}

/* Empty Placeholder */
.qr-empty-state {
    text-align: center;
    color: var(--text-muted);
}

.empty-icon-pulse {
    width: 80px;
    height: 80px;
    background: var(--bg-chip);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-muted);
}

.empty-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* QR Code Canvas Box */
#qrcode {
    padding: 12px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#qrcode canvas {
    border-radius: var(--radius-sm);
    display: block !important;
    max-width: 100%;
    height: auto;
}

#qrcode img {
    display: none !important;
}

@keyframes zoomFade {
    0% { transform: scale(0.88); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 11. Export Controls */
.export-controls {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.3s ease;
}

.action-btn-group {
    display: flex;
    gap: 12px;
}

.export-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.export-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pill-selector {
    display: flex;
    gap: 4px;
}

.pill-opt {
    cursor: pointer;
}

.pill-opt input[type="radio"] {
    display: none;
}

.pill-opt span {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.pill-opt input[type="radio"]:checked + span {
    background: var(--brand-primary);
    color: #ffffff;
}

.export-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    justify-content: center;
}

/* 12. Feature Highlights */
.features-section {
    margin-bottom: 60px;
}

.features-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 36px;
}

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

.feature-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 13. Footer */
.app-footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-repo-link {
    margin-top: 8px;
}

.app-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.app-footer a:hover {
    color: var(--brand-primary);
    transform: translateY(-1px);
}

/* 14. Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.3s ease 2.7s forwards;
}

.toast.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(6, 78, 59, 0.9);
}

.toast.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(127, 29, 29, 0.9);
}

.toast.toast-info {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(30, 27, 75, 0.9);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* 15. Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 16. Responsive Breakpoints */
@media (max-width: 900px) {
    .generator-workspace {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .config-card, .preview-card {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .app-wrapper {
        padding: 16px 14px 40px;
    }

    .app-header {
        padding: 10px 16px;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .type-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 40%;
    }

    .action-btn-group {
        flex-direction: column;
    }

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