:root {
    /* LEFT SIDE: Cream White Theme */
    --left-bg: #FAF9F6;
    --left-text: #0F172A;
    --left-panel: #FFFFFF;
    --left-border: #E2E8F0;

    /* RIGHT SIDE: Dark Blue Theme */
    --right-bg: #0F172A;
    --right-text: #F8FAFC;
    --right-panel: #1E293B;
    --right-border: #334155;

    /* Accents */
    --accent-cyan: #00f0ff;
    --accent-blue: #3b82f6;
    --success: #10b981;
    --terminal-bg: #050508;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================================
   THE MAGIC 50/50 GRID SPLIT
   ========================================================= */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-color: var(--right-bg); /* Base background */
    display: grid;
    grid-template-columns: 50vw 50vw; /* Exact 50/50 Split */
    grid-template-rows: auto auto auto auto auto auto auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--right-bg); }
::-webkit-scrollbar-thumb { background: var(--right-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* Sticky Navigation - Spans both sides */
.sticky-nav {
    grid-column: 1 / 3;
    grid-row: 1;
    position: sticky;
    top: 0;
    background: var(--right-bg);
    border-bottom: 1px solid var(--right-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    z-index: 1000;
}
.nav-logo { font-size: 1.5rem; font-weight: 700; color: #fff; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: #94A3B8; text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-cyan); }


/* =========================================================
   LEFT SIDE: COMMAND CENTER (FROZEN IN PLACE)
   ========================================================= */
#hero-section {
    grid-column: 1 / 2;
    grid-row: 2 / 7; /* Spans all the way down next to the results */
    background-color: var(--left-bg);
    color: var(--left-text);
    border-right: 1px solid var(--left-border);
    position: sticky;
    top: 60px; /* Sits exactly under the nav bar */
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 20px 40px;
}

.top-panel { display: flex; gap: 20px; margin-bottom: 20px; height: 350px; }

/* Left Side Panels & Cards */
#hero-section .panel,
#hero-section .agent-card {
    background: var(--left-panel);
    border: 1px solid var(--left-border);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

/* Voice Module */
.voice-module { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding: 25px;}
.voice-module::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); border-radius: 12px 12px 0 0;}
.voice-module h2 { color: var(--left-text); margin-bottom: 10px; font-size: 1.5rem; }
.status-text { color: #64748B; margin-top: 15px; font-size: 0.85rem; }

/* Audio Visualizer */
.voice-visualizer { display: flex; align-items: center; justify-content: center; gap: 5px; height: 60px; margin-bottom: 30px; opacity: 0.2; }
.voice-visualizer.active { opacity: 1; }
.voice-visualizer .bar { width: 6px; height: 10px; background: var(--accent-blue); border-radius: 4px; }
.voice-visualizer.active .bar { animation: sound 1s infinite alternate ease-in-out; }
.voice-visualizer .bar:nth-child(1) { animation-delay: 0.0s; }
.voice-visualizer .bar:nth-child(2) { animation-delay: 0.2s; }
.voice-visualizer .bar:nth-child(3) { animation-delay: 0.4s; }
.voice-visualizer .bar:nth-child(4) { animation-delay: 0.2s; }
.voice-visualizer .bar:nth-child(5) { animation-delay: 0.1s; }
@keyframes sound { 0% { height: 10px; } 100% { height: 50px; background: var(--accent-cyan); } }

/* Terminal Module (Stays dark for hacker contrast) */
.terminal-module { flex: 2; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.terminal-header { background: #1E293B; padding: 12px 20px; font-family: 'Fira Code', monospace; color: #F8FAFC; font-size: 0.9rem; border-radius: 12px 12px 0 0;}
.terminal-body { background: var(--terminal-bg); flex: 1; padding: 20px; overflow-y: auto; font-family: 'Fira Code', monospace; font-size: 0.9rem; border-radius: 0 0 12px 12px;}
.log-line { margin-bottom: 8px; }
.log-line.system { color: #94A3B8; }
.log-line.venue { color: #f59e0b; }
.log-line.negotiator { color: #3b82f6; }
.log-line.creative { color: #ec4899; }
.log-line.website { color: #8b5cf6; }
.log-line.promoter { color: var(--accent-cyan); }

/* Left Side Agent Grid */
.agents-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.agent-card { padding: 20px 10px; text-align: center; transition: all 0.3s; display: flex; flex-direction: column; align-items: center;}
.agent-card h3 { color: var(--left-text); font-size: 0.95rem; margin-bottom: 8px; }
.agent-state { color: #64748B; font-size: 0.8rem; margin-bottom: 15px; }
.agent-icon { font-size: 2rem; color: #CBD5E1; margin-bottom: 10px; transition: color 0.3s; }
.progress-bar { width: 100%; height: 4px; background: var(--left-border); border-radius: 2px; overflow: hidden; }
.progress-bar .fill { height: 100%; width: 0%; background: #94A3B8; transition: width 0.5s; }


/* =========================================================
   RIGHT SIDE: AGENT RESULTS (SCROLLABLE)
   ========================================================= */
.full-page-section:not(#hero-section) {
    background-color: var(--right-bg);
    color: var(--right-text);
    padding: 60px 40px;
    border-bottom: 1px solid var(--right-border);
}

#sec-venue { grid-column: 2 / 3; grid-row: 2; }
#sec-negotiator { grid-column: 2 / 3; grid-row: 3; }
#sec-creative { grid-column: 2 / 3; grid-row: 4; }
#sec-website { grid-column: 2 / 3; grid-row: 5; }
#sec-promoter { grid-column: 2 / 3; grid-row: 6; }

.section-container { width: 100%; max-width: 800px; margin: 0 auto; }
.section-title { font-size: 1.5rem; color: var(--right-text); margin-bottom: 25px; padding-bottom: 10px; border-bottom: 1px solid var(--right-border); }
.empty-state { color: #94A3B8; font-size: 1.1rem; font-style: italic; padding: 40px; text-align: center; border: 1px dashed var(--right-border); border-radius: 12px; }

/* Right Side Content Boxes */
.content-box, .venue-card, .google-ad-preview {
    background: var(--right-panel);
    border: 1px solid var(--right-border);
    border-radius: 12px;
    padding: 25px;
}

/* Venue Grid */
.venue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.venue-card h4 { color: #4facfe; margin-bottom: 10px; }
.venue-card p { color: #CBD5E1; font-size: 0.9rem; margin: 5px 0; }

/* Negotiator Chat */
.calling-signal { display: flex; align-items: center; gap: 15px; color: #10b981; font-weight: bold; }
.bars-container { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.bars-container .bar { width: 6px; background: #10b981; animation: signal 0.8s infinite alternate; }
.bars-container .bar:nth-child(1) { height: 30%; animation-delay: 0.1s; }
.bars-container .bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.bars-container .bar:nth-child(3) { height: 80%; animation-delay: 0.3s; }
.bars-container .bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }
@keyframes signal { from { opacity: 0.2; } to { opacity: 1; } }

.transcript-bubble { padding: 12px 18px; border-radius: 12px; margin-bottom: 12px; width: fit-content; max-width: 85%; }
.bubble-agent { background: #334155; color: #F8FAFC; border-bottom-left-radius: 2px; }
.bubble-you { background: #047857; color: #F8FAFC; border-bottom-right-radius: 2px; align-self: flex-end; margin-left: auto; }

/* Creative Media */
.creative-display { display: flex; gap: 20px; flex-wrap: wrap; }
.creative-item { flex: 1; min-width: 250px; background: #0B1120; border-radius: 8px; overflow: hidden; border: 1px solid var(--right-border); }
.creative-item img, .creative-item video { width: 100%; height: auto; display: block; }
.creative-label { padding: 12px; background: #1E293B; color: #F8FAFC; text-align: center; font-weight: 600; font-size: 0.9rem; border-bottom: 1px solid var(--right-border); }

/* Google Ads */
.ad-sponsored { font-size: 0.8rem; font-weight: bold; color: #F8FAFC; margin-bottom: 8px; }
.ad-url { color: #93C5FD; font-size: 0.9rem; margin-bottom: 4px; }
.ad-title { color: #60A5FA; font-size: 1.4rem; margin-bottom: 8px; text-decoration: underline; }
.ad-desc { color: #CBD5E1; font-size: 1rem; line-height: 1.4; }

/* Buttons */
.controls { display: flex; gap: 15px; margin-top: 20px;}
.btn { padding: 10px 20px; border-radius: 8px; border: none; font-weight: 600; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { background: var(--accent-blue); color: #fff; }
.btn.primary:hover { background: #2563EB; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.btn.secondary { background: #E2E8F0; color: #475569; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.site-link-btn { display: inline-block; padding: 12px 24px; background: var(--accent-blue); color: #fff; text-decoration: none; font-weight: 600; border-radius: 8px; transition: background 0.3s; }
.site-link-btn:hover { background: #2563EB; }


/* =========================================================
   AGENT HIGHLIGHT COLORS & ANIMATIONS
   ========================================================= */
#card-venue.active { border-color: #4facfe; transform: translateY(-5px); box-shadow: 0 10px 15px rgba(79, 172, 254, 0.1); }
#card-venue.active .agent-icon, #card-venue.completed .agent-icon { color: #4facfe; }
#card-venue.active .progress-bar .fill { width: 50%; background: #4facfe; animation: load 2s infinite; }
#card-venue.completed .progress-bar .fill { width: 100%; background: #4facfe; }

#card-negotiator.active { border-color: #10b981; transform: translateY(-5px); box-shadow: 0 10px 15px rgba(16, 185, 129, 0.1); }
#card-negotiator.active .agent-icon, #card-negotiator.completed .agent-icon { color: #10b981; }
#card-negotiator.active .progress-bar .fill { width: 50%; background: #10b981; animation: load 2s infinite; }
#card-negotiator.completed .progress-bar .fill { width: 100%; background: #10b981; }

#card-creative.active { border-color: #ec4899; transform: translateY(-5px); box-shadow: 0 10px 15px rgba(236, 72, 153, 0.1); }
#card-creative.active .agent-icon, #card-creative.completed .agent-icon { color: #ec4899; }
#card-creative.active .progress-bar .fill { width: 50%; background: #ec4899; animation: load 2s infinite; }
#card-creative.completed .progress-bar .fill { width: 100%; background: #ec4899; }

#card-website.active { border-color: #8b5cf6; transform: translateY(-5px); box-shadow: 0 10px 15px rgba(139, 92, 246, 0.1); }
#card-website.active .agent-icon, #card-website.completed .agent-icon { color: #8b5cf6; }
#card-website.active .progress-bar .fill { width: 50%; background: #8b5cf6; animation: load 2s infinite; }
#card-website.completed .progress-bar .fill { width: 100%; background: #8b5cf6; }

#card-promoter.active { border-color: #f59e0b; transform: translateY(-5px); box-shadow: 0 10px 15px rgba(245, 158, 11, 0.1); }
#card-promoter.active .agent-icon, #card-promoter.completed .agent-icon { color: #f59e0b; }
#card-promoter.active .progress-bar .fill { width: 50%; background: #f59e0b; animation: load 2s infinite; }
#card-promoter.completed .progress-bar .fill { width: 100%; background: #f59e0b; }

@keyframes load { 0% { width: 10%; } 50% { width: 80%; } 100% { width: 10%; } }

/* =========================================================
   FOOTER (Spans across both sides)
   ========================================================= */
.site-footer {
    grid-column: 1 / 3;
    grid-row: 7;
    background-color: var(--right-bg);
    border-top: 1px solid var(--right-border);
    padding: 40px 20px;
    text-align: center;
    color: var(--right-text);
}
.footer-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.footer-brand { font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; }
.footer-brand span { color: var(--accent-cyan); font-weight: 300; }
.footer-tagline { color: #94A3B8; font-size: 1rem; }
.footer-links { display: flex; gap: 25px; margin-top: 10px; }
.footer-links a { color: #94A3B8; text-decoration: none; transition: color 0.3s; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-cyan); }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--right-border); color: #64748B; font-size: 0.85rem; width: 100%; }

