:root {
    --bg: #030712;
    --panel: rgba(17, 24, 39, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.15);
    --secondary: #818cf8;
    --success: #34d399;
    --error: #fb7185;
    --warning: #fbbf24;
    --font-heading: 'Outfit', sans-serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-full: 9999px;

    /* Glow & Shadow Effects */
    --shadow-glow: 0 0 40px -10px rgba(56, 189, 248, 0.15);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.3);

    --card-gradient: linear-gradient(180deg, rgba(31, 41, 55, 0.4) 0%, rgba(17, 24, 39, 0.4) 100%);
    --card-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);

    /* Micro-animations */
    --ease-squish: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes gradient-x {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--bg);
    /* Richer background with multiple glowing orbs */
    background-image:
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(52, 211, 153, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Animated background orbs */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.25) 0%, transparent 70%);
    top: 30%;
    right: -10%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, transparent 70%);
    bottom: 10%;
    left: 20%;
    animation-delay: -14s;
    animation-duration: 22s;
}

.bg-orb-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251, 113, 133, 0.15) 0%, transparent 70%);
    top: 60%;
    right: 30%;
    animation-delay: -5s;
    animation-duration: 28s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -40px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.wrap {
    max-width: 1050px;
    margin: 0 auto;
    padding: 60px 24px 100px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0 60px;
    position: relative;
    margin-bottom: 30px;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
}

.hero-content {
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px;
    color: var(--text);
    letter-spacing: -0.03em;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #a78bfa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-x 6s ease infinite;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 30px;
    max-width: 480px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: var(--text);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.1rem;
}

/* Code Window Preview */
.hero-visual {
    z-index: 1;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.code-window {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px -20px rgba(56, 189, 248, 0.2);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--panel-border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.code-body {
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow: hidden;
}

.code-body code {
    display: block;
    white-space: pre;
}

.code-tag { color: #f472b6; }
.code-string { color: #a5f3fc; }
.code-comment { color: #6b7280; font-style: italic; }

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-bottom: 20px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--panel-border), transparent);
}

.topbar-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Responsive Hero */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .code-window {
        transform: none;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

/* Topbar Components */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--panel-border);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pill:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(31, 41, 55, 0.8);
    transform: translateY(-1px);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 4px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn .lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-btn .lang-code {
    letter-spacing: 0.05em;
}

.lang-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.status-badge {
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.status-badge.error {
    color: var(--error);
    text-shadow: 0 0 10px rgba(251, 113, 133, 0.3);
}

.status-badge.success {
    color: var(--success);
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(5px);
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.tab[aria-selected="true"] {
    background: var(--primary-glow);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

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

.template-card {
    background: var(--card-gradient);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s var(--ease-squish);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.15);
}

.template-card.active {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, rgba(31, 41, 55, 0.4) 100%);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.template-icon {
    font-size: 36px;
    line-height: 1;
    display: block;
}

.template-content {
    flex: 1;
}

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

.template-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 32px;
    align-items: start;
}

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

/* Cards */
.card {
    background: var(--card-gradient);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.4s var(--ease-squish);
    position: relative;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.12);
}

.card h2 {
    margin: 0 0 24px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Forms */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 8px;
}

input,
textarea,
select {
    width: 100%;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--panel-border);
    color: var(--text);
    border-radius: 10px;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    outline: none;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.row input,
.row select {
    margin-bottom: 0;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(10, 10, 15, 0.9);
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Buttons */
.btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--panel-border);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    transition: all 0.2s var(--ease-squish);
    backdrop-filter: blur(4px);
}

button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    background-size: 200% 200%;
    animation: gradient-x 4s ease infinite;
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

button.primary:hover:not(:disabled) {
    background-position: 100% 0;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

button.danger {
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.2);
    background: rgba(251, 113, 133, 0.05);
}

button.danger:hover:not(:disabled) {
    background: rgba(251, 113, 133, 0.15);
    border-color: var(--error);
    box-shadow: 0 0 15px rgba(251, 113, 133, 0.2);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Output Area */
pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow: auto;
    background: #0b0f19;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
    max-height: 70vh;
    color: #cbd5e1;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
    tab-size: 2;
    /* Fancy subtle grid pattern inside code area */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

pre.empty {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

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

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.1);
}

/* Security Info Box */
.security-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 12px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.security-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.security-text {
    flex: 1;
}

.security-text strong {
    color: var(--success);
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.security-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Hints & Status */
.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hint::before {
    content: 'ⓘ';
    font-size: 10px;
    opacity: 0.7;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Progress Spinner */
.progress-container {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-container.hidden {
    display: none;
}

.generation-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--panel-border);
    transition: all 0.3s;
    position: relative;
}

.dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherited;
    opacity: 0.5;
    animation: pulse-glow 2s infinite;
}

.dot.good {
    background: var(--success);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.dot.bad {
    background: var(--error);
    box-shadow: 0 0 12px rgba(251, 113, 133, 0.6);
}

.dot.warn {
    background: var(--warning);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

.hidden {
    display: none !important;
}

/* Checkbox group for constraints */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: var(--text);
}

.checkbox-label:has(input:checked) {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--text);
}

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

.kvs {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 32px;
    font-size: 0.9rem;
}

.kvs .small {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}

/* Help Page Styles */
.help-card {
    max-width: 800px;
    margin: 0 auto;
}

.help-intro {
    color: var(--text-muted);
    margin: -8px 0 24px 0;
    font-size: 1rem;
}

.highlight-tip {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15)) !important;
    border: 1px solid rgba(168, 85, 247, 0.3);
    margin-top: 16px;
}

