/* Maine Lobster Dealer Tycoon - Premium Pixel Art Style */
/* Phase 3: Visual Overhaul */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    /* Ocean palette */
    --ocean-deepest: #0a1628;
    --ocean-deep: #0f2847;
    --ocean-dark: #1a4066;
    --ocean-medium: #2d6187;
    --ocean-light: #4a9cc7;
    --ocean-bright: #6bc4e8;
    --ocean-foam: #b8e4f0;

    /* Accent colors */
    --lobster-red: #e84545;
    --lobster-dark: #b33030;
    --lobster-glow: #ff6b6b;
    --gold: #ffd700;
    --gold-dark: #b8960f;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --success: #50c878;
    --success-glow: #7dffaa;
    --warning: #ffb347;
    --danger: #ff6b6b;

    /* Wood/dock */
    --wood-dark: #4a3728;
    --wood-medium: #6b4423;
    --wood-light: #8b6914;
    --wood-highlight: #a67c00;

    /* UI */
    --sand: #f4e4bc;
    --cream: #fff8e7;
    --white: #ffffff;
    --black: #0a0a0a;
    --shadow: rgba(0, 0, 0, 0.5);

    /* Dawn/Atmospheric */
    --dawn-sky-top: #1a0a20;
    --dawn-sky-mid: #4a2040;
    --dawn-horizon: #ff6b4a;
    --dawn-glow: #ffb347;
    --dawn-water: #0a1628;
    --silhouette: #0a0a0a;
    --ceremony-glow: rgba(255, 215, 0, 0.6);
    --ceremony-pulse: rgba(255, 215, 0, 0.3);
}

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

/* Animated ocean background */
body {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 1.8;
    min-height: 100vh;
    background: linear-gradient(180deg,
        var(--ocean-deepest) 0%,
        var(--ocean-deep) 30%,
        var(--ocean-dark) 60%,
        var(--ocean-medium) 100%
    );
    color: var(--cream);
    overflow-x: hidden;
}

/* Animated wave overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%231a4066' fill-opacity='0.3' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,149.3C672,149,768,203,864,208C960,213,1056,171,1152,144C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    background-size: 1440px 320px;
    background-position: 0 100%;
    animation: wave 15s linear infinite;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1440px; }
}

/* ========================================
   WELCOME SCREEN - Atmospheric Dawn
   ======================================== */
.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 40px 20px;
    overflow: hidden;
}

.welcome-screen.hidden {
    display: none;
}

/* Atmospheric Hero Background */
.welcome-hero {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Dawn Sky Gradient */
.hero-sky {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg,
        var(--dawn-sky-top) 0%,
        var(--dawn-sky-mid) 35%,
        var(--dawn-horizon) 70%,
        var(--dawn-glow) 100%
    );
}

/* Rising Sun */
.hero-sun {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle,
        #fff8e7 0%,
        var(--dawn-glow) 30%,
        var(--dawn-horizon) 60%,
        transparent 70%
    );
    border-radius: 50%;
    animation: sunRise 8s ease-out infinite;
    filter: blur(2px);
}

@keyframes sunRise {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.9; }
    50% { transform: translateX(-50%) translateY(-10px); opacity: 1; }
}

/* Dawn Ocean */
.hero-ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
        var(--dawn-water) 0%,
        var(--ocean-deep) 50%,
        var(--ocean-dark) 100%
    );
}

/* Subtle wave reflection */
.hero-ocean::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(255, 180, 100, 0.3) 0%,
        rgba(255, 180, 100, 0.1) 50%,
        transparent 100%
    );
    animation: gentleWave 6s ease-in-out infinite;
}

@keyframes gentleWave {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.1); opacity: 0.7; }
}

/* Dock Silhouette */
.hero-dock-silhouette {
    position: absolute;
    bottom: 44%;
    left: 15%;
    width: 70%;
    height: 12px;
    background: var(--silhouette);
}

/* Dock posts */
.hero-dock-silhouette::before {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 10%;
    width: 8px;
    height: 20px;
    background: var(--silhouette);
    box-shadow:
        60px 0 0 var(--silhouette),
        120px 0 0 var(--silhouette),
        180px 0 0 var(--silhouette),
        240px 0 0 var(--silhouette);
}

/* Lighthouse Silhouette */
.hero-lighthouse {
    position: absolute;
    bottom: 44%;
    right: 12%;
    width: 25px;
    height: 90px;
    background: var(--silhouette);
    clip-path: polygon(20% 100%, 80% 100%, 65% 25%, 70% 20%, 70% 10%, 30% 10%, 30% 20%, 35% 25%);
}

/* Lighthouse glow */
.hero-lighthouse::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--dawn-glow);
    border-radius: 50%;
    box-shadow:
        0 0 20px var(--dawn-glow),
        0 0 40px var(--warning),
        0 0 60px var(--warning);
    animation: lighthouseGlow 4s ease-in-out infinite;
}

@keyframes lighthouseGlow {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(0.9); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* Lobster Silhouette - Front and Center */
.hero-lobster-silhouette {
    position: absolute;
    bottom: 48%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 100px;
    color: var(--silhouette);
    filter: drop-shadow(0 0 40px rgba(255, 107, 107, 0.4));
    animation: lobsterFloat 5s ease-in-out infinite;
}

@keyframes lobsterFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* Welcome Content - Positioned over hero */
.welcome-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding-bottom: 40px;
}

/* Title - Bigger, Dominant */
.welcome-title {
    font-size: 28px;
    color: var(--cream);
    text-shadow:
        4px 4px 0 var(--black),
        0 0 40px rgba(255, 107, 107, 0.5),
        0 0 80px rgba(255, 107, 107, 0.3);
    margin-bottom: 20px;
    letter-spacing: 2px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .welcome-title {
        font-size: 42px;
        letter-spacing: 3px;
    }
}

/* Single Killer Tagline */
.welcome-tagline {
    font-size: 11px;
    color: var(--ocean-foam);
    text-shadow: 2px 2px 0 var(--black);
    margin-bottom: 40px;
    letter-spacing: 1px;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .welcome-tagline {
        font-size: 13px;
    }
}

/* Ceremonial Button */
.btn-ceremony {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 20px 40px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--black);
    border: 5px solid var(--black);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 0 0 3px var(--gold),
        0 8px 0 var(--wood-dark),
        0 0 60px var(--ceremony-glow);
    animation: ceremonialPulse 2.5s ease-in-out infinite;
    transition: transform 0.1s ease;
}

.btn-ceremony:hover {
    transform: translateY(-2px);
}

.btn-ceremony:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 3px var(--gold),
        0 4px 0 var(--wood-dark),
        0 0 40px var(--ceremony-glow);
}

@keyframes ceremonialPulse {
    0%, 100% {
        box-shadow:
            0 0 0 3px var(--gold),
            0 8px 0 var(--wood-dark),
            0 0 60px var(--ceremony-glow);
    }
    50% {
        box-shadow:
            0 0 0 4px var(--gold),
            0 8px 0 var(--wood-dark),
            0 0 100px var(--ceremony-glow),
            0 0 140px var(--ceremony-pulse);
    }
}

@media (min-width: 768px) {
    .btn-ceremony {
        font-size: 14px;
        padding: 24px 56px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-sun,
    .hero-lobster-silhouette,
    .hero-lighthouse::before,
    .hero-ocean::before,
    .btn-ceremony {
        animation: none;
    }
}

/* Game Container */
.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   STATUS STRIP - Persistent Header
   ======================================== */
.status-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border-bottom: 3px solid var(--ocean-medium);
    position: sticky;
    top: 0;
    z-index: 100;
}

.strip-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strip-title {
    font-size: 8px;
    color: var(--ocean-foam);
    opacity: 0.7;
}

.strip-reputation {
    font-size: 9px;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold-dark);
}

.strip-survival {
    display: flex;
    gap: 16px;
    align-items: center;
}

.strip-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.strip-stat .stat-label {
    font-size: 6px;
    color: var(--ocean-foam);
    opacity: 0.6;
    text-transform: uppercase;
}

