/* Thumbs Up Inc. - Styles */
/* Phase 1: MVP Styling */

/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */

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

:root {
    /* Color Palette - Muted & Professional */
    --primary-blue: #5B8DC7;
    --primary-orange: #D4A76A;
    --success-green: #7FBF7F;
    --warning-yellow: #E8C468;
    --danger-red: #C85A54;
    --neutral-gray: #8B8B8B;
    --dark-gray: #3A3A3A;
    --light-gray: #F0F0F0;
    --white: #FFFFFF;
    
    /* Content type colors - muted */
    --organic-color: #5B8DC7;
    --ads-color: #D4A76A;
    --sponsored-color: #9B7EBD;
    --influencer-color: #E89AC7;
    --viral-color: #7FBF7F;
    --propaganda-color: #C85A54;
    --clickbait-color: #E8A87C;
    --scams-color: #8B4646;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    
    /* Border radius for clean look */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #6B7AA1 0%, #7E8BA3 100%);
    min-height: 100vh;
    padding: var(--spacing-sm);
    color: var(--dark-gray);
}

/* ============================================
   HEADER
   ============================================ */

header {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   MAIN GAME CONTAINER - 3 COLUMN LAYOUT
   ============================================ */

#game-container {
    display: grid;
    grid-template-columns: 30% 40% 30%;
    gap: var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    height: calc(118vh - 130px);
    min-height: 1000px;
    transform: scale(0.85);
    transform-origin: top center;
}

/* ============================================
   PANELS - SHARED STYLES
   ============================================ */

.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.panel h2 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: var(--spacing-xs);
}

.panel h3 {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-sm);
}

.panel h4 {
    font-size: 1rem;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-xs);
}

hr {
    border: none;
    border-top: 2px dashed var(--neutral-gray);
    margin: var(--spacing-md) 0;
}

/* ============================================
   LEFT PANEL - USER AVATAR
   ============================================ */

.avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-lg) 0;
    min-height: 200px;
}

.avatar {
    position: relative;
    width: 150px;
    height: 200px;
    transition: all 0.5s ease;
}

.avatar .phone {
    font-size: 5rem;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.5s ease;
}

.avatar .face {
    font-size: 4rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

/* Avatar states based on engagement */
.avatar.engaged-high .phone {
    bottom: 50px;
    font-size: 4rem;
}

.avatar.engaged-medium .phone {
    bottom: 20px;
    font-size: 4.5rem;
}

.avatar.engaged-low .phone {
    bottom: 0;
    font-size: 5rem;
    opacity: 0.7;
}

/* Portrait Image */
.avatar-portrait {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Character Selector */
.character-selector {
    text-align: center;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.character-selector label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--dark-gray);
}

.character-selector select {
    width: 100%;
    padding: var(--spacing-xs);
    border: 2px solid var(--neutral-gray);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.character-selector select:hover {
    border-color: var(--primary-blue);
}

.character-selector select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(91, 141, 199, 0.2);
}

/* ============================================
   METRICS & METERS
   ============================================ */

.metrics {
    margin-top: var(--spacing-lg);
}

.metric {
    margin-bottom: var(--spacing-md);
}

.metric label {
    display: block;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.meter {
    width: 100%;
    height: 24px;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--neutral-gray);
    position: relative;
}

.meter-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-sm);
}

/* Engagement meter colors */
#engagement-bar.high { background: var(--success-green); }
#engagement-bar.medium { background: var(--warning-yellow); }
#engagement-bar.low { background: var(--danger-red); }

/* Happiness meter colors */
#happiness-bar.high { background: var(--success-green); }
#happiness-bar.medium { background: var(--warning-yellow); }
#happiness-bar.low { background: var(--danger-red); }

/* Anger meter colors (reversed - more is bad) */
#anger-bar.low { background: var(--warning-yellow); }
#anger-bar.medium { background: var(--primary-orange); }
#anger-bar.high { background: var(--danger-red); }

.metric-value {
    display: inline-block;
    margin-top: var(--spacing-xs);
    font-weight: bold;
    font-size: 1.1rem;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    position: relative;
    vertical-align: middle;
}

.info-icon:hover {
    background: var(--primary-orange);
}

/* Global JS-driven tooltip (position: fixed to escape overflow/transform clipping) */
.global-tooltip {
    position: fixed;
    background: var(--dark-gray);
    color: var(--white);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    white-space: normal;
    width: 250px;
    font-size: 0.85rem;
    font-weight: normal;
    line-height: 1.4;
    z-index: 99999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* ============================================
   CENTER PANEL - FEED PREVIEW
   ============================================ */

.feed-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    position: relative;
    min-height: 0;
}

.post {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--neutral-gray);
    animation: slideIn 0.3s ease;
    min-height: 50px;
    font-size: 0.85rem;
}

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

.post.organic {
    border-left-color: var(--organic-color);
    background: linear-gradient(to right, rgba(91, 141, 199, 0.08), white);
}

.post.ads {
    border-left-color: var(--ads-color);
    background: linear-gradient(to right, rgba(212, 167, 106, 0.08), white);
}