.highlight-tip .tip-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.help-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--panel-border);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0 0 12px 0;
    color: var(--text);
}

.help-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-option {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.help-option strong {
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.help-option ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.help-option li {
    margin-bottom: 6px;
}

.help-option a {
    color: var(--primary);
    text-decoration: underline;
}

.help-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-tip {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.help-tip strong {
    color: var(--text);
    display: block;
    margin-bottom: 4px;
}

.help-tip p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.help-steps-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.visual-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content strong {
    color: var(--text);
    display: block;
    margin-bottom: 4px;
}

.step-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin: 0;
    padding: 0 16px 16px 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.help-advanced {
    background: rgba(129, 140, 248, 0.08);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 8px;
}

.help-advanced h3 {
    margin-top: 0;
}

.help-advanced p {
    color: var(--text-muted);
    margin: 0 0 12px 0;
}

.help-advanced ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.help-advanced li {
    margin-bottom: 6px;
}

.help-advanced a {
    color: var(--secondary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
    border: 2px solid #0b0f19;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ===================== PREVIEW MODAL ===================== */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-modal {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 900px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px -20px rgba(56, 189, 248, 0.15);
    animation: scaleIn 0.25s var(--ease-squish);
}

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

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--panel-border);
}

.preview-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.preview-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.preview-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: scale(1.05);
}

.preview-close:hover {
    background: rgba(251, 113, 133, 0.2);
    color: var(--error);
}

.preview-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #ffffff;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Split-View Editor Modal */
.preview-modal-editor {
    max-width: 95vw;
    width: 1600px;
    height: 90vh;
    max-height: none;
}

.preview-split {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.preview-editor-pane {
    width: 50%;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    min-width: 300px;
}

.preview-iframe-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.preview-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--panel-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.editor-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--success);
    opacity: 0.8;
}

.preview-editor {
    flex: 1;
    width: 100%;
    padding: 16px;
    background: #0d1117;
    border: none;
    color: #c9d1d9;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    outline: none;
    tab-size: 2;
}

.preview-editor:focus {
    outline: none;
}

.preview-divider {
    width: 6px;
    background: var(--panel-border);
    cursor: col-resize;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.preview-divider:hover {
    background: var(--primary);
}

.preview-btn-save {
    width: auto;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--success), var(--primary));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 6px;
}