.strip-stat .stat-value {
    font-size: 10px;
    color: var(--cream);
}

.strip-cash .stat-value {
    font-size: 14px;
    color: var(--success-glow);
    text-shadow: 0 0 10px var(--success);
}

.strip-pressure {
    display: flex;
    gap: 12px;
    align-items: center;
}

.strip-day .stat-value {
    color: var(--sand);
}

.strip-weather {
    flex-direction: row;
    gap: 4px;
}

.strip-weather span {
    font-size: 12px;
}

.weather-next {
    font-size: 9px !important;
    opacity: 0.6;
}

.strip-market {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
}

.strip-market .trend-stable { color: var(--ocean-foam); }
.strip-market .trend-rising { color: var(--success-glow); }
.strip-market .trend-falling { color: var(--danger); }

.strip-actions {
    display: flex;
    gap: 8px;
}

.strip-btn {
    background: rgba(0,0,0,0.4);
    border: 2px solid var(--ocean-medium);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.strip-btn:hover {
    background: var(--ocean-dark);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ========================================
   WORKSPACE NAVIGATION - Tab Bar
   ======================================== */
.workspace-nav {
    display: flex;
    background: var(--ocean-deepest);
    border-bottom: 2px solid var(--ocean-dark);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--ocean-foam);
    font-family: inherit;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.nav-tab:hover {
    opacity: 0.9;
    background: rgba(255,255,255,0.05);
}

.nav-tab.active {
    opacity: 1;
    border-bottom-color: var(--gold);
    background: rgba(255,215,0,0.1);
    color: var(--gold);
}

.tab-icon {
    font-size: 18px;
}

.tab-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   MAIN WORKSPACE
   ======================================== */
.workspace {
    flex: 1;
    position: relative;
    overflow-y: auto;
    padding: 16px;
}

.workspace-panel {
    display: block;
}

.workspace-panel.hidden {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ocean-dark);
}

.panel-header h2 {
    font-size: 12px;
    color: var(--cream);
    text-shadow: 2px 2px 0 var(--black);
}

.location-prices {
    display: flex;
    gap: 8px;
}

.price-tag {
    font-size: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
}

.price-tag.buy {
    background: rgba(80, 200, 120, 0.2);
    color: var(--success-glow);
    border: 1px solid var(--success);
}

.price-tag.sell {
    background: rgba(255, 179, 71, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 2px dashed var(--ocean-dark);
}

.empty-message {
    font-size: 11px;
    color: var(--ocean-foam);
    margin-bottom: 20px;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ========================================
   DOCK VIEW - Boats Container
   ======================================== */
.boats-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========================================
   TANKS VIEW
   ======================================== */
.tanks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tank-capacity {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 16px;
}

.capacity-bar {
    height: 24px;
    background: var(--ocean-deepest);
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid var(--ocean-dark);
    margin-bottom: 8px;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ocean-light) 0%, var(--ocean-bright) 100%);
    transition: width 0.3s ease;
    position: relative;
}

.capacity-fill.warning {
    background: linear-gradient(90deg, var(--warning) 0%, var(--danger) 100%);
}

.capacity-text {
    text-align: center;
    font-size: 11px;
    color: var(--cream);
}

.tank-risk {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.risk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 12px 20px;
    border-radius: 6px;
}

.risk-label {
    font-size: 7px;
    color: var(--ocean-foam);
    opacity: 0.7;
}

.risk-value {
    font-size: 12px;
    color: var(--cream);
}

.risk-value.warning {
    color: var(--warning);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.inventory-card {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 2px solid var(--ocean-dark);
}

.inventory-card.grade-select { border-color: var(--gold); }
.inventory-card.grade-quarter { border-color: var(--silver); }
.inventory-card.grade-chix { border-color: var(--bronze); }
.inventory-card.grade-run { border-color: var(--ocean-medium); }

.grade-name {
    font-size: 8px;
    color: var(--ocean-foam);
}

.grade-amount {
    font-size: 14px;
    color: var(--cream);
}

.tank-warning {
    background: rgba(255, 100, 100, 0.2);
    border: 2px solid var(--danger);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.tank-warning .warning-icon {
    font-size: 20px;
}

.tank-warning .warning-text {
    font-size: 9px;
    color: var(--danger);
}

.tank-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========================================
   BUYERS VIEW
   ======================================== */
.buyers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========================================
   TRAVEL VIEW
   ======================================== */
.travel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-port {
    text-align: center;
    padding: 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--gold);
    border-radius: 8px;
}

.port-label {
    font-size: 8px;
    color: var(--ocean-foam);
    display: block;
    margin-bottom: 4px;
}

.port-name {
    font-size: 14px;
    color: var(--gold);
}

.ports-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.port-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--ocean-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.port-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--ocean-light);
    transform: translateX(4px);
}

.port-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.port-card.locked:hover {
    transform: none;
}

.port-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.port-card-name {
    font-size: 11px;
    color: var(--cream);
}

.port-mods {
    display: flex;
    gap: 8px;
    font-size: 7px;
}

.port-mods .buy { color: var(--success); }
.port-mods .sell { color: var(--warning); }

.port-cost {
    font-size: 9px;
    color: var(--warning);
}

.travel-requirement {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 2px dashed var(--ocean-dark);
}

.lock-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.requirement-text {
    font-size: 9px;
    color: var(--ocean-foam);
}

.port-lock-reason {
    font-size: 7px;
    color: var(--warning);
    font-style: italic;
}

/* ========================================
   ACTION BAR - End Day
   ======================================== */
.action-bar {
    padding: 16px;
    background: linear-gradient(180deg, transparent 0%, var(--ocean-deepest) 100%);
    text-align: center;
}

/* ========================================
   GAME LOG - Collapsible
   ======================================== */
.log-panel {
    background: var(--ocean-deepest);
    border-top: 2px solid var(--ocean-dark);
}

.log-panel summary {
    padding: 12px 16px;
    font-size: 9px;
    color: var(--ocean-foam);
    cursor: pointer;
    list-style: none;
}

.log-panel summary::-webkit-details-marker {
    display: none;
}

.log-panel summary::before {
    content: "▶ ";
}

.log-panel[open] summary::before {
    content: "▼ ";
}

#game-log {
    max-height: 150px;
    overflow-y: auto;
    padding: 0 16px 16px;
    font-size: 8px;
}

#game-log p {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ========================================
   LEGACY STYLES (kept for compatibility)
   ======================================== */
.hidden {
    display: none !important;
}

#market-trend {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 8px;
}

.trend-up {
    background: rgba(80, 200, 120, 0.3);
    color: var(--success-glow);
    border: 2px solid var(--success);
}
.trend-down {
    background: rgba(255, 100, 100, 0.3);
    color: var(--danger);
    border: 2px solid var(--danger);
}
.trend-stable {
    background: rgba(255, 200, 100, 0.2);
    color: var(--warning);
    border: 2px solid var(--warning);
}

/* Daily Tracker */
.daily-tracker {
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.1);
}

.daily-stat {
    font-size: 9px;
}

.daily-stat.spent {
    color: var(--warning);
}

.daily-stat.earned {
    color: var(--success-glow);
}

.daily-stat.profit-positive {
    color: var(--success-glow);
    text-shadow: 0 0 8px var(--success);
    font-weight: bold;
}

.daily-stat.profit-negative {
    color: var(--danger);
    text-shadow: 0 0 8px rgba(255,100,100,0.5);
}

/* Location Row */
.location-row {
    background: rgba(0,0,0,0.4);
    padding: 8px 14px;
    border-radius: 6px;
    border: 2px solid var(--ocean-medium);
    justify-content: space-between;
    width: 100%;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

#location-emoji {
    font-size: 16px;
}

#location-name {
    font-size: 10px;
    color: var(--gold);
    text-shadow: 1px 1px 0 var(--black);
}

