:root {
    --color-bg: #F5F7FA;
    --color-surface: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-light: #64748B;
    --color-primary: #81C784;
    --color-primary-dark: #66BB6A;
    --color-secondary: #64B5F6;
    --color-error: #EF5350;
    --color-locked: #CFD8DC;

    --font-main: 'Nunito', 'Segoe UI', sans-serif;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    background-color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-main);
    color: var(--color-text);
}

#game-container {
    width: 1280px;
    height: 700px;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
    border-radius: 8px;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 2rem;
}

.screen.active {
    display: flex;
}

/* Intro Screen */
#intro-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, #E3F2FD 100%);
    text-align: center;
}

.intro-content {
    z-index: 2;
    background: var(--color-surface);
    padding: 4rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-elevated);
    max-width: 600px;
}

.intro-content h1 {
    font-size: 3rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.intro-content p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
}

/* Game Screen */
#game-screen {
    background-color: var(--color-bg);
    padding: 1rem 2rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.header-left {
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.timer-box {
    background: var(--color-surface);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.split-layout {
    display: flex;
    gap: 2rem;
    flex: 1;
    height: calc(100% - 4rem);
}

/* LEFT PANEL (Middle Square) */
#left-panel {
    flex: 1;
    background-color: #000;
    /* Fallback */
    background-image: url('../assets/backgrounds/fundo.png');
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Dark overlay for text readability on image */
#left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.visual-circle {
    width: 6rem;
    height: 6rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.visual-text-box h3 {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    color: #81C784;
    /* Accent color text inside dark box */
}

.visual-text-box p {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 600;
    max-width: 80%;
    margin: 0 auto;
}

#alert-box {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.9);
    border-left: 4px solid var(--color-error);
    padding: 1rem;
    border-radius: 0.5rem;
    z-index: 2;
    display: none;
    /* Flex when active */
    align-items: center;
    gap: 1rem;
    color: white;
    backdrop-filter: blur(4px);
}

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

.feedback-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.feedback-overlay.visible {
    display: flex;
}

.feedback-overlay.success {
    background: rgba(76, 175, 80, 0.85);
    /* Green tint */
    color: white;
}

.feedback-overlay.error {
    background: rgba(239, 83, 80, 0.85);
    /* Red tint */
    color: white;
}

.feedback-content {
    text-align: center;
    animation: zoomIn 0.3s ease-out;
}

.feedback-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.feedback-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feedback-content p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* RIGHT PANEL */
#right-panel {
    flex: 0 0 400px;
    /* Fixed width sidebar option */
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.sync-status {
    margin-bottom: 2rem;
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}

.sync-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.sync-track {
    height: 1.5rem;
    background: #E2E8F0;
    border-radius: 1rem;
    overflow: hidden;
}

#sync-fill {
    height: 100%;
    width: 0%;
    background: var(--color-secondary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scenario-info {
    margin-bottom: 2rem;
}

#scenario-title {
    font-size: 1.25rem;
    color: var(--color-text-light);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.instruction-text {
    font-size: 1rem;
    color: var(--color-text-light);
}

/* OPTIONS */
#options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
    /* Push to bottom if needed, or just flow */
    margin-bottom: auto;
}

.option-btn {
    appearance: none;
    border: none;
    width: 100%;
    padding: 1.5rem 1.5rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    border-radius: 1rem;
    text-align: left;
    font-family: var(--font-main);
    font-size: 1.5rem;
    /* Highlight requirement: Big text */
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--color-secondary);
}

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

/* BUTTONS */
.primary-btn {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    background-color: var(--color-secondary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(100, 181, 246, 0.39);
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: scale(1.05);
    background-color: #42A5F5;
}

/* VICTORY */
#victory-screen {
    justify-content: center;
    align-items: center;
    background: #E8F5E9;
    text-align: center;
}

.victory-content {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-elevated);
}

.victory-icon {
    font-size: 5rem;
    margin: 1rem 0;
}

.victory-content h1 {
    color: #2E7D32;
    margin-bottom: 1rem;
}

/* Keyframes */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}