.preview-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.preview-btn-save.saved {
    background: var(--success);
}

.preview-btn-small {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preview-btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.preview-iframe-pane .preview-iframe {
    border-radius: 0;
}

/* Preview Main Container */
.preview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-main .preview-split {
    flex: 1;
    min-height: 0;
}

/* AI Chat Panel */
.preview-chat {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.3);
    height: 350px;
    min-height: 100px;
    max-height: 60vh;
    transition: height 0.3s ease;
}

.preview-chat-resizer {
    height: 6px;
    background: var(--panel-border);
    cursor: row-resize;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.preview-chat-resizer:hover {
    background: var(--primary);
}

.preview-chat.collapsed {
    height: 40px;
    min-height: 40px;
}

.preview-chat.collapsed .preview-chat-resizer {
    display: none;
}

.preview-chat.collapsed .preview-chat-messages,
.preview-chat.collapsed .preview-chat-input {
    display: none;
}

.preview-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--panel-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.preview-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.4;
}

.chat-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message-system {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-bottom-left-radius: 4px;
}

.preview-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.preview-chat-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.preview-chat-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.preview-chat-input input::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-right-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
    .preview-modal-editor {
        width: 100%;
        height: 100vh;
        max-width: 100vw;
        border-radius: 0;
    }

    .preview-split {
        flex-direction: column;
    }

    .preview-editor-pane {
        width: 100% !important;
        height: 40%;
        min-width: unset;
    }

    .preview-iframe-pane {
        height: 60%;
        min-width: unset;
    }

    .preview-divider {
        width: 100%;
        height: 6px;
        cursor: row-resize;
    }
}

/* Files Modal */
.files-modal {
    max-width: 900px;
}

.files-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.file-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--panel-border);
}

.file-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.file-content {
    margin: 0;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    background: transparent;
    border: none;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-file-btn {
    font-size: 0.9rem;
}

/* Project Tips Modal */
.project-tips-modal {
    max-width: 700px;
}

.project-tips-intro {
    padding: 16px 20px 0 20px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.project-tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    max-height: 400px;
    overflow-y: auto;
    flex: 1;
}

/* Synlig scrollbar for project-tips */
.project-tips-container::-webkit-scrollbar {
    width: 8px;
}

.project-tips-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.project-tips-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.project-tips-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.project-tip-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.project-tip-item:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.project-tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.project-tip-icon {
    font-size: 1.2rem;
}

.project-tip-name {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.project-tip-desc {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.project-tip-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.project-structure-example {
    padding: 16px 20px 20px 20px;
    border-top: 1px solid var(--panel-border);
}

.project-structure-example h4 {
    margin: 0 0 12px 0;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.structure-tree {
    margin: 0;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    max-width: 100%;
}

/* Project Files Generator - Enhanced Styles */
.project-tips-modal {
    max-width: 750px;
}

.project-tip-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-tip-item.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.project-tip-item.cannot-generate {
    opacity: 0.5;
    cursor: not-allowed;
}

.project-file-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.project-file-checkbox:disabled {
    cursor: not-allowed;
}

.project-tip-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
}

.project-tip-item.cannot-generate .project-tip-label {
    cursor: not-allowed;
}

.project-file-preview {
    margin: 8px 0 0 0;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 80px;
    max-width: 100%;
}

.project-tip-no-content {
    margin: 8px 0 0 0;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: #f87171;
}

.project-tips-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--panel-border);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.project-tips-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.project-tips-btn.primary {
    background: var(--primary);
    color: white;
}

.project-tips-btn.primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.project-tips-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.project-tips-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--panel-border);
}

.project-tips-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-muted);
}

/* ===================== TOOL CARDS GRID ===================== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tool-card:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tool-icon {
    font-size: 2rem;
}

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

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

/* ===================== TOOL MODAL ===================== */
.tool-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.tool-modal-overlay.hidden {
    display: none;
}