.location-traits {
    font-size: 7px;
    color: var(--ocean-bright);
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.price-mods {
    display: flex;
    gap: 12px;
    font-size: 8px;
}

.buy-mod {
    color: var(--success-glow);
}

.sell-mod {
    color: var(--warning);
}

.price-mods span span {
    font-weight: bold;
}

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

/* ========================================
   PERSISTENT SUMMARY BAR
   ======================================== */
.summary-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(180deg, var(--ocean-deepest) 0%, var(--ocean-dark) 100%);
    border: 3px solid var(--black);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.summary-label {
    font-size: 7px;
    color: var(--ocean-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 11px;
    font-weight: bold;
    color: var(--white);
}

.summary-value.positive {
    color: var(--success-glow);
}

.summary-value.negative {
    color: var(--danger);
}

/* Reputation tier colors */
.summary-value.reputation-tier-1 {
    color: #888; /* Dock Nobody - gray */
}
.summary-value.reputation-tier-2 {
    color: var(--ocean-foam); /* Local Regular - light blue */
}
.summary-value.reputation-tier-3 {
    color: var(--success-glow); /* Known Dealer - green */
}
.summary-value.reputation-tier-4 {
    color: #ffa500; /* Regional Player - orange */
}
.summary-value.reputation-tier-5 {
    color: var(--gold); /* Statewide Power - gold */
    text-shadow: 0 0 5px var(--gold);
}

.flash {
    animation: flash-highlight 0.5s ease-out;
}

@keyframes flash-highlight {
    0% { background: var(--gold); color: var(--black); transform: scale(1.1); }
    100% { background: transparent; color: inherit; transform: scale(1); }
}

/* ========================================
   MOBILE DAY CARD
   ======================================== */
/* Default: Show Day Card (mobile), hide full header */
.day-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-desktop {
    display: none;
}

.day-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-card-day {
    font-size: 14px;
    color: var(--cream);
    text-shadow: 2px 2px 0 var(--black);
}

.day-card-location {
    font-size: 11px;
    color: var(--gold);
    text-shadow: 1px 1px 0 var(--black);
}

.day-card-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-card-cash {
    font-size: 16px;
    color: var(--success-glow);
    text-shadow: 0 0 10px var(--success), 2px 2px 0 var(--black);
}

.day-card-signal {
    font-size: 9px;
    color: var(--ocean-foam);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
}

.day-card-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-tiny {
    font-size: 18px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--ocean-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-tiny:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
}

/* Desktop: Show full header, hide Day Card */
@media (min-width: 1024px) {
    .day-card {
        display: none;
    }

    .header-desktop {
        display: block;
    }
}

/* ========================================
   MOBILE STICKY ACTION BAR
   ======================================== */
.sticky-action {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    background: linear-gradient(180deg, transparent 0%, var(--ocean-deepest) 30%);
    z-index: 500;
}

.btn-sticky {
    width: 100%;
    font-size: 14px;
    padding: 18px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--black);
    border: 4px solid var(--black);
    box-shadow:
        0 0 0 2px var(--gold),
        0 4px 0 var(--wood-dark),
        0 0 30px var(--ceremony-glow);
    animation: stickyPulse 2s ease-in-out infinite;
}

@keyframes stickyPulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px var(--gold),
            0 4px 0 var(--wood-dark),
            0 0 30px var(--ceremony-glow);
    }
    50% {
        box-shadow:
            0 0 0 3px var(--gold),
            0 4px 0 var(--wood-dark),
            0 0 50px var(--ceremony-glow),
            0 0 80px var(--ceremony-pulse);
    }
}

/* Hide sticky button on desktop */
@media (min-width: 1024px) {
    .sticky-action {
        display: none;
    }
}

/* Add padding to game container for sticky button on mobile */
@media (max-width: 1023px) {
    .game-container {
        padding-bottom: 100px;
    }
}

/* ========================================
   DAY SUMMARY MODAL
   ======================================== */
.modal-fullscreen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-fullscreen .modal-content {
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 5px solid var(--gold);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.3);
}

.day-summary h2 {
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 var(--black);
}

.summary-verdict {
    font-size: 24px;
    margin-bottom: 20px;
}

.summary-stats {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 9px;
    color: var(--ocean-foam);
}

.summary-value {
    font-size: 11px;
    color: var(--cream);
}

.summary-value.positive {
    color: var(--success-glow);
}

.summary-value.negative {
    color: var(--danger);
}

.summary-total {
    border-top: 2px solid var(--gold);
    margin-top: 8px;
}

/* Summary Sections */
.summary-section {
    margin-bottom: 16px;
}

.summary-section h3 {
    font-size: 10px;
    color: var(--ocean-foam);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-achieved h3::before {
    content: "✓ ";
    color: var(--positive);
}

.summary-missed h3::before {
    content: "✗ ";
    color: var(--danger);
}

.summary-missed-content {
    background: rgba(139, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--danger);
}

.missed-item {
    font-size: 9px;
    margin: 6px 0;
    color: var(--cream);
}

.missed-rival {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.rival-icon {
    font-size: 20px;
}

.rival-text {
    font-size: 9px;
    color: #ff9800;
}

.missed-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-value.warning {
    color: #ff9800;
}

.summary-total .summary-label,
.summary-total .summary-value {
    font-size: 12px;
    font-weight: bold;
}

.summary-cash {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
    padding: 10px !important;
    margin-top: 8px;
}

.summary-cash .summary-value {
    font-size: 14px;
    color: var(--gold);
}

.day-summary .btn-ceremony {
    margin-top: 10px;
}

/* On mobile: fullscreen modal */
@media (max-width: 767px) {
    .modal-fullscreen .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ========================================
   PANELS
   ======================================== */
.panel {
    background: linear-gradient(180deg, var(--ocean-medium) 0%, var(--ocean-dark) 100%);
    border: 5px solid var(--black);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.1),
        inset 0 -3px 0 rgba(0,0,0,0.2),
        0 6px 16px var(--shadow);
}

/* Corner decorations */
.panel::before,
.panel::after {
    content: "⚓";
    position: absolute;
    font-size: 10px;
    opacity: 0.15;
}
.panel::before { top: 6px; left: 8px; }
.panel::after { top: 6px; right: 8px; }

.panel h2 {
    font-size: 11px;
    color: var(--gold);
    text-shadow: 2px 2px 0px var(--black), 0 0 10px rgba(255,215,0,0.3);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--ocean-deepest);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel h2::before {
    content: "◆";
    font-size: 8px;
}

.panel h3 {
    font-size: 9px;
    color: var(--ocean-bright);
    margin: 12px 0 8px 0;
    text-shadow: 1px 1px 0px var(--black);
}

/* ========================================
   MAIN LAYOUT - Responsive 3-Column
   ======================================== */
.game-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile-first: Stack everything */
.column-left,
.column-center,
.column-right {
    width: 100%;
}

/* Hide Markets and Forecast on mobile (use header/modals instead) */
.column-left {
    display: none;
}

.column-right .forecast-panel {
    display: none;
}

/* Remove margin on panels inside columns */
.column .panel {
    margin-bottom: 0;
}

/* Center column action bar - hidden on mobile (uses sticky button) */
.column-center .action-bar {
    display: none;
}

/* Log panel full width */
.log-panel {
    margin-bottom: 0;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .game-main {
        flex-wrap: wrap;
    }

    .column-center {
        flex: 1 1 100%;
        order: -1;
    }

    .column-right {
        flex: 1 1 100%;
    }
}

/* Desktop: Full 3-column layout */
@media (min-width: 1024px) {
    .game-main {
        flex-wrap: nowrap;
    }

    /* Show Markets panel on desktop */
    .column-left {
        display: flex;
        flex: 0 0 260px;
        order: 0;
    }

    /* Center expands to fill space */
    .column-center {
        flex: 1;
        min-width: 320px;
        order: 1;
    }

    /* Right column fixed width */
    .column-right {
        flex: 0 0 280px;
        order: 2;
    }

    /* Show Forecast on desktop */
    .column-right .forecast-panel {
        display: block;
    }

    /* Show in-flow action bar on desktop */
    .column-center .action-bar {
        display: block;
        margin: 0;
    }
}

/* ========================================
   MARKETS PANEL (Desktop Left Column)
   ======================================== */
.markets-panel {
    background: linear-gradient(180deg, var(--ocean-light) 0%, var(--ocean-medium) 100%);
}

.current-location-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.location-header .location-icon {
    font-size: 1.5rem;
}

.location-header .location-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-light);
}

