/* ==========================================================================
   QRForge Studio - Modern High-Precision QR Generator Styles
   ========================================================================== */

:root {
    color-scheme: dark;
    --bg-page: #0a0f1d;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-subtle: #0f172a;
    --bg-hover: #334155;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --primary-hover: #2563eb;
    
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px var(--primary-glow);
}

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

/* Global Sleek Dark Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- App Header & Navigation --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    min-height: 64px;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-glow);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.brand-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    margin-left: 0.35rem;
}

/* --- Center Navigation Links --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

.nav-link svg {
    opacity: 0.75;
    transition: opacity 0.2s;
}

.nav-link:hover svg,
.nav-link.active svg {
    opacity: 1;
}

.nav-badge-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #10b981;
    color: #ffffff;
    line-height: 1.3;
}

/* --- Status Badges / Chips --- */
.nav-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    color: #10b981;
    font-size: 0.775rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    user-select: none;
}

.status-dot-green {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}

/* --- Navigation Actions --- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.48rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

/* --- Hero Intro Section --- */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
}

.hero h1 span {
    background: linear-gradient(135deg, #60a5fa, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
}

/* --- Main Studio Layout --- */
.studio-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
    gap: 2rem;
    align-items: start;
}

/* --- Left Column: Configuration Studio --- */
.config-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* --- Data Type Navigation Tabs --- */
.tabs-scroll-wrapper {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    -webkit-overflow-scrolling: touch;
}

.tabs-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge, Opera */
    width: 0;
    height: 0;
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    user-select: none;
}

.tab-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.tab-btn:hover svg {
    transform: scale(1.08);
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* --- Tab Panes (Content Inputs) --- */
.tab-content {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

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

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

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea {
    resize: vertical;
    min-height: 85px;
}

/* --- Accordions (Customization Sections) --- */
.accordion-list {
    display: flex;
    flex-direction: column;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.accordion-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 1.75rem 1.75rem;
    animation: fadeIn 0.25s ease-out;
}

.accordion-item.open .accordion-body {
    display: block;
}

/* --- Color Picker Fields --- */
.color-picker-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-picker-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.color-swatch-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch-btn:hover {
    transform: scale(1.08);
    border-color: var(--primary);
}

.color-swatch-indicator {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-sm) - 1px);
    display: block;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.35);
}

.color-hex-input {
    flex: 1;
    border: none !important;
    padding: 0.2rem 0 !important;
    background: transparent !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none !important;
    min-width: 0;
}

.color-picker-trigger-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.color-picker-trigger-btn:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.sr-color-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- Floating Visual Color Picker Popup --- */
.color-picker-popup {
    position: fixed;
    width: 260px;
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    padding: 12px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.15s ease-out;
    user-select: none;
}

.cp-saturation-area {
    position: relative;
    width: 100%;
    height: 135px;
    border-radius: var(--radius-sm);
    cursor: crosshair;
    overflow: hidden;
    background: red;
}

.cp-saturation-white {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.cp-saturation-black {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.cp-saturation-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cp-hue-slider {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
    cursor: pointer;
}

.cp-hue-handle {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-preview-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.5);
}

.cp-hex-badge {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    padding: 4px 8px;
    text-align: center;
    outline: none;
}

.cp-hex-badge:focus {
    border-color: var(--primary);
}

.cp-tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cp-tool-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.cp-presets {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-preset-chip {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.cp-preset-chip:hover {
    transform: scale(1.15);
    border-color: #ffffff;
}

/* --- Shape Selection Grids --- */
.shape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.shape-btn {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 5px;
    color: var(--text-secondary);
}

.shape-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.shape-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.shape-btn.selected {
    background: rgba(59, 130, 246, 0.12);
    border: 2px solid #0284c7;
    color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}

/* --- Logo Upload & Presets --- */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    background: var(--bg-card);
    transition: all 0.2s ease;
    position: relative;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.dropzone svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dropzone-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropzone-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.preset-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.preset-logo-btn {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
}

.preset-logo-btn svg {
    width: 24px;
    height: 24px;
}

.preset-logo-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.preset-logo-btn.selected {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(59, 130, 246, 0.15);
}

/* --- Preset Themes Grid --- */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.theme-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.7);
}

.theme-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: rgba(59, 130, 246, 0.12);
}

.theme-card.selected .theme-name {
    color: var(--primary);
}

.theme-preview-box {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.theme-swatch {
    width: 100%;
    height: 38px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.theme-name {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* --- Sliders --- */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-card);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
}

.slider-val-badge {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: monospace;
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    color: var(--primary);
}

/* --- Right Column: Preview & Export Sticky Panel --- */
.preview-column {
    position: sticky;
    top: 5.5rem;
}

.preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-canvas-wrapper {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    padding: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.preview-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: auto;
}

/* Contrast Warning Banner */
.warning-banner {
    width: 100%;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    color: #fbbf24;
    display: none;
    margin-bottom: 1rem;
    align-items: center;
    gap: 0.5rem;
}

/* Resolution Controller */
.resolution-panel {
    width: 100%;
    margin-bottom: 1.25rem;
}

.res-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.preview-actions-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.btn-generate-main {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-generate-main:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.48);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-generate-main:active {
    filter: brightness(0.95);
}

.btn-generate-main:disabled {
    opacity: 0.85;
    cursor: wait;
    transform: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-reset-main {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-reset-main:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.btn-reset-main:active {
    transform: scale(0.99);
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-anim {
    animation: spinIcon 0.7s linear infinite;
}

.preview-canvas-wrapper.updating {
    opacity: 0.6;
    transform: scale(0.985);
}

.auto-update-label {
    font-weight: 500;
}

.export-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.export-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.export-btn.copy {
    grid-column: span 2;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.export-btn.copy:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-tier-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.12rem 0.38rem;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: 0.25rem;
    line-height: 1;
}
.btn-tier-tag.dev {
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.45);
}
.btn-tier-tag.biz {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.45);
}

/* Feature Perks */
.preview-perks {
    width: 100%;
    margin-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.perk-item svg {
    width: 15px;
    height: 15px;
    color: var(--success);
    flex-shrink: 0;
}

/* --- Informational & SEO Sections --- */
.content-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.section-heading p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.step-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* FAQ Accordion */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.faq-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
}

.code-snippet {
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-x: auto;
    margin: 1rem 0;
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1100px) {
    .navbar {
        padding: 0.65rem 1.25rem;
    }

    .nav-links {
        gap: 0.2rem;
    }

    .nav-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.825rem;
    }
}

@media (max-width: 1024px) {
    .studio-container {
        grid-template-columns: 1fr;
    }
    
    .preview-column {
        position: static;
        order: -1; /* Place preview on top on smaller screens */
    }

    .preview-card {
        max-width: 480px;
        margin: 0 auto;
    }

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

@media (max-width: 900px) {
    .nav-status-chip {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        gap: 0.5rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-top: 0.4rem;
        padding-bottom: 0.2rem;
        border-top: 1px solid var(--border-color);
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .tabs-nav {
        flex-wrap: nowrap;
        min-width: max-content;
        padding: 8px 10px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }

    .studio-container {
        padding: 1rem 1rem 3rem;
    }
}