.tool-modal {
    width: 100%;
    max-width: 500px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px -20px rgba(56, 189, 248, 0.15);
    animation: scaleIn 0.25s var(--ease-squish);
}

.tool-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--panel-border);
}

.tool-modal-icon {
    font-size: 2rem;
}

.tool-modal-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.tool-modal-body {
    padding: 24px;
    color: var(--text-muted);
    line-height: 1.7;
}

.tool-modal-body p {
    margin: 0 0 16px 0;
}

.tool-modal-body p:last-child {
    margin-bottom: 0;
}

.tool-modal-body strong {
    color: var(--text);
}

.tool-modal-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.tool-modal-body li {
    margin-bottom: 8px;
}

.tool-modal-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--panel-border);
    text-align: center;
}

.tool-modal-link {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s;
}

.tool-modal-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

/* ===================== VALIDATION MODAL ===================== */
.validation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
    padding: 20px;
}

.validation-modal {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(145deg, var(--panel) 0%, rgba(30, 41, 59, 0.98) 100%);
    border-radius: 20px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: scaleIn 0.3s var(--ease-squish);
    overflow: hidden;
}

.validation-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.validation-modal-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 14px;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.validation-modal-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.validation-modal-header p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.validation-modal-body {
    padding: 24px 28px;
}

.validation-field-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.validation-field-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.validation-field-item.missing {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.06) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.validation-field-item.filled {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(22, 163, 74, 0.06) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.validation-field-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.validation-field-item.missing .validation-field-icon {
    background: rgba(239, 68, 68, 0.2);
}

.validation-field-item.filled .validation-field-icon {
    background: rgba(34, 197, 94, 0.2);
}

.validation-field-content {
    flex: 1;
    min-width: 0;
}

.validation-field-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-field-label .field-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.validation-field-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.validation-field-item.missing .validation-field-hint {
    color: rgba(252, 165, 165, 0.9);
}

.validation-field-item.filled .validation-field-hint {
    color: rgba(134, 239, 172, 0.9);
}

.validation-modal-footer {
    padding: 20px 28px 24px;
    display: flex;
    justify-content: center;
}

.validation-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.validation-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.4);
}

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

/* Shake animation for generate button when clicked with invalid form */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ===================== ABOUT PAGE ===================== */
.about-card {
    max-width: 700px;
    margin: 0 auto;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--panel-border);
}

.about-logo {
    flex-shrink: 0;
}

.logo-image {
    height: 70px;
    width: auto;
    max-width: 280px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 
        0 8px 32px rgba(56, 189, 248, 0.2),
        0 0 0 2px rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
}

.about-brand h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-tagline {
    margin: 8px 0 0 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.about-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.about-section p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--text);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.contact-item a {
    color: var(--primary);
    font-size: 0.9rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s;
}

.github-link:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.feature-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

.feature-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* How It Works */
.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.how-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(56, 189, 248, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.how-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.how-step p {
    margin: 0;
    color: var(--text-muted);
}

.how-step strong {
    color: var(--text);
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--panel-border);
    color: var(--text-muted);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list strong {
    color: var(--text);
}

.about-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
    text-align: center;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 20px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-logo-link:hover {
    transform: scale(1.05);
}

.footer-logo {
    width: 140px;
    height: auto;
    opacity: 0.9;
    border-radius: 20px;
}

.footer-logo-link:hover .footer-logo {
    opacity: 1;
}

.copyright {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.made-with {
    margin: 8px 0 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .about-header {
        flex-direction: column;
        text-align: center;
    }

    .about-brand h1 {
        font-size: 2rem;
    }

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

/* ============================================
   WIZARD COMPONENTS
   ============================================ */

/* Wizard Step Indicator */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step.completed {
    opacity: 1;
}

.wizard-step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

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

.wizard-step.completed .wizard-step-number::after {
    content: '✓';
    font-size: 1.4rem;
}

.wizard-step.completed .wizard-step-number span {
    display: none;
}

.wizard-step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s ease;
}

.wizard-step.active .wizard-step-label {
    color: var(--text);
}

.wizard-step.completed .wizard-step-label {
    color: var(--success);
}

.wizard-step-line {
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: var(--panel-border);
    margin: 0 16px;
    position: relative;
    top: -12px;
}

.wizard-step-line.completed {
    background: var(--success);
}

/* Wizard Panels */
.wizard-panel {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

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

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

/* Wizard Card */
.wizard-card {
    max-width: 800px;
    margin: 0 auto;
}

.wizard-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--panel-border);
}

.wizard-card-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.wizard-card-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
}