.location-prices {
    display: flex;
    gap: 12px;
}

.price-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.price-tag.buy {
    background: rgba(76, 175, 80, 0.3);
    color: var(--positive);
}

.price-tag.sell {
    background: rgba(255, 152, 0, 0.3);
    color: var(--gold);
}

.markets-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.market-town {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.market-town:hover {
    background: rgba(255, 255, 255, 0.15);
}

.market-town.current {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid var(--gold);
}

.market-town-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.market-town-prices {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
}

.market-town-prices .buy {
    color: var(--positive);
}

.market-town-prices .sell {
    color: var(--gold);
}

.markets-footer {
    margin-top: 12px;
    text-align: center;
}

/* ========================================
   FORECAST PANEL (Desktop Right Column)
   ======================================== */
.forecast-panel {
    background: linear-gradient(180deg, var(--ocean-medium) 0%, var(--ocean-dark) 100%);
}

.forecast-current,
.forecast-tomorrow,
.market-trend-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.market-trend-display {
    border-bottom: none;
}

.forecast-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-weather {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.forecast-weather span:first-child {
    font-size: 1.3rem;
}

/* ========================================
   DOCK PANEL
   ======================================== */
.dock-panel {
    background: linear-gradient(180deg, var(--wood-medium) 0%, var(--wood-dark) 100%);
    position: relative;
}

/* Wood plank texture */
.dock-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 30px,
        rgba(0,0,0,0.1) 30px,
        rgba(0,0,0,0.1) 32px
    );
    pointer-events: none;
    border-radius: 2px;
}

.dock-panel h2::before {
    content: "🚢";
    font-size: 12px;
}

.boat-card {
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    padding: 14px 12px 10px 12px;
    margin-bottom: 8px;
    border: 3px solid var(--black);
    border-radius: 4px;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 4px 8px var(--shadow);
}

.boat-card:last-child {
    margin-bottom: 0;
}

.boat-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ocean-light), var(--ocean-bright), var(--ocean-light));
    opacity: 0.5;
    pointer-events: none;
}

.boat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.boat-emoji {
    font-size: 28px;
    filter: drop-shadow(2px 2px 2px var(--black));
}

.boat-name {
    color: var(--ocean-foam);
    font-size: 10px;
    text-shadow: 1px 1px 0px var(--black);
}

.captain-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.captain-name {
    color: var(--gold);
    font-size: 8px;
    text-shadow: 1px 1px 0px var(--black);
}

.captain-flavor {
    font-size: 6px;
    color: var(--text-muted);
    font-style: italic;
}

/* Trust tier indicators */
.captain-name.trust-preferred {
    color: var(--gold);
    text-shadow: 0 0 5px var(--gold);
}
.captain-name.trust-warm {
    color: var(--success-glow);
}
.captain-name.trust-cold {
    color: #6699cc;
}

.catch-info {
    margin-bottom: 12px;
    font-size: 10px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border-left: 4px solid var(--ocean-bright);
}

.price-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.price-per-lb {
    font-size: 14px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 1px 1px 2px var(--black);
}

.price-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.price-tag {
    font-size: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.tag-cheap {
    background: var(--success);
    color: var(--black);
}

.tag-premium {
    background: var(--gold);
    color: var(--black);
}

.tag-risky {
    background: var(--danger);
    color: var(--white);
    animation: pulse 1s infinite;
}

.tag-neutral {
    background: var(--ocean-light);
    color: var(--black);
}

.tag-info {
    background: var(--ocean-bright);
    color: var(--black);
}

.catch-details {
    color: var(--text-muted);
    font-size: 9px;
}

.catch-info .total-cost {
    color: var(--gold);
    margin-top: 6px;
    font-size: 11px;
}

.boat-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

/* Boat Timer Bar */
.boat-timer-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.boat-timer-bar .timer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--positive), #7cb342);
    transition: width 0.3s ease;
}

.boat-timer-bar .timer-text {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 7px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
    font-weight: bold;
}

.boat-timer-bar.timer-warning .timer-fill {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}

.boat-timer-bar.timer-urgent .timer-fill {
    background: linear-gradient(90deg, var(--danger), #ff5252);
    animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Boat Type Styling */
.boat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.boat-type-label {
    font-size: 7px;
    color: var(--ocean-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boat-type-dory {
    border-color: #8d6e63;
}

.boat-type-dory::before {
    background: linear-gradient(90deg, #8d6e63, #a1887f, #8d6e63);
}

.boat-type-trawler {
    border-color: #5c6bc0;
}

.boat-type-trawler::before {
    background: linear-gradient(90deg, #5c6bc0, #7986cb, #5c6bc0);
}

.boat-type-trawler .boat-emoji {
    font-size: 32px;
}

/* Incoming boats animation */
.boat-incoming {
    animation: incomingPulse 1.5s ease infinite;
}

@keyframes incomingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.waiting {
    color: var(--ocean-light);
    font-size: 9px;
    opacity: 0.7;
    padding: 20px 0;
    text-align: center;
    font-style: italic;
}

/* ========================================
   TANK PANEL
   ======================================== */
.tank-panel h2::before {
    content: "🦞";
    font-size: 12px;
}

.tank-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tank-visual {
    position: relative;
    background: linear-gradient(180deg, #051520 0%, #0a2535 100%);
    height: 120px;
    border: 5px solid var(--black);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.5),
        0 4px 8px var(--shadow);
}

/* Glass reflection effect */
.tank-visual::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 50%;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 3;
}

.tank-water {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(74, 156, 199, 0.2) 100%);
}

.tank-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg,
        var(--ocean-bright) 0%,
        var(--ocean-light) 30%,
        var(--ocean-medium) 100%
    );
    transition: height 0.5s ease;
    box-shadow: 0 -4px 20px rgba(106, 196, 232, 0.4);
}

/* Animated bubbles */
.tank-fill::before {
    content: "°°°";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: rgba(255,255,255,0.4);
    animation: bubbles 3s ease-in-out infinite;
    letter-spacing: 10px;
}

@keyframes bubbles {
    0%, 100% { opacity: 0.2; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.6; transform: translateX(-50%) translateY(-10px); }
}

.lobster-icons {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    font-size: 18px;
    word-wrap: break-word;
    z-index: 2;
    filter: drop-shadow(1px 1px 1px var(--black));
    animation: lobsterFloat 4s ease-in-out infinite;
}

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

.tank-stats {
    font-size: 9px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 4px;
}

.inventory-breakdown {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 10px;
}

.grade-a { color: var(--gold); text-shadow: 0 0 8px rgba(255,215,0,0.5); }
.grade-b { color: var(--silver); }
.grade-c { color: var(--bronze); }

.total {
    color: var(--cream);
    font-size: 10px;
}

/* ========================================
   BUYERS PANEL
   ======================================== */
.buyers-panel {
    grid-column: 1 / -1;
}

.buyers-panel h2::before {
    content: "💰";
    font-size: 12px;
}

#buyers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buyer-card {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    padding: 10px 12px;
    border: 3px solid var(--black);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 4px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.buyer-card:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 8px 16px var(--shadow);
}

.buyer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.buyer-emoji {
    font-size: 24px;
    filter: drop-shadow(2px 2px 2px var(--black));
}

.buyer-name {
    color: var(--sand);
    font-size: 10px;
    text-shadow: 1px 1px 0px var(--black);
}

.buyer-type {
    color: var(--ocean-light);
    font-size: 8px;
    opacity: 0.7;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

.buyer-offer {
    font-size: 9px;
    color: var(--success-glow);
    background: rgba(80, 200, 120, 0.15);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid var(--success);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    padding: 10px 16px;
    border: 4px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
    background: linear-gradient(180deg, var(--ocean-light) 0%, var(--ocean-medium) 100%);
    color: var(--white);
    text-shadow: 1px 1px 0px var(--black);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.2),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 4px 0 var(--ocean-deepest),
        0 6px 8px var(--shadow);
    transition: all 0.1s;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.3s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.2),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 6px 0 var(--ocean-deepest),
        0 10px 16px var(--shadow);
}

