:root[data-mode="pro"][data-theme="light"] {
    --bg: #FAFAF8;
    --bg-2: #F2F0EC;
    --text: #1A1A18;
    --text-2: #6B6B67;
    --accent: #FF1493;
    --border: rgba(0, 0, 0, 0.08);
    --card-bg: #FFFFFF;
    --card-shadow: rgba(0, 0, 0, 0.04);
}

:root[data-mode="pro"][data-theme="dark"] {
    --bg: #111110;
    --bg-2: #1C1C1A;
    --text: #F0EEE8;
    --text-2: #888880;
    --accent: #FF1493;
    --border: rgba(255, 255, 255, 0.08);
    --card-bg: #1C1C1A;
    --card-shadow: rgba(0, 0, 0, 0.3);
}

:root[data-mode="gremlin"][data-theme="light"] {
    --bg: linear-gradient(160deg, #FFD6E8 0%, #E8D0F5 40%, #C8E6FF 100%);
    --bg-2: rgba(255, 255, 255, 0.35);
    --text: #4A3560;
    --text-2: #5E4278;
    --accent: #F4A7C3;
    --card-bg: #FFFFFF;
    --border: rgba(138, 111, 174, 0.2);
    --card-shadow: rgba(100, 80, 150, 0.15);
}

:root[data-mode="gremlin"][data-theme="dark"] {
    --bg: linear-gradient(160deg, #2D1B33 0%, #1E1A3E 40%, #0D1F35 100%);
    --bg-2: rgba(255, 255, 255, 0.08);
    --text: #F0D6FF;
    --text-2: #C4A8E0;
    --accent: #F4A7C3;
    --card-bg: rgba(255, 255, 255, 0.12);
    --border: rgba(196, 168, 224, 0.2);
    --card-shadow: rgba(100, 80, 150, 0.3);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    transition: all 0.35s ease;
}

[data-mode="gremlin"] body {
    background-attachment: fixed;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

/* Animated gradient background for gremlin mode */
[data-mode="gremlin"][data-theme="dark"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #1a1625, #2a1f3d, #3d2f52, #1f1a2e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.6;
}

[data-mode="gremlin"][data-theme="light"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #fff5fc, #ffe6f7, #ffc9ed, #ffb3e6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.4;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-family: 'DM Mono', monospace;
}

.breadcrumb a {
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .separator {
    color: var(--text-2);
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--accent);
    font-weight: 600;
}

.demo-badge {
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: 'DM Mono', monospace;
}

/* Main content */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
    line-height: 1.1;
}

[data-mode="pro"] .hero h1 {
    font-weight: 900;
    text-transform: uppercase;
}

[data-mode="gremlin"] .hero h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--accent);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto;
}

/* Chat interface */
.chat-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--card-shadow);
}

[data-mode="pro"][data-theme="dark"] .chat-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

[data-mode="gremlin"] .chat-container {
    background: rgba(255, 107, 218, 0.08);
    backdrop-filter: blur(10px);
}

.chat-messages {
    padding: 24px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
}

.message.user .message-content {
    background: var(--accent);
    color: white;
}

.message.bot .message-content {
    background: var(--bg-2);
    color: var(--text);
}

.citation {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 8px;
    font-family: 'DM Mono', monospace;
    opacity: 0.8;
}

.citation-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}

/* Quick questions */
.quick-questions {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.quick-questions-label {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-bottom: 12px;
    font-family: 'DM Mono', monospace;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.quick-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Chat input */
.chat-input-container {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-2);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.chat-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.send-btn {
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

/* Demo note */
.demo-note {
    margin-top: 32px;
    padding: 16px;
    background: var(--bg-2);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

.demo-note strong {
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
    color: var(--text-2);
    font-size: 14px;
    font-family: 'DM Mono', monospace;
}

.footer p {
    margin-bottom: 12px;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    opacity: 0.8;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-2);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 5rem 1rem 2rem;
    }

    .top-nav {
        padding: 12px 16px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .demo-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .message {
        max-width: 90%;
    }

    .quick-buttons {
        flex-direction: column;
    }

    .quick-btn {
        width: 100%;
    }
}