.wizard-card-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Wizard Actions */
.wizard-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
}

.wizard-next-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.wizard-next-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.wizard-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button state when required fields are not filled */
.wizard-next-btn.btn-needs-input {
    opacity: 0.7;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.wizard-next-btn.btn-needs-input:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

/* ============================================
   STEP 1: API CONFIGURATION
   ============================================ */

/* Provider Buttons */
.api-providers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.provider-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--panel-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.provider-btn.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.provider-icon {
    font-size: 2rem;
}

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

.provider-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.provider-badge.free {
    background: rgba(52, 211, 153, 0.2);
    color: var(--success);
}

/* Provider Instructions */
.provider-instructions {
    margin-bottom: 24px;
}

.provider-instruction {
    display: none;
    padding: 20px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    animation: fadeIn 0.3s ease;
}

.provider-instruction.active {
    display: block;
}

.provider-instruction h4 {
    margin: 0 0 16px 0;
    color: var(--primary);
    font-size: 1rem;
}

.provider-instruction ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.provider-instruction code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary);
}

/* API Input Group */
.api-input-group {
    margin-bottom: 20px;
}

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

.api-input-wrapper input {
    flex: 1;
    padding-right: 50px;
}

.input-icon-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 4px;
}

.input-icon-btn:hover {
    opacity: 1;
}

/* API Validation */
.api-validation {
    margin: 16px 0;
    min-height: 40px;
}

.validation-pending,
.validation-success,
.validation-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.validation-pending {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--warning);
}

.validation-success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--success);
}

.validation-error {
    background: rgba(251, 113, 133, 0.1);
    border: 1px solid rgba(251, 113, 133, 0.3);
    color: var(--error);
}

.validation-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: var(--warning);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.validation-icon {
    font-size: 1.2rem;
}

/* Security Warning Box */
.security-warning {
    margin: 20px 0;
    padding: 20px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 16px;
}

.warning-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.warning-content h4 {
    margin: 0 0 12px 0;
    color: var(--warning);
    font-size: 1rem;
    font-weight: 600;
}

.warning-content ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.warning-content li {
    margin: 8px 0;
    line-height: 1.5;
}

.warning-content strong {
    color: var(--text);
}

/* Advanced Settings */
.advanced-settings {
    margin: 24px 0;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}

.advanced-settings summary {
    padding: 14px 20px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
    list-style: none;
}

.advanced-settings summary::-webkit-details-marker {
    display: none;
}

.advanced-settings summary:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.advanced-settings[open] summary {
    border-bottom: 1px solid var(--panel-border);
}

.advanced-content {
    padding: 20px;
}

/* ============================================
   STEP 2: PROMPT BUILDER
   ============================================ */

.prompt-builder-card {
    max-width: 900px;
}

