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

:root {
    --navy: #2d3561;
    --teal: #4ac0c2;
    --green: #6fcf3f;
    --light-teal: #e6f9fa;
    --light-green: #f0fff4;
    --gradient-start: #4ac0c2;
    --gradient-end: #6fcf3f;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: linear-gradient(
        135deg,
        var(--light-teal) 0%,
        var(--light-green) 100%
    );
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Experiment Sections */
.experiment-section {
    width: 100%;
    min-height: 100vh;
    transition: filter 0.5s ease-out;
}

/* Apply blur to content when loading */
body.loading .experiment-section,
body.loading .burger-menu {
    filter: blur(10px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition:
        opacity 0.5s ease-out,
        visibility 0.5s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: gentleFloat 3s ease-in-out infinite;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

@keyframes gentleFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.loading-logo {
    width: min(150px, 40vw);
    height: min(150px, 40vw);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(74, 192, 194, 0.3);
    margin-bottom: 2rem;
}

.loading-text {
    font-family: inherit;
}

.loading-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.loading-title::after {
    content: ".AI";
    color: var(--green);
}

.loading-subtitle {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-weight: 500;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.loading-status {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--gray-500);
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loading-progress-bar {
    width: min(250px, 80vw);
    height: 8px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--green);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    margin-top: 20px;
}

.loading-progress-fill {
    height: 100%;
    background: var(--green);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--green);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Error Overlay */
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.error-content {
    text-align: center;
    max-width: min(500px, 90vw);
    padding: 2rem;
    box-sizing: border-box;
}

.error-logo {
    width: min(120px, 30vw);
    height: min(120px, 30vw);
    border-radius: 24px;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.error-title {
    font-size: clamp(1.3rem, 4vw, 1.75rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.error-message ul {
    text-align: left;
    display: inline-block;
    margin-top: 1rem;
}

.error-message li {
    margin: 0.5rem 0;
}

/* Removed - handled by more specific selectors above */

/* Header */
.header {
    background: var(--white);
    padding: 1.25rem 2rem;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.5s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    width: min(50px, 12vw);
    height: min(50px, 12vw);
    border-radius: 12px;
    animation: gentleBounce 3s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.brand-name .ai {
    color: var(--green);
}

.tagline {
    color: var(--teal);
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    margin-top: -0.25rem;
}

/* Status Indicator */
.status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 2rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator[data-status="loading"] {
    background: var(--teal);
}

.status-indicator[data-status="ready"] {
    background: var(--green);
    animation: none;
}

.status-indicator[data-status="error"] {
    background: #ff6b6b;
    animation: none;
}

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

.status-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Main Container */
.main-container {
    max-width: 900px;
    margin: 2rem auto;
    flex: 1;
    padding: 0 clamp(0.5rem, 3vw, 1.5rem);
    animation: fadeIn 0.8s ease-out 0.3s both;
    width: 100%;
    box-sizing: border-box;
}

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

/* Welcome Section */
.welcome-section {
    background: var(--white);
    border-radius: 1.5rem;
    padding: clamp(1rem, 4vw, 2rem);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 2px solid transparent;
    background-image:
        linear-gradient(var(--white), var(--white)),
        linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: fadeIn 0.6s ease-out;
    box-sizing: border-box;
}

.welcome-title {
    color: var(--navy);
    font-size: clamp(1.3rem, 4vw, 1.75rem);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.welcome-text {
    color: var(--gray-600);
    text-align: center;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Chat Container */
.chat-container {
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    min-height: 500px;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-height: 450px;
    scroll-behavior: smooth;
}

.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Messages */
.message {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

.message.user {
    flex-direction: row-reverse;
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* User avatar removed - no longer needed */

.message-bubble {
    max-width: 70%;
    animation: bubblePop 0.3s ease-out;
}

@keyframes bubblePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    80% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.user .message-content {
    background: linear-gradient(
        135deg,
        var(--gradient-start),
        var(--gradient-end)
    );
    color: var(--white);
    border-bottom-right-radius: 0.25rem;
}

.message.ai .message-content {
    background: var(--light-teal);
    color: var(--navy);
    border-bottom-left-radius: 0.25rem;
}

/* Markdown styles for AI responses */
.message.ai .message-content h1,
.message.ai .message-content h2,
.message.ai .message-content h3,
.message.ai .message-content h4 {
    margin: 0.75rem 0 0.5rem 0;
    color: var(--navy);
    font-weight: 600;
}

.message.ai .message-content h1:first-child,
.message.ai .message-content h2:first-child,
.message.ai .message-content h3:first-child,
.message.ai .message-content h4:first-child {
    margin-top: 0;
}

.message.ai .message-content h1 {
    font-size: 1.3rem;
}
.message.ai .message-content h2 {
    font-size: 1.2rem;
}
.message.ai .message-content h3 {
    font-size: 1.1rem;
}
.message.ai .message-content h4 {
    font-size: 1rem;
}

.message.ai .message-content p {
    margin: 0.5rem 0;
}

.message.ai .message-content p:first-child {
    margin-top: 0;
}

.message.ai .message-content p:last-child {
    margin-bottom: 0;
}

.message.ai .message-content ul,
.message.ai .message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message.ai .message-content li {
    margin: 0.25rem 0;
}

.message.ai .message-content code {
    background: rgba(45, 53, 97, 0.08);
    padding: 0.15rem 0.3rem;
    border-radius: 0.25rem;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    color: var(--navy);
}

.message.ai .message-content pre {
    background: rgba(45, 53, 97, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    border: 1px solid rgba(45, 53, 97, 0.1);
}

.message.ai .message-content pre code {
    background: none;
    padding: 0;
}

.message.ai .message-content blockquote {
    border-left: 3px solid var(--teal);
    padding-left: 1rem;
    margin: 0.75rem 0;
    color: var(--gray-600);
    font-style: italic;
}

.message.ai .message-content strong {
    font-weight: 600;
    color: var(--navy);
}

.message.ai .message-content em {
    font-style: italic;
}

.message.ai .message-content a {
    color: var(--teal);
    text-decoration: underline;
}

.message.ai .message-content a:hover {
    color: var(--green);
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    align-items: center;
    gap: 0.75rem;
}

.typing-indicator.active {
    display: flex;
}

.typing-bubble {
    padding: 0.75rem 1rem;
    background: var(--light-teal);
    border-radius: 1.25rem;
    border-bottom-left-radius: 0.25rem;
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--teal);
    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% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Input Container */
.input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 2rem;
    font-size: 16px; /* Prevents iOS zoom */
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    background: var(--white);
}

.chat-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(74, 192, 194, 0.1);
}

.chat-input:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

.send-button {
    background: linear-gradient(
        135deg,
        var(--gradient-start),
        var(--gradient-end)
    );
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 192, 194, 0.3);
}

.send-button:active:not(:disabled) {
    transform: translateY(0);
}

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

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

/* Suggested Questions */
.suggested-questions {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.suggested-title {
    color: var(--navy);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chip {
    padding: 0.5rem 1rem;
    background: var(--light-teal);
    border: 2px solid transparent;
    border-radius: 2rem;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
}

.chip:hover {
    border-color: var(--green);
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.chip:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--navy);
    font-size: 0.9rem;
}

.heart {
    color: var(--green);
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Burger Menu and Navigation */
.burger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.burger-button {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.burger-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.burger-line {
    width: 24px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-button.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-button.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-button.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Panel */
.nav-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.nav-panel.active {
    right: 0;
}

.nav-header {
    padding: 30px 20px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-status {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-100);
    margin: 0 20px 20px;
    border-radius: 10px;
}

.nav-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
}

.nav-title .ai {
    color: var(--teal);
}

.nav-list {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: block;
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--navy);
}

.nav-item.active {
    background: var(--light-teal);
    color: var(--navy);
    border-left-color: var(--teal);
    font-weight: 500;
}

.nav-item-label {
    display: block;
    font-size: 14px;
}

.nav-item-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* MURD&D Styles */
#murdnd-container {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 20px;
}

.murdnd-terminal {
    background: #001e3c;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 0;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

.murdnd-status {
    position: sticky;
    top: 0;
    background: #00142a;
    color: #00ff88;
    padding: 10px 15px;
    border-bottom: 1px solid #0066cc;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    display: none;
}

.murdnd-output {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: #00ff88;
    font-size: 14px;
    line-height: 1.6;
}

.murdnd-line {
    margin: 0;
    padding: 2px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.murdnd-input-line {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #0066cc;
    background: #00142a;
}

.murdnd-prompt {
    color: #00ff88;
    margin-right: 8px;
    font-size: 14px;
}

.murdnd-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff88;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    outline: none;
    caret-color: #00ff88;
}

/* Custom scrollbar for terminal */
.murdnd-output::-webkit-scrollbar {
    width: 8px;
}

.murdnd-output::-webkit-scrollbar-track {
    background: #00142a;
}

.murdnd-output::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 4px;
}

.murdnd-output::-webkit-scrollbar-thumb:hover {
    background: #0088ff;
}

/* Notes Section Styles */
.notes-container {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.notes-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.notes-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--gray-200);
}

.notes-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
}

.notes-container h1 {
    font-size: 32px;
    color: var(--navy);
}

.notes-container .section {
    margin-bottom: 40px;
}

.notes-container h2 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.notes-container p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.warning-box {
    background: #fff5f5;
    border-left: 4px solid #feb2b2;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.warning-box p {
    color: #c53030;
    margin: 0;
}

.experiment-card {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.experiment-card:hover {
    background: var(--white);
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 192, 194, 0.2);
}

.experiment-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 10px;
}

.experiment-desc {
    color: var(--gray-500);
    font-size: 14px;
}

/* Gameshow Styles */
.gameshow-container {
    max-width: 900px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.game-screen {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.intro-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.intro-content h1 {
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 30px;
}

.intro-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.intro-warning {
    font-size: 16px;
    color: #e53e3e;
    font-style: italic;
    margin: 30px 0;
}

.gameshow-start-button {
    background: linear-gradient(135deg, var(--teal) 0%, var(--green) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.gameshow-start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 192, 194, 0.3);
}

.scenario-container {
    margin-bottom: 30px;
}

.scenario-title {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 20px;
}

.scenario-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.scenario-question {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}

.answer-container {
    margin-bottom: 30px;
}

.answer-container h3 {
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 15px;
}

.answer-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    resize: vertical;
    font-family: "Inter", sans-serif;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: var(--teal);
}

.char-counter {
    text-align: right;
    font-size: 14px;
    color: var(--dark-gray);
    margin-top: 5px;
    margin-bottom: 10px;
    font-family: 'SF Mono', Monaco, monospace;
}

.submit-button,
.next-button {
    background: var(--teal);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.submit-button:hover,
.next-button:hover {
    background: var(--green);
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

.judges-container {
    margin-bottom: 30px;
}

.judges-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.judge-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(74, 192, 194, 0.2);
}

.judges-header h3 {
    font-size: 20px;
    color: var(--navy);
    margin: 0;
}

.judges-panel {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.judge {
    flex: 1;
    text-align: center;
}

.judge-character {
    width: 100%;
    max-width: 150px;
    height: auto;
}

.judge-sign {
    transition: opacity 0.5s ease;
}

.judge-arm-left,
.judge-arm-right {
    transition: transform 0.5s ease;
    transform-origin: center;
}

.judge.voting .judge-arm-left {
    transform: rotate(-20deg);
    animation: wiggle 0.5s ease-in-out infinite;
}

.judge.voting .judge-arm-right {
    transform: rotate(20deg);
    animation: wiggle 0.5s ease-in-out infinite reverse;
}

@keyframes wiggle {
    0%,
    100% {
        transform: rotate(-20deg);
    }
    50% {
        transform: rotate(-10deg);
    }
}

.judge.voted .judge-sign {
    animation: raiseSign 0.5s ease;
}

@keyframes raiseSign {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.outcome-container {
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.outcome-container.success {
    background: #f0fdf4;
    border-color: #86efac;
}

.outcome-title {
    font-size: 24px;
    color: #c53030;
    margin-bottom: 15px;
}

.outcome-container.success .outcome-title {
    color: #16a34a;
}

.outcome-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-600);
}

.score-container {
    text-align: center;
    padding: 20px;
    background: var(--gray-100);
    border-radius: 10px;
}

.score-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
}

#gameshow-success-rate {
    color: var(--teal);
    font-size: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        box-sizing: border-box;
    }

    .brand-name {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    /* Hide tagline and heart on mobile */
    .tagline,
    .heart {
        display: none;
    }

    /* Shrink burger menu for mobile */
    .burger-menu {
        top: 10px;
        right: 10px;
    }

    .burger-button {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .burger-line {
        width: 20px;
        height: 2px;
    }

    .burger-button.active .burger-line:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .burger-button.active .burger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px);
    }

    .welcome-section {
        padding: 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .message-bubble {
        max-width: 85%;
    }

    .question-chips {
        gap: 0.5rem;
    }

    .chip {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .send-text {
        display: none;
    }

    .send-button {
        padding: 0.75rem 1rem;
    }

    /* Mobile viewport and container fixes */
    .main-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        height: calc(100vh - 80px);
        box-sizing: border-box;
    }

    .chat-container {
        height: 100%;
        min-height: unset;
    }

    /* Reduce input container padding and add safe areas */
    .input-container {
        padding: 0.75rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    .chat-input {
        padding: 0.5rem 1rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Make messages container properly scrollable */
    .messages {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    /* MURD&D Mobile Styles - iPhone Safe */
    #murdnd-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .murdnd-terminal {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        border-radius: 0;
        border: none;
        margin: 0;
        padding: 0;
        background: #001e3c;
    }

    .murdnd-status {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        flex-shrink: 0;
        padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        background: #00142a;
        border-bottom: 1px solid #0066cc;
        display: block !important;
        font-size: 12px;
        z-index: 100;
    }

    .murdnd-output {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 15px;
        padding-top: calc(env(safe-area-inset-top, 0px) + 45px); /* Account for fixed status bar */
        padding-bottom: 60px; /* Account for input line */
        font-size: 13px;
        line-height: 1.5;
        min-height: 0; /* Important for flex children */
    }

    .murdnd-input-line {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-shrink: 0;
        padding: 10px 15px;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        background: #00142a;
        border-top: 1px solid #0066cc;
        display: flex;
        align-items: center;
        z-index: 100;
    }

    .murdnd-input {
        font-size: 16px; /* Prevents zoom on iOS */
        width: 100%;
        flex: 1;
    }

    .murdnd-prompt {
        font-size: 13px;
        margin-right: 8px;
    }

    .murdnd-line {
        font-size: 13px;
    }

    /* Hide the nav when MURD&D is active on mobile */
    .experiment-active-murdnd .nav-panel {
        display: none;
    }
}

/* Versus Game Styles - Mobile First */
.versus-game {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.versus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}

.versus-header h1 {
    font-size: 24px;
    color: var(--navy);
    margin: 0;
}

.score-inline {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 14px;
}

.score-text {
    color: var(--navy);
    font-weight: 600;
}

.score-details {
    color: var(--gray-500);
    font-size: 12px;
}

.game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.scenario-compact {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

.scenario-number {
    font-size: 12px;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 5px;
}

.scenario-text {
    font-size: 14px;
    color: var(--navy);
    line-height: 1.3;
}

.battle-area {
    display: flex;
    flex-direction: column; /* Mobile first - vertical */
    gap: 10px;
    width: 100%;
}

.player-side,
.murd-side {
    width: 100%;
    min-height: auto;
    box-sizing: border-box;
}

.choice-summary {
    background: var(--light-teal);
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 8px 0;
}

.murd-label {
    color: var(--green);
}

.tools-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

.tool-cards-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-card-compact {
    background: var(--light-teal);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.tool-card-compact:hover {
    background: white;
    border-color: var(--teal);
}

.tool-card-compact:active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.strategy-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

#strategy-input {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    font-size: 16px; /* Prevents iOS zoom */
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#strategy-input:focus {
    outline: none;
    border-color: var(--teal);
}

.submit-btn-compact {
    background: linear-gradient(135deg, var(--teal), var(--green));
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    width: 100%;
}

.submit-btn-compact:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(74, 192, 194, 0.3);
}

.submit-btn-compact:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.murd-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

.murd-tool-option {
    background: var(--light-green) !important;
    border-color: var(--green) !important;
}

.murd-tool {
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 8px;
}

.murd-strategy {
    font-size: 13px;
    color: var(--gray-600);
    font-style: italic;
    line-height: 1.3;
    min-height: 40px; /* Reserve space for ~2 lines of text */
    display: block;
}

#murd-strategy-area {
    margin-top: 10px;
}

.judges-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

.judges-panel-compact {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    width: 100%;
}

.judges-panel-compact .judge {
    flex: 1;
    max-width: 60px;
}

.judges-panel-compact .judge-character {
    width: 100%;
    height: auto;
}

.judge-verdict {
    font-family: "Comic Sans MS", "Comic Sans", sans-serif !important;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.judging-text {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

.results-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100%;
}

.result-banner {
    font-size: 18px;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.result-banner.win {
    background: var(--light-green);
    color: var(--green);
}

.result-banner.lose {
    background: #fff5f5;
    color: #c53030;
}

.vote-count {
    font-size: 14px;
    color: var(--gray-600);
    margin-left: 5px;
}

.next-btn-compact {
    background: linear-gradient(135deg, var(--teal), var(--green));
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.next-btn-compact:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(74, 192, 194, 0.3);
}

/* Desktop responsive layout */
@media (min-width: 768px) {
    .versus-game {
        max-width: 900px;
        margin: 0 auto;
        padding: 20px;
    }

    .versus-header h1 {
        font-size: 32px;
    }

    .battle-area {
        flex-direction: row;
        gap: 20px;
    }

    .player-side,
    .murd-side {
        flex: 1;
        width: 50%;
        min-height: 200px;
    }

    .scenario-text {
        font-size: 16px;
    }

    .tool-cards-compact {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tool-card-compact {
        flex: 1;
        min-width: 150px;
    }

    .judges-panel-compact .judge {
        max-width: 120px;
    }
}

/* Pong Styles */
.pong-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 80vh;
}

.pong-header {
    text-align: center;
    margin-bottom: 20px;
}

.pong-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #4ac0c2 0%, #6fcf3f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pong-header p {
    color: #666;
    font-size: 1rem;
}

#pong-canvas {
    border: 3px solid #4ac0c2;
    background: #000;
    box-shadow: 0 0 30px rgba(74, 192, 194, 0.3);
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.pong-status {
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(111, 207, 63, 0.1);
    border: 2px solid #6fcf3f;
    border-radius: 5px;
    color: #6fcf3f;
    font-weight: bold;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}