.post.partner {
    border-left-color: var(--sponsored-color);
    background: linear-gradient(to right, rgba(155, 126, 189, 0.08), white);
}

.post.influencer {
    border-left-color: var(--influencer-color);
    background: linear-gradient(to right, rgba(232, 154, 199, 0.08), white);
}

.post.viralOrganic {
    border-left-color: var(--viral-color);
    background: linear-gradient(to right, rgba(127, 191, 127, 0.08), white);
}

.post.propaganda {
    border-left-color: var(--propaganda-color);
    background: linear-gradient(to right, rgba(200, 90, 84, 0.08), white);
}

.post.clickbait {
    border-left-color: var(--clickbait-color);
    background: linear-gradient(to right, rgba(232, 168, 124, 0.08), white);
}

.post.scams {
    border-left-color: var(--scams-color);
    background: linear-gradient(to right, rgba(139, 70, 70, 0.08), white);
}

/* Emoji icons removed - now using profile images instead */

.post.ads, .post.partner, .post.clickbait, .post.scams {
    font-weight: bold;
}

/* Post structure with profile images */
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--neutral-gray);
    margin-right: var(--spacing-xs);
    flex-shrink: 0;
}

.post-user {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-username {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.post-timestamp {
    font-size: 0.7rem;
    color: var(--neutral-gray);
}

.post-content {
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

.post-content h4,
.post-heading {
    margin: 0 0 3px 0 !important;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-gray);
}

.post-text {
    margin: 0 !important;
    padding: 0;
    line-height: 1.3;
}

.post-text p {
    margin: 0 !important;
    padding: 0;
}

.post-image {
    width: 85%;
    max-width: 85%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-sm);
    margin: 0 auto 4px auto;
}

/* ============================================
   RIGHT PANEL - CONTROL PANEL
   ============================================ */

.right-panel {
    overflow-y: auto;
    overflow-x: auto;
}

.stats-header {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-weight: bold;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* ============================================
   SLIDERS
   ============================================ */

.instructions {
    font-size: 0.85rem;
    color: var(--neutral-gray);
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

.sliders-container {
    margin-bottom: var(--spacing-md);
}

.slider-group {
    margin-bottom: var(--spacing-md);
}

.slider-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.slider-name {
    font-weight: bold;
    color: var(--dark-gray);
    display: block;
    margin-bottom: 2px;
}

.slider-info {
    font-size: 0.8rem;
    color: var(--neutral-gray);
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: var(--radius-sm);
    background: var(--light-gray);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#organic-slider::-webkit-slider-thumb {
    background: var(--organic-color);
}

#organic-slider::-moz-range-thumb {
    background: var(--organic-color);
}

#ads-slider::-webkit-slider-thumb {
    background: var(--ads-color);
}

#ads-slider::-moz-range-thumb {
    background: var(--ads-color);
}

#sponsored-slider::-webkit-slider-thumb {
    background: var(--sponsored-color);
}

#sponsored-slider::-moz-range-thumb {
    background: var(--sponsored-color);
}

#influencer-slider::-webkit-slider-thumb {
    background: var(--influencer-color);
}

#influencer-slider::-moz-range-thumb {
    background: var(--influencer-color);
}

#viralOrganic-slider::-webkit-slider-thumb {
    background: var(--viral-color);
}

#viralOrganic-slider::-moz-range-thumb {
    background: var(--viral-color);
}

#propaganda-slider::-webkit-slider-thumb {
    background: var(--propaganda-color);
}

#propaganda-slider::-moz-range-thumb {
    background: var(--propaganda-color);
}

#clickbait-slider::-webkit-slider-thumb {
    background: var(--clickbait-color);
}

#clickbait-slider::-moz-range-thumb {
    background: var(--clickbait-color);
}

#scams-slider::-webkit-slider-thumb {
    background: var(--scams-color);
}

#scams-slider::-moz-range-thumb {
    background: var(--scams-color);
}

.percentage-display {
    font-weight: bold;
    min-width: 45px;
    text-align: right;
    color: var(--dark-gray);
}

.val-up {
    color: var(--success-green);
    font-size: 1.3em;
}

.val-down {
    color: var(--danger-red);
    font-size: 1.3em;
}

.val-neutral {
    color: var(--neutral-gray);
}

.lock-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 4px;
    user-select: none;
}

.lock-checkbox {
    display: none;
}

.lock-icon::before {
    content: '🔓';
    font-size: 1rem;
    opacity: 0.35;
    transition: opacity 0.15s ease;
}

.lock-label:hover .lock-icon::before {
    opacity: 0.7;
}

.lock-checkbox:checked + .lock-icon::before {
    content: '🔒';
    opacity: 1;
}