.prompt-builder {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.prompt-question {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.prompt-question:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.prompt-question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.prompt-question-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.prompt-question-header label {
    flex: 1;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.prompt-required {
    color: var(--error);
    font-weight: 700;
    font-size: 1.2rem;
}

.prompt-question input,
.prompt-question textarea {
    width: 100%;
    margin-top: 0;
}

.prompt-hint {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.prompt-hint strong {
    color: var(--warning);
}

/* Suggestion Chips */
.prompt-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.suggestion-chip {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Design Options Grid */
.design-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.design-option {
    cursor: pointer;
}

.design-option input {
    display: none;
}

.design-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--panel-border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.design-option:hover .design-option-content {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

.design-option input:checked + .design-option-content {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.design-icon {
    font-size: 1.8rem;
}

.design-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

.design-option input:checked + .design-option-content .design-name {
    color: var(--text);
}

/* AI Improve Section */
.ai-improve-section {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: var(--radius);
}

.ai-improve-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-improve-icon {
    font-size: 2rem;
}

.ai-improve-header > div {
    flex: 1;
}

.ai-improve-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text);
}

.ai-improve-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* AI Preview */
.ai-improve-preview {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.ai-preview-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ai-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ai-preview-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* AI Improve Button */
.ai-improve-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-improve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.ai-improve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* AI Preview Result */
.ai-preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.ai-preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

.ai-preview-actions button.small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Prompt Preview */
.prompt-preview {
    margin-top: 24px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.prompt-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--panel-border);
}

.prompt-preview-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.preview-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.toggle-arrow {
    transition: transform 0.2s ease;
}

.preview-toggle-btn.open .toggle-arrow {
    transform: rotate(180deg);
}

.prompt-preview-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.prompt-preview-content pre {
    margin: 0;
    white-space: pre-wrap;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-height: 300px;
    overflow-y: auto;
}

/* ============================================
   STEP 3: OUTPUT SECTION
   ============================================ */

.output-section {
    margin-top: 24px;
}

.output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.output-actions button {
    flex: 1;
    min-width: 120px;
}

/* ============================================
   REFINE/EDIT OUTPUT SECTION
   ============================================ */

.refine-section {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius);
}

.refine-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.refine-icon {
    font-size: 2rem;
}

.refine-header > div {
    flex: 1;
}

.refine-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text);
}

.refine-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.refine-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.refine-input-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.refine-input-group textarea:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.refine-input-group textarea::placeholder {
    color: var(--text-muted);
}

.refine-btn {
    align-self: flex-end;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--success), var(--primary));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refine-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.4);
}

.refine-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.refine-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.refine-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--success);
    border-right-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .wizard-steps {
        padding: 16px;
        gap: 0;
    }

    .wizard-step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .wizard-step-label {
        font-size: 0.75rem;
    }

    .wizard-step-line {
        max-width: 40px;
        margin: 0 8px;
    }

    .api-providers {
        grid-template-columns: 1fr;
    }

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

    .wizard-actions {
        flex-direction: column;
    }

    .wizard-actions button {
        width: 100%;
    }

    .wizard-card-header {
        flex-direction: column;
        text-align: center;
    }

    .wizard-card-icon {
        font-size: 3rem;
    }

    /* Project Tips - Mobil */
    .project-tips-modal {
        max-width: 100%;
        height: 95vh;
        margin: 10px;
    }

    .project-tips-container {
        grid-template-columns: 1fr;
        padding: 12px 16px;
        max-height: 50vh;
        overflow-y: auto;
        flex: 1;
    }

    .project-tip-item {
        padding: 12px;
    }

    .project-file-preview {
        font-size: 0.65rem;
        max-height: 60px;
    }

    .project-tips-actions {
        flex-direction: column;
        padding: 12px 16px;
    }

    .project-tips-btn {
        width: 100%;
        justify-content: center;
    }

    .project-tips-intro {
        padding: 12px 16px 0 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .design-options {
        grid-template-columns: 1fr;
    }

    .prompt-suggestions {
        justify-content: center;
    }

    /* Project Tips - Liten mobil */
    .project-tips-modal {
        margin: 5px;
        height: 98vh;
    }

    .project-tip-header {
        flex-wrap: wrap;
    }

    .project-tip-name {
        font-size: 0.85rem;
    }

    .project-tip-desc {
        font-size: 0.8rem;
    }

    .project-file-preview {
        font-size: 0.6rem;
        padding: 6px 8px;
    }

    .project-tips-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}