.btn:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.2),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 2px 0 var(--ocean-deepest),
        0 3px 4px var(--shadow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(50%);
}

.btn:disabled:hover::before {
    left: -100%;
}

.btn-small {
    font-size: 14px;
    padding: 10px 16px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--success-glow) 0%, var(--success) 100%);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.3),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 4px 0 #2d8a4a,
        0 6px 8px var(--shadow);
}

.btn-primary:hover {
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.3),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 6px 0 #2d8a4a,
        0 10px 16px var(--shadow),
        0 0 20px rgba(80, 200, 120, 0.4);
}

.btn-secondary {
    background: linear-gradient(180deg, var(--ocean-medium) 0%, var(--ocean-dark) 100%);
}

.btn-danger {
    background: linear-gradient(180deg, var(--danger) 0%, var(--lobster-dark) 100%);
}

.btn-large {
    font-size: 11px;
    padding: 16px 32px;
    width: 100%;
    letter-spacing: 1px;
}

/* ========================================
   ACTION BAR
   ======================================== */
.action-bar {
    margin-bottom: 16px;
}

.action-bar .btn-large {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--black);
    text-shadow: 1px 1px 0px rgba(255,255,255,0.3);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.4),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 4px 0 #8a6b00,
        0 6px 12px var(--shadow);
}

.action-bar .btn-large:hover {
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.4),
        inset 0 -2px 0 rgba(0,0,0,0.2),
        0 6px 0 #8a6b00,
        0 10px 20px var(--shadow),
        0 0 30px rgba(255, 215, 0, 0.4);
}

/* ========================================
   LOG PANEL
   ======================================== */
.log-panel {
    max-height: 160px;
    overflow: hidden;
}

.log-panel h2::before {
    content: "📜";
    font-size: 12px;
}

#game-log {
    max-height: 110px;
    overflow-y: auto;
    font-size: 8px;
    line-height: 1.8;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

#game-log p {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}

#game-log p:first-child {
    animation: newLog 0.5s ease;
}

@keyframes newLog {
    0% { background: rgba(255,255,255,0.2); }
    100% { background: transparent; }
}

#game-log p:last-child {
    border-bottom: none;
}

.log-positive { color: var(--success-glow); }
.log-negative { color: var(--danger); }
.log-warning { color: var(--warning); }

/* Fisherman commentary - special styled messages */
.log-fisherman {
    color: var(--sand);
    font-style: italic;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    background: linear-gradient(135deg,
        rgba(107, 68, 35, 0.4) 0%,
        rgba(74, 55, 40, 0.3) 100%
    );
    border-left: 3px solid var(--wood-medium);
    border-radius: 0 6px 6px 0;
    position: relative;
}

.log-fisherman::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--wood-highlight), var(--wood-dark));
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 15, 30, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(180deg, var(--ocean-medium) 0%, var(--ocean-dark) 100%);
    padding: 24px;
    border: 6px solid var(--black);
    border-radius: 8px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 0 0 3px var(--ocean-light),
        inset 0 2px 0 rgba(255,255,255,0.1),
        0 20px 60px rgba(0,0,0,0.6);
    animation: modalAppear 0.3s ease;
}

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

.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--ocean-deepest);
}

.modal-header h2 {
    font-size: 12px;
    color: var(--gold);
    text-shadow: 2px 2px 0px var(--black);
}

.modal-content > h2 {
    font-size: 14px;
    color: var(--gold);
    text-shadow: 2px 2px 0px var(--black);
    margin-bottom: 16px;
}

.modal-content > p {
    margin-bottom: 20px;
    font-size: 9px;
    line-height: 2.2;
}

/* ========================================
   EQUIPMENT SHOP
   ======================================== */
.equipment-list {
    text-align: left;
}

.equipment-list h3 {
    font-size: 10px;
    color: var(--gold);
    margin: 16px 0 10px 0;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border-left: 4px solid var(--gold);
}

.equipment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 3px solid var(--black);
    border-radius: 4px;
    transition: all 0.2s;
}

.equipment-item:hover {
    border-color: var(--ocean-light);
    transform: translateX(4px);
}

.equipment-item.owned {
    opacity: 0.6;
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(80, 200, 120, 0.1) 0%, var(--ocean-deepest) 100%);
}

.equip-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equip-name {
    font-size: 9px;
    color: var(--cream);
}

.equip-desc {
    font-size: 7px;
    color: var(--ocean-bright);
}

.owned-badge {
    font-size: 7px;
    color: var(--success-glow);
    padding: 6px 10px;
    border: 2px solid var(--success);
    border-radius: 4px;
    background: rgba(80, 200, 120, 0.2);
}

/* ========================================
   BANK
   ======================================== */
.bank-info {
    text-align: left;
    margin-bottom: 20px;
    font-size: 9px;
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 4px;
}

.bank-info p {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bank-info p:last-child {
    border-bottom: none;
}

.bank-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-row {
    display: flex;
    gap: 10px;
}

.bank-row input {
    flex: 1;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    padding: 10px;
    border: 4px solid var(--black);
    border-radius: 4px;
    background: var(--ocean-deepest);
    color: var(--white);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.bank-row input:focus {
    outline: none;
    border-color: var(--ocean-light);
    box-shadow: 0 0 10px rgba(74, 156, 199, 0.3);
}

.bank-row input::placeholder {
    color: var(--ocean-light);
    opacity: 0.5;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor; }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--ocean-deepest);
    border: 2px solid var(--black);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ocean-light) 0%, var(--ocean-medium) 100%);
    border: 2px solid var(--black);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--ocean-bright) 0%, var(--ocean-light) 100%);
}

/* ========================================
   STATS MODAL
   ======================================== */
.stats-content {
    text-align: left;
}

.stats-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ocean-light);
}

.stats-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stats-section h3 {
    font-size: 10px;
    color: var(--gold);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    border-radius: 6px;
    border: 2px solid var(--ocean-medium);
}

.stat-label {
    display: block;
    font-size: 7px;
    color: var(--ocean-foam);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-size: 11px;
    color: var(--cream);
}

.stat-value.positive {
    color: var(--success-glow);
}

.stat-value.negative {
    color: var(--danger);
}

/* ========================================
   RIVALS PANEL
   ======================================== */
.rivals-panel {
    background: linear-gradient(180deg,
        rgba(139, 69, 19, 0.3) 0%,
        rgba(74, 55, 40, 0.4) 100%
    );
}

.rival-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 2px solid var(--wood-medium);
}

.rival-card:last-child {
    margin-bottom: 0;
}

.rival-emoji {
    font-size: 24px;
}

.rival-info {
    flex: 1;
}

.rival-name {
    font-size: 9px;
    color: var(--cream);
    display: block;
}

.rival-stats {
    font-size: 7px;
    color: var(--ocean-foam);
}

.rival-status {
    font-size: 7px;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.rival-status.winning {
    background: var(--danger);
    color: var(--white);
}

.rival-status.losing {
    background: var(--success);
    color: var(--white);
}

.rival-status.tied {
    background: var(--warning);
    color: var(--black);
}

/* Rival log messages */
.log-rival {
    color: var(--warning);
    font-style: italic;
}

.log-rival-action {
    color: var(--danger);
    font-weight: bold;
    background: rgba(255, 100, 100, 0.1);
    padding: 4px 8px;
    margin: 2px 0;
    border-left: 3px solid var(--danger);
    border-radius: 0 4px 4px 0;
}

/* ========================================
   MAP MODAL
   ======================================== */
.map-container {
    display: flex;
    gap: 16px;
}

.map-visual {
    flex: 2;
    position: relative;
    height: 350px;
    background: linear-gradient(180deg,
        var(--ocean-deep) 0%,
        var(--ocean-dark) 50%,
        var(--ocean-medium) 100%
    );
    border: 4px solid var(--black);
    border-radius: 8px;
    overflow: hidden;
}

/* Simplified coastline shape */
.map-coastline {
    position: absolute;
    top: 0;
    left: 0;
    right: 40%;
    bottom: 0;
    background: linear-gradient(135deg,
        #3d6b4f 0%,
        #2d5a3f 30%,
        #1d4a2f 60%,
        #0d3a1f 100%
    );
    clip-path: polygon(
        0% 0%,
        60% 0%,
        70% 15%,
        55% 25%,
        65% 35%,
        50% 45%,
        60% 55%,
        45% 65%,
        55% 75%,
        40% 85%,
        50% 100%,
        0% 100%
    );
}

/* Add some texture to land */
.map-coastline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 60%, rgba(0,0,0,0.15) 0%, transparent 40%);
}