.total-display {
    background: var(--light-gray);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.warning {
    color: var(--danger-red);
    font-weight: bold;
    margin-left: var(--spacing-sm);
}

.info-box {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.info-box h4 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

#strategy-info {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ============================================
   MODAL OVERLAYS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 600px;
    width: 90%;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-size: 2rem;
}

.modal-text {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    color: var(--dark-gray);
}

.modal-text ul {
    margin-left: var(--spacing-lg);
    margin-top: var(--spacing-sm);
}

.modal-text li {
    margin-bottom: var(--spacing-xs);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

/* Center buttons in modals */
.modal-content .btn {
    display: block;
    width: 100%;
    margin-top: var(--spacing-md);
}

/* ============================================
   GAME OVER SCREEN
   ============================================ */

.gameover-modal h2 {
    font-size: 1.8rem;
}

.final-stats {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

.final-stats h3 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-blue);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.stat-highlight {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-orange);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

/* ============================================
   UNLOCK POPUP
   ============================================ */

.unlock-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Flashing warning animation for low engagement */
@keyframes flashWarning {
    0%, 100% {
        background-color: var(--danger-red);
        opacity: 1;
    }
    50% {
        background-color: #ff4444;
        opacity: 0.7;
    }
}

.meter-fill.warning-flash {
    animation: flashWarning 1s ease-in-out infinite;
}

.unlock-popup h3 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-size: 1.5rem;
}

.unlock-popup p {
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: var(--dark-gray);
}

.unlock-content-list {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.unlock-content-item {
    margin-bottom: var(--spacing-sm);
}

.unlock-content-item:last-child {
    margin-bottom: 0;
}

.unlock-content-name {
    font-weight: bold;
    color: var(--primary-blue);
}

.unlock-content-effects {
    font-size: 0.9rem;
    color: var(--neutral-gray);
    margin-top: 2px;
}

.unlock-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.unlock-buttons .btn {
    flex: 1;
    margin: 0;
}

/* ============================================
   DASHBOARD OVERLAY
   ============================================ */

.dashboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.dashboard-content h2 {
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: var(--spacing-sm);
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.dashboard-stat-card {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-blue);
}

.dashboard-stat-card h3 {
    font-size: 1rem;
    color: var(--neutral-gray);
    margin-bottom: var(--spacing-xs);
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.dashboard-chart {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.dashboard-chart h3 {
    margin-bottom: var(--spacing-md);
    color: var(--dark-gray);
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.chart-label {
    width: 150px;
    font-size: 0.9rem;
    font-weight: 500;
}

.chart-bar-container {
    flex: 1;
    height: 30px;
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 var(--spacing-sm);
}

.chart-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--spacing-xs);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: bold;
}

.chart-value {
    min-width: 80px;
    text-align: right;
    font-weight: bold;
}

.effects-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
}

.effects-table th,
.effects-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.effects-table th {
    background: var(--light-gray);
    font-weight: bold;
    color: var(--dark-gray);
}

.effects-table tr:hover {
    background: rgba(91, 141, 199, 0.05);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.language-switcher {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.language-switcher select {
    border: 1px solid var(--neutral-gray);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
}

/* ============================================
   FOOTER ATTRIBUTION
   ============================================ */

.footer-attribution {
    background: var(--white);
    border-top: 1px solid var(--light-gray);
    padding: 16px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.cc-license-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.cc-badge {
    height: 31px;
    width: 88px;
    border: none;
    transition: opacity 0.2s ease;
}

.cc-badge:hover {
    opacity: 0.8;
}

.attribution-text {
    color: var(--dark-gray);
    font-size: 0.85rem;
}

.attribution-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.attribution-text a:hover {
    color: var(--secondary-purple);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    #game-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .panel {
        min-height: auto;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: var(--spacing-xs);
    }

    header h1 {
        font-size: 1.5rem;
    }

    .panel {
        padding: var(--spacing-sm);
    }

    .avatar {
        width: 100px;
        height: 150px;
    }

    .avatar .phone {
        font-size: 3.5rem;
    }

    .avatar .face {
        font-size: 3rem;
    }

    .effects-table {
        font-size: 0.85rem;
    }

    .effects-table th,
    .effects-table td {
        padding: var(--spacing-xs);
    }

    .footer-attribution {
        flex-direction: column;
        gap: 6px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .cc-badge {
        height: 24px;
        width: auto;
    }

    .attribution-text {
        font-size: 0.75rem;
    }
}

/* ============================================
   SMALL SCREEN WARNING
   ============================================ */

.small-screen-warning {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    text-align: center;
}

.small-screen-warning h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
}

.small-screen-warning p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 400px;
    line-height: 1.6;
}

/* ============================================
   TUTORIAL SYSTEM
   ============================================ */

/* Click-blocker overlay (sits behind spotlight) */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
}

/* Spotlight: positioned over the target element; the massive box-shadow
   creates the dark surround without a separate overlay div */
.tutorial-spotlight {
    position: fixed;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    z-index: 2000;
    pointer-events: none;
    transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* Speech bubble */
.tutorial-bubble {
    position: fixed;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    transition: left 0.3s ease, top 0.3s ease;
}

.tutorial-bubble p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--dark-gray);
}

.tutorial-bubble .btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Tail triangles */
.tutorial-bubble::before {
    content: '';
    position: absolute;
    border: 12px solid transparent;
}

.tutorial-bubble[data-tail="left"]::before {
    border-right-color: var(--white);
    left: -24px;
    top: 20px;
}

.tutorial-bubble[data-tail="right"]::before {
    border-left-color: var(--white);
    right: -24px;
    top: 20px;
}