.town-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.town-marker .marker-icon {
    font-size: 20px;
    filter: drop-shadow(2px 2px 2px var(--black));
    display: block;
    transition: transform 0.2s;
}

.town-marker:hover .marker-icon {
    transform: scale(1.3);
}

.town-marker .marker-name {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 7px;
    color: var(--cream);
    background: rgba(0,0,0,0.8);
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.town-marker:hover .marker-name {
    opacity: 1;
}

.town-marker.current-location {
    z-index: 20;
}

.town-marker.current-location .marker-icon {
    animation: currentPulse 1.5s ease-in-out infinite;
}

.town-marker.current-location::after {
    content: "YOU";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6px;
    color: var(--gold);
    background: var(--lobster-dark);
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid var(--gold);
}

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

.town-marker.can-travel {
    cursor: pointer;
}

.town-marker.can-travel:hover .marker-icon {
    filter: drop-shadow(0 0 8px var(--success-glow));
}

.town-marker.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.map-legend {
    flex: 1;
    text-align: left;
}

.map-legend h3 {
    font-size: 10px;
    color: var(--gold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ocean-medium);
}

.town-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.town-item {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 6px;
    border: 2px solid var(--ocean-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.town-item:hover {
    border-color: var(--ocean-light);
    transform: translateX(4px);
}

.town-item.current {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

.town-item.can-travel {
    border-color: var(--success);
}

.town-item.locked {
    opacity: 0.5;
}

.town-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.town-item-emoji {
    font-size: 16px;
}

.town-item-name {
    font-size: 9px;
    color: var(--cream);
}

.town-item-desc {
    font-size: 7px;
    color: var(--ocean-bright);
    margin-bottom: 6px;
}

.town-item-stats {
    display: flex;
    gap: 10px;
    font-size: 7px;
}

.town-item-stats .buy {
    color: var(--success-glow);
}

.town-item-stats .sell {
    color: var(--warning);
}

.town-item-stats .cost {
    color: var(--ocean-foam);
}

.town-item-action {
    margin-top: 8px;
}

.town-item-action .btn {
    width: 100%;
    font-size: 7px;
    padding: 6px;
}

.travel-info {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    font-size: 8px;
}

.travel-requirement {
    color: var(--warning);
}

.travel-info.has-van .travel-requirement {
    color: var(--success-glow);
}

/* ========================================
   BARNACLE BOB POPUP
   ======================================== */
.bob-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--wood-medium) 0%, var(--wood-dark) 100%);
    border: 5px solid var(--black);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 400px;
    z-index: 1000;
    box-shadow:
        0 0 0 3px var(--wood-highlight),
        0 10px 40px rgba(0, 0, 0, 0.6);
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bob-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.bob-avatar {
    font-size: 48px;
    filter: drop-shadow(3px 3px 2px var(--black));
    animation: bobBounce 2s ease-in-out infinite;
}

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

.bob-speech {
    flex: 1;
}

.bob-name {
    font-size: 10px;
    color: var(--gold);
    text-shadow: 2px 2px 0 var(--black);
    margin-bottom: 6px;
}

.bob-message {
    font-size: 9px;
    color: var(--sand);
    line-height: 1.8;
    font-style: italic;
}

.bob-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-family: 'Press Start 2P', cursive;
}

.bob-dismiss:hover {
    opacity: 1;
}

/* ========================================
   EVENT POPUPS
   ======================================== */
.event-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 4px solid var(--black);
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    z-index: 999;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.event-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.event-popup.positive {
    border-color: var(--success);
    box-shadow:
        0 0 0 2px var(--success-glow),
        0 8px 30px rgba(80, 200, 120, 0.3);
}

.event-popup.negative {
    border-color: var(--danger);
    box-shadow:
        0 0 0 2px var(--lobster-glow),
        0 8px 30px rgba(232, 69, 69, 0.3);
}

.event-popup-icon {
    font-size: 32px;
    filter: drop-shadow(2px 2px 2px var(--black));
}

.event-popup-content {
    flex: 1;
}

.event-popup-title {
    font-size: 10px;
    margin-bottom: 4px;
}

.event-popup.positive .event-popup-title {
    color: var(--success-glow);
}

.event-popup.negative .event-popup-title {
    color: var(--danger);
}

.event-popup-message {
    font-size: 8px;
    color: var(--cream);
    line-height: 1.6;
}

/* Stack multiple event popups */
.event-popup:nth-of-type(2) {
    top: 160px;
}

.event-popup:nth-of-type(3) {
    top: 240px;
}

/* Event log styling */
.log-event-positive {
    color: var(--success-glow);
    background: rgba(80, 200, 120, 0.15);
    padding: 6px 10px !important;
    border-left: 3px solid var(--success);
    border-radius: 0 6px 6px 0;
    margin: 4px 0 !important;
}

.log-event-negative {
    color: var(--danger);
    background: rgba(232, 69, 69, 0.15);
    padding: 6px 10px !important;
    border-left: 3px solid var(--danger);
    border-radius: 0 6px 6px 0;
    margin: 4px 0 !important;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 3px solid var(--ocean-medium);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.2, 0.265, 1.2);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 8px;
    color: var(--cream);
    line-height: 1.6;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--ocean-foam);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-family: 'Press Start 2P', cursive;
    padding: 0 4px;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

/* Toast type variants */
.toast-positive,
.toast-event-positive {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(80, 200, 120, 0.2) 0%, var(--ocean-deepest) 100%);
}

.toast-positive .toast-message,
.toast-event-positive .toast-message {
    color: var(--success-glow);
}

.toast-negative,
.toast-event-negative {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(232, 69, 69, 0.2) 0%, var(--ocean-deepest) 100%);
}

.toast-negative .toast-message,
.toast-event-negative .toast-message {
    color: var(--danger);
}

.toast-warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.2) 0%, var(--ocean-deepest) 100%);
}

.toast-warning .toast-message {
    color: var(--warning);
}

.toast-flavor {
    border-color: var(--ocean-bright);
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.15) 0%, var(--ocean-deepest) 100%);
}

.toast-flavor .toast-message {
    color: var(--ocean-bright);
    font-style: italic;
}


/* ========================================
   ACHIEVEMENT POPUP
   ======================================== */
.achievement-popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, var(--ocean-darkest) 0%, var(--ocean-deepest) 100%);
    border: 3px solid var(--gold);
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 10000;
    text-align: center;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
    opacity: 0;
    transform: translateX(-50%) translateY(-40px) scale(0.9);
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.achievement-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 16px;
    background: linear-gradient(45deg, var(--gold), transparent, var(--gold));
    opacity: 0.3;
    z-index: -1;
    animation: achievementGlow 2s ease-in-out infinite;
}

@keyframes achievementGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.achievement-icon {
    font-size: 48px;
    animation: achievementBounce 0.6s ease infinite alternate;
}

@keyframes achievementBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.achievement-info {
    text-align: left;
}

.achievement-unlocked {
    color: var(--gold);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 1.2em;
    color: var(--ocean-foam);
    font-weight: bold;
    margin-bottom: 3px;
}

.achievement-desc {
    color: var(--dock-wood);
    font-size: 0.85em;
    margin-bottom: 5px;
}

.achievement-reward {
    color: var(--success-glow);
    font-weight: bold;
    font-size: 0.9em;
}

/* Tier-specific border colors */
.achievement-popup.tier-bronze {
    border-color: #cd7f32;
    box-shadow: 0 0 30px rgba(205, 127, 50, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.achievement-popup.tier-silver {
    border-color: #c0c0c0;
    box-shadow: 0 0 30px rgba(192, 192, 192, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.achievement-popup.tier-gold {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.achievement-popup.tier-platinum {
    border-color: #e5e4e2;
    box-shadow: 0 0 30px rgba(229, 228, 226, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ========================================
   CAPTAIN STORY MODAL
   ======================================== */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.story-modal .modal-content,
.story-modal .story-content {
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 3px solid var(--dock-wood);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
    animation: storySlideIn 0.4s ease;
}

@keyframes storySlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.story-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.story-header h2 {
    color: var(--gold);
    font-size: 1.3em;
    margin: 0;
}

.story-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--dock-light);
    border-left: 3px solid var(--dock-wood);
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.story-choice {
    background: linear-gradient(90deg, var(--ocean-medium) 0%, var(--ocean-dark) 100%) !important;
    border: 2px solid var(--ocean-foam) !important;
    border-radius: 8px !important;
    padding: 15px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    text-align: left !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.story-choice:hover:not(.disabled) {
    transform: translateX(8px);
    border-color: var(--gold) !important;
    background: linear-gradient(90deg, var(--ocean-light) 0%, var(--ocean-medium) 100%) !important;
}

.story-choice.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.choice-cost {
    font-size: 0.85em;
    color: var(--danger);
    margin-left: 10px;
}

/* ========================================
   VISUAL EFFECTS
   ======================================== */

/* Confetti */
.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Sparkle */
.sparkle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: sparkleAnim 1s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Pulse effect */
.pulse-effect {
    animation: pulseAnim 0.5s ease;
}

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

/* Shake effect */
.shake-effect {
    animation: shakeAnim 0.5s ease;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* Screen flash */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10002;
    animation: flashAnim 0.3s ease forwards;
}

@keyframes flashAnim {
    0% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* Floating animation enhancements */
.floating-gold {
    animation: floatGold 2s ease-in-out infinite;
}

@keyframes floatGold {
    0%, 100% {
        transform: translateY(0);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
    50% {
        transform: translateY(-8px);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }
}

/* Retirement ending styles */
.retirement-ending {
    text-align: center;
}

.ending-story {
    font-style: italic;
    color: var(--dock-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.ending-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.ending-stats p {
    margin: 8px 0;
}

/* Retirement section in Stats modal */
.retirement-section {
    border-top: 2px solid var(--gold);
    padding-top: 15px;
    margin-top: 15px;
}

.retirement-section h3 {
    color: var(--gold);
}

.retirement-intro {
    color: var(--dock-light);
    margin-bottom: 15px;
    font-style: italic;
}

.retirement-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.retirement-option {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--ocean-foam);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.retirement-option.available {
    border-color: var(--gold);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.retirement-option.locked {
    opacity: 0.6;
}

.retirement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.retirement-name {
    font-weight: bold;
    color: var(--ocean-foam);
    text-transform: capitalize;
}

.retirement-option.available .retirement-name {
    color: var(--gold);
}

.retirement-prestige {
    color: var(--gold);
    font-size: 1.1em;
}

.retirement-req {
    font-size: 0.85em;
    color: var(--dock-wood);
    margin-bottom: 10px;
}

.locked-label {
    font-size: 0.85em;
    color: var(--dock-wood);
    font-style: italic;
}

/* Stats Footer */
.stats-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ocean-dark);
    text-align: center;
}

/* Stats Credit */
.stats-credit {
    margin-top: 15px;
    text-align: center;
}

.stats-credit p {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* ========================================
   SCENE ANIMATIONS
   ======================================== */
.scene-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Weather Effects */
.weather-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.weather-effects.rainy {
    background: linear-gradient(180deg, rgba(100, 100, 120, 0.1) 0%, transparent 50%);
}

.weather-effects.stormy {
    background: linear-gradient(180deg, rgba(50, 50, 70, 0.3) 0%, rgba(30, 30, 50, 0.1) 50%);
    animation: stormFlicker 3s ease-in-out infinite;
}

.weather-effects.foggy {
    background: linear-gradient(180deg, rgba(200, 200, 210, 0.2) 0%, rgba(180, 180, 190, 0.1) 100%);
}

@keyframes stormFlicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.7; }
    94% { opacity: 1; }
    96% { opacity: 0.8; }
}

/* Rain drops */
.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, transparent 0%, rgba(174, 194, 224, 0.6) 100%);
    animation: rainFall 0.8s linear infinite;
}

@keyframes rainFall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Storm lightning */
.lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    animation: lightning 0.2s ease-out;
}

@keyframes lightning {
    0% { opacity: 0; }
    10% { opacity: 0.8; }
    20% { opacity: 0.2; }
    30% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* Cloud overlay */
.storm-clouds {
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 30%;
    background:
        radial-gradient(ellipse 100px 60px at 20% 80%, rgba(80, 80, 100, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 120px 70px at 40% 70%, rgba(70, 70, 90, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 90px 50px at 60% 85%, rgba(90, 90, 110, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 110px 65px at 80% 75%, rgba(75, 75, 95, 0.6) 0%, transparent 70%);
    animation: cloudsMove 60s linear infinite;
}

@keyframes cloudsMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

/* Boat Arrival Animation */
.boat-arrival {
    position: absolute;
    bottom: 15%;
    left: -100px;
    display: none;
}

.boat-arrival.active {
    display: block;
    animation: boatSailIn 3s ease-out forwards;
}

.arrival-boat {
    font-size: 48px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    animation: boatBob 1s ease-in-out infinite;
}

@keyframes boatSailIn {
    0% {
        left: -100px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        left: calc(50% - 24px);
        opacity: 1;
    }
}

@keyframes boatBob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.arrival-wake {
    position: absolute;
    bottom: -5px;
    left: -30px;
    width: 60px;
    height: 10px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    animation: wakeSpread 0.5s ease-out infinite;
}

@keyframes wakeSpread {
    0% { transform: scaleX(0.5); opacity: 0.8; }
    100% { transform: scaleX(1.5); opacity: 0; }
}

/* Truck Travel Animation */
.truck-travel {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 60px;
    display: none;
}

.truck-travel.active {
    display: block;
}

.travel-truck {
    position: absolute;
    font-size: 48px;
    top: 0;
    animation: truckDrive 2.5s ease-in-out forwards;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

@keyframes truckDrive {
    0% {
        left: -60px;
        transform: scaleX(1);
    }
    45% {
        left: calc(50% - 24px);
        transform: scaleX(1);
    }
    50% {
        left: calc(50% - 24px);
        transform: scaleX(1);
    }
    55% {
        left: calc(50% - 24px);
        transform: scaleX(1);
    }
    100% {
        left: calc(100% + 60px);
        transform: scaleX(1);
    }
}

.travel-road {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--dock-wood) 0px,
        var(--dock-wood) 20px,
        transparent 20px,
        transparent 30px
    );
    opacity: 0;
}

.truck-travel.active .travel-road {
    animation: roadAppear 2.5s ease-in-out;
}

@keyframes roadAppear {
    0%, 10% { opacity: 0; }
    20% { opacity: 0.5; }
    80% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* Ambient water animation for dock panel */
.dock-panel {
    position: relative;
    overflow: hidden;
}

.dock-panel::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 6px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 156, 199, 0.3) 25%,
        rgba(74, 156, 199, 0.5) 50%,
        rgba(74, 156, 199, 0.3) 75%,
        transparent 100%
    );
    animation: waterWave 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes waterWave {
    0%, 100% { transform: translateX(-25%); }
    50% { transform: translateX(0%); }
}

/* Seagull ambient animation */
.seagull {
    position: absolute;
    font-size: 16px;
    opacity: 0.7;
    animation: seagullFly 20s linear infinite;
}

@keyframes seagullFly {
    0% {
        left: -30px;
        top: 10%;
        transform: scaleX(1);
    }
    49% {
        transform: scaleX(1);
    }
    50% {
        left: calc(100% + 30px);
        top: 15%;
        transform: scaleX(-1);
    }
    100% {
        left: -30px;
        top: 10%;
        transform: scaleX(-1);
    }
}

/* ========================================
   TUTORIAL SYSTEM
   ======================================== */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.tutorial-box {
    position: absolute;
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-deepest) 100%);
    border: 3px solid var(--gold);
    border-radius: 12px;
    padding: 20px 25px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3), 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: tutorialAppear 0.3s ease;
    z-index: 10001;
}

.tutorial-box.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tutorial-box.right {
    top: 50%;
    left: calc(50% + 100px);
    transform: translateY(-50%);
}

.tutorial-box.left {
    top: 50%;
    right: calc(50% + 100px);
    left: auto;
    transform: translateY(-50%);
}

.tutorial-box.top {
    bottom: calc(50% + 50px);
    left: 50%;
    top: auto;
    transform: translateX(-50%);
}

.tutorial-box.bottom {
    top: calc(50% + 50px);
    left: 50%;
    transform: translateX(-50%);
}

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

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tutorial-step {
    background: var(--gold);
    color: var(--ocean-darkest);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: bold;
}

.tutorial-header h3 {
    color: var(--gold);
    margin: 0;
    font-size: 1.1em;
}

.tutorial-message {
    color: var(--ocean-foam);
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-line;
}

.tutorial-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.tutorial-highlight {
    position: absolute;
    border: 3px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px var(--gold);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10000;
}

/* ========================================
   GOAL PROGRESS BAR
   ======================================== */
.goal-row {
    justify-content: center;
    gap: 10px;
}

.goal-label {
    color: var(--dock-wood);
    font-size: 0.85em;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 250px;
}

.goal-bar-container {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--ocean-foam);
}

.goal-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--gold) 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease;
}

.goal-tier {
    color: var(--gold);
    font-size: 0.8em;
    white-space: nowrap;
}

.countdown {
    color: var(--warning);
    font-size: 0.9em;
}

.countdown.urgent {
    color: var(--danger);
    animation: urgentPulse 1s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Helper tip toast (distinct from regular toasts) */
.helper-tip {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, var(--ocean-deepest) 100%);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 12px 20px;
    max-width: 400px;
    color: var(--ocean-foam);
    z-index: 8000;
    animation: tipSlideUp 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

@keyframes tipSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.helper-tip-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: var(--ocean-foam);
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
}

.helper-tip-close:hover {
    opacity: 1;
}

/* Season End Modal */
.season-end-results {
    text-align: center;
}

.season-end-title {
    font-size: 1.5em;
    color: var(--gold);
    margin-bottom: 15px;
}

.season-end-stars {
    font-size: 2em;
    margin: 15px 0;
}

.season-end-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.season-end-stats p {
    margin: 8px 0;
}

.season-end-rank {
    color: var(--gold);
    font-size: 1.2em;
    font-weight: bold;
}

.season-end-nickname {
    color: var(--ocean-foam);
    font-size: 1.1em;
    font-style: italic;
    margin: 10px 0;
}

.speed-run-milestones {
    color: var(--gold);
    font-size: 0.9em;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Victory Screen (Statewide Power) */
.victory-screen {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), transparent);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 20px;
}

.victory-screen .season-end-stars {
    font-size: 2.5em;
    animation: pulse-glow 2s ease-in-out infinite;
}

.victory-message {
    color: var(--gold);
    font-style: italic;
    margin-top: 15px;
    font-size: 1.1em;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px var(--gold); }
    50% { text-shadow: 0 0 25px var(--gold), 0 0 35px var(--gold); }
}

/* ========================================
   FORTUNE TOAST
   ======================================== */
.fortune-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, var(--ocean-dark), var(--ocean-deep));
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 15px 25px;
    color: var(--cream);
    font-size: 14px;
    font-style: italic;
    max-width: 90%;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.fortune-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   PHOTO MODE
   ======================================== */
.photo-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-mode-overlay.show {
    opacity: 1;
}

.photo-mode-active .game-container {
    filter: blur(3px);
}

.photo-frame {
    background: linear-gradient(180deg, #1a3a5c, #0a1628);
    border: 4px solid var(--gold);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.3);
}

.photo-header {
    margin-bottom: 20px;
}

.photo-title {
    display: block;
    font-size: 24px;
    color: var(--gold);
    margin-bottom: 5px;
}

.photo-date {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.photo-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--cream);
}

.photo-nickname {
    font-size: 20px;
    color: var(--gold);
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 0 0 10px var(--gold);
}

.photo-fortune {
    font-size: 12px;
    color: var(--ocean-foam);
    font-style: italic;
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.photo-watermark {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.photo-controls {
    margin-top: 20px;
}

.photo-controls .btn {
    padding: 12px 30px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 500px) {
    .game-header h1 {
        font-size: 10px;
    }

    .status-row {
        font-size: 8px;
        gap: 8px;
    }

    .btn {
        font-size: 7px;
        padding: 8px 12px;
    }

    .btn-large {
        font-size: 9px;
        padding: 12px 20px;
    }

    #buyers-list {
        grid-template-columns: 1fr;
    }
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
    /* Reduce panel padding on mobile */
    .panel {
        padding: 10px;
        margin-bottom: 10px;
    }

    .panel h2 {
        font-size: 10px;
        margin-bottom: 8px;
    }

    /* Smaller boat cards on mobile */
    .boat-card {
        padding: 10px 8px 8px 8px;
        margin-bottom: 6px;
    }

    .boat-header {
        gap: 6px;
        margin-bottom: 6px;
    }

    .boat-emoji {
        font-size: 22px;
    }

    .boat-name {
        font-size: 9px;
    }

    .captain-name {
        font-size: 7px;
    }

    .catch-info {
        font-size: 8px;
    }

    .catch-info p {
        margin: 2px 0;
    }

    .boat-actions {
        gap: 4px;
    }

    .boat-actions .btn {
        font-size: 6px;
        padding: 6px 8px;
    }

    /* Smaller timer bar */
    .boat-timer-bar {
        height: 4px;
    }

    .boat-timer-bar .timer-text {
        font-size: 6px;
    }

    /* Smaller toasts on mobile */
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        padding: 8px 12px;
        gap: 8px;
    }

    .toast-icon {
        font-size: 16px;
    }

    .toast-message {
        font-size: 7px;
    }

    /* Smaller buyer cards on mobile */
    .buyer-card {
        padding: 8px;
    }

    .buyer-info {
        gap: 6px;
    }

    .buyer-emoji {
        font-size: 18px;
    }

    .buyer-name {
        font-size: 9px;
    }

    .buyer-type {
        font-size: 7px;
    }

    .buyer-offer {
        font-size: 7px;
        margin: 4px 0;
    }

    /* Compact tank display */
    .tank-display {
        gap: 10px;
    }

    .tank-visual {
        width: 60px;
        height: 80px;
    }

    .tank-stats {
        font-size: 8px;
    }

    /* Day card improvements */
    .day-card {
        padding: 10px;
    }

    .day-number {
        font-size: 14px;
    }

    .day-location {
        font-size: 8px;
    }

    .day-cash {
        font-size: 12px;
    }

    /* Reduce game log height on mobile */
    #game-log {
        max-height: 80px;
        font-size: 7px;
    }

    #game-log p {
        padding: 4px 6px;
        margin: 2px 0;
    }

    /* Hide decorative elements on mobile */
    .panel::before,
    .panel::after {
        display: none;
    }
}

/* ========================================
   REDUCED MOTION ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Keep essential state changes visible */
    .btn-sticky,
    .btn-ceremony {
        animation: none;
    }

    .hero-sky,
    .hero-ocean,
    .hero-sun,
    .hero-lighthouse::after,
    .hero-lobster-silhouette {
        animation: none;
    }

    .floating,
    .tank-fill,
    .lobster-icons {
        animation: none;
    }

    /* Preserve visual feedback without motion */
    .btn:hover {
        transform: none;
    }

    .modal-content {
        animation: none;
    }
}
