/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: linear-gradient(180deg, #87CEEB 0%, #1E90FF 50%, #0047AB 100%);
    min-height: 100vh;
    user-select: none;
    /* Prevent text highlighting */
    -webkit-user-select: none;
}

/* ===== Game Container ===== */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    cursor: crosshair;
    /* Show a crosshair cursor or default */
}

/* ===== Ocean Background ===== */
#ocean {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            #87CEEB 0%,
            #5BA3D9 15%,
            #2E7DB8 30%,
            #1A5A8A 50%,
            #0D3B5C 75%,
            #06243A 100%);
    z-index: 1;
}

/* ===== Bubbles ===== */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -50px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    border-radius: 50%;
    animation: rise linear infinite;
    opacity: 0.6;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

/* ===== Score Panel ===== */
#score-panel {
    position: fixed;
    top: 90px;
    left: 20px;
    transform: none;
    /* Removed centering */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    /* backdrop-filter: blur(10px); REMOVED - settings should not be blurred */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 15px 50px;
    /* Wider padding for center look */
    z-index: 100;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.score-label {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

#score {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 42px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== Game Area ===== */
#game-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
}

/* ===== Fish Styles ===== */
.fish {
    position: absolute;
    cursor: pointer;
    transition: transform 0.1s ease;
    z-index: 60;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.3));
}

.fish:hover {
    transform: scale(1.1);
}

.fish:active {
    transform: scale(0.9);
}

.fish.caught {
    animation: caught 0.4s ease-out forwards;
}

@keyframes caught {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5) rotate(20deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Golden Fish Variant */
.golden-fish {
    filter: drop-shadow(0 0 20px gold) drop-shadow(0 0 10px #FFD700) !important;
    animation: golden-pulse 2s ease-in-out infinite;
}

@keyframes golden-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 20px gold) drop-shadow(0 0 10px #FFD700);
    }

    50% {
        filter: drop-shadow(0 0 30px gold) drop-shadow(0 0 20px #FFD700);
    }
}

/* ===== Point Popup ===== */
.point-popup {
    position: absolute;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.5);
    pointer-events: none;
    animation: pointFloat 1s ease-out forwards;
    z-index: 200;
}

@keyframes pointFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(1.5);
        opacity: 0;
    }
}

/* ===== Start Screen ===== */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 36, 58, 0.95), rgba(30, 144, 255, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 500;
    text-align: center;
}

#start-screen h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 64px;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.mode-select {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.mode-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#start-btn-normal {
    background: linear-gradient(135deg, #4FC3F7, #0288D1);
    color: white;
}

#start-btn-hardcore {
    background: linear-gradient(135deg, #FF5252, #D32F2F);
    color: white;
}

.mode-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

.hint {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    font-weight: bold;
}

.leaderboard-preview {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    color: white;
    min-width: 300px;
}

.leaderboard-preview h3 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 24px;
}

#lb-preview-content p {
    font-size: 18px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

#lb-preview-content span {
    font-weight: bold;
    color: #4DB6AC;
}

/* ===== Sign In Link ===== */
.signin-link {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.signin-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.signin-link.logged-in {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: transparent;
}

/* ===== Game Over Screen ===== */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.85);
    /* Red Wasted style */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    text-align: center;
    animation: fadeInRed 0.5s ease-out;
}

@keyframes fadeInRed {
    from {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }

    to {
        opacity: 1;
        background: rgba(139, 0, 0, 0.85);
    }
}

.wasted-text {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 100px;
    color: #FF0000;
    /* Deep Red */
    text-shadow: 4px 4px 0px #330000, 0 0 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 5px;
}

#death-reason {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 32px;
    color: white;
    margin-bottom: 30px;
    font-style: italic;
}

.final-score {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 40px;
    color: #FFD700;
    margin-bottom: 40px;
}

.game-over-buttons button,
#win-title-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    padding: 12px 30px;
    margin: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: white;
    color: #333;
    transition: transform 0.2s;
}

.game-over-buttons button:hover,
#win-title-btn:hover {
    transform: scale(1.05);
}

/* ===== Win Screen ===== */
#win-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 140, 0, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#win-screen h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 50px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.speedrun-time {
    font-size: 32px;
    color: #333;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* ===== Crosshair ===== */
#crosshair {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    /* Center on mouse */
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 9999;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transition: transform 0.05s ease;
    display: block;
}

#crosshair.clicking {
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.3);
    border-color: #00FF00;
}

/* ===== UI Buttons ===== */
#pause-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 100, 200, 0.8) !important; /* Blue like settings button */
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50%;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer;
    z-index: 3000; /* Above blur overlay */
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

#help-btn {
    position: fixed !important;
    top: 80px !important; /* Below pause button */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(0, 100, 200, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 3000 !important; /* Above blur overlay */
}

#multiplayer-btn {
    position: fixed;
    top: 140px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer;
    z-index: 99999;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent;
}

#pause-btn:hover, #help-btn:hover, #multiplayer-btn:hover {
transform: scale(1.1);
box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* ===== Simple Multiplayer Modal ===== */
.multiplayer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.multiplayer-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.multiplayer-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.signin-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.signin-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signin-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.multiplayer-header h2 {
    color: white;
    margin: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.multiplayer-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.multiplayer-tab-content {
    height: 400px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    padding: 20px;
    color: white;
}

.tab-pane.active {
    display: block;
}

.lobby-actions {
    text-align: center;
    padding: 20px;
}

.lobby-code {
    margin-top: 20px;
}

.lobby-code label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.lobby-code input {
    padding: 10px;
    border: none;
    border-radius: 8px;
    margin-right: 10px;
    width: 150px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.current-lobby {
    text-align: center;
    padding: 20px;
}

.current-lobby h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

.lobby-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.lobby-info p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.9);
}

.lobby-players-list {
    max-height: 200px;
    overflow-y: auto;
}

.friends-section {
    margin-bottom: 30px;
}

.friends-section h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
}

.player-name {
    font-weight: 600;
    color: #FFD700;
}

.player-status.online {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #6c757d;
    color: white;
}

.no-requests {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 20px;
}

.chat-container {
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px 10px 0 0;
}

.chat-title {
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 3px solid #FFD700;
    transition: all 0.3s ease;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

.chat-message.system-message {
    border-left-color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
}

.chat-message.user-message {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.chat-username {
    font-weight: 600;
    color: #FFD700;
    margin-right: 8px;
    font-size: 14px;
}

.chat-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    line-height: 1.4;
    display: block;
    margin-top: 4px;
}

.chat-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 6px;
    text-align: right;
}

.chat-input-wrapper {
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.emoji-btn {
    background: rgba(102, 126, 234, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    color: #667eea;
}

.emoji-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: scale(1.1);
}

.emoji-picker {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-width: 200px;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
}

.emoji-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.2);
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #FFD700;
}

.chat-input:disabled {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.6;
}

.chat-input:disabled::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.send-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-icon {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.send-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

.send-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2) !important;
}

/* Auth Notification Buttons */
.auth-notification-content p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.4;
}

.auth-notification-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.auth-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.auth-btn.yes {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-btn.yes:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.auth-btn.no {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn.no:hover {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    transform: translateY(-1px);
}

/* Password Reset Section */
.password-reset-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reset-section-title {
    color: #FFD700;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: center;
}

.reset-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#reset-code-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    text-align: center;
    letter-spacing: 2px;
}

#reset-code-input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 255, 255, 0.15);
}

#reset-code-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: normal;
}

.reset-submit-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.reset-email-section {
    margin-top: 10px;
    text-align: center;
}

.reset-email-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.reset-email-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.show-code-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    padding: 6px 12px;
    margin-left: 10px;
}

.show-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-primary {
    background: #27ae60;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

/* ===== Authentication Overlay ===== */
.auth-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.auth-container h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #667eea;
    font-size: 32px;
    margin-bottom: 20px;
}

.auth-container p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-primary, .btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 10px;
    width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* ===== User Bar ===== */
.user-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 30, 60, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ===== Mobile Controls ===== */
#mobile-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* Hidden by default, only shown on mobile */
    flex-direction: column;
    gap: 10px;
    z-index: 3000; /* Above blur overlay */
}

#mobile-controls.show {
    display: flex;
}

#catch-btn, #inventory-btn {
    width: 60px;
    height: 60px;
    background: rgba(0, 150, 0, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50%;
    color: white !important;
    font-size: 28px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#inventory-btn {
    background: rgba(0, 100, 200, 0.8) !important;
}

#catch-btn:hover, #inventory-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

#catch-btn:active, #inventory-btn:active {
    transform: scale(0.95);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    #mobile-controls.show {
        display: flex !important;
    }
}

/* ===== Pause Menu ===== */
#pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    /* Much lighter tint */
    backdrop-filter: blur(5px);
    /* A little blur */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#pause-menu h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 60px;
    color: white;
    margin-bottom: 40px;
    letter-spacing: 5px;
}

#resume-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 32px;
    padding: 15px 50px;
    border: none;
    border-radius: 50px;
    background: #FFD700;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 20px;
    /* Add spacing between buttons */
}

#pause-title-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    padding: 12px 40px;
    border: none;
    border-radius: 50px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s;
}

#pause-title-btn:hover {
    transform: scale(1.1);
    filter: brightness(0.95);
}

#resume-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* ===== Settings Menu ===== */
#settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    z-index: 3000; /* Above blur overlay */
    backdrop-filter: blur(5px);
    transition: transform 0.2s;
}

#settings-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.4);
}

#settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 30, 60, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    width: 350px;
    z-index: 3000; /* Above blur overlay */
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: none !important; /* Explicitly remove any blur */
    -webkit-backdrop-filter: none !important; /* Safari support */
}

#settings-menu h2 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 32px;
}

.setting-row {
    margin-bottom: 20px;
    text-align: left;
}

.setting-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 18px;
}

.setting-row input[type="range"] {
    width: 100%;
    accent-color: #FFD700;
}

.close-settings-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    padding: 10px 30px;
    border: none;
    border-radius: 30px;
    background: #4FC3F7;
    color: white;
    cursor: pointer;
    margin-top: 10px;
}

.close-settings-btn:hover {
    filter: brightness(1.1);
}

.disabled-setting {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.setting-group {
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

#settings-menu select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: bold;
    margin-top: 5px;
}

/* ===== Troll Screen ===== */
#troll-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
    text-align: center;
    transition: background 1s ease;
}

#troll-screen.trolled {
    background: linear-gradient(135deg, #FF0000, #990000);
    /* Scary Red */
}

#troll-screen h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 60px;
    color: #FFD700;
    margin-bottom: 20px;
}

#troll-screen.trolled h1 {
    color: white;
    /* Switch to white on red bg */
}

#troll-screen h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 32px;
    margin-bottom: 40px;
}

.troll-msg {
    font-size: 40px;
    font-weight: bold;
    color: #FFD700;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

#troll-resume-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    background: white;
    color: #333;
    cursor: pointer;
    margin-top: 30px;
    transition: transform 0.2s;
}

#troll-resume-btn:hover {
    transform: scale(1.05);
}

/* ===== Dock Arrow ===== */
#dock-arrow {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 150;
    cursor: pointer;
    animation: bounce 1s ease-in-out infinite;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

#dock-arrow span {
    font-size: 32px;
    display: block;
}

#dock-arrow p {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: white;
    margin: 5px 0 0 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* ===== Dock Scene ===== */
#dock-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 105, 180, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 165, 0, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 40% 90%, rgba(138, 43, 226, 0.2) 0%, transparent 45%),
        linear-gradient(180deg, #1E90FF 0%, #00CED1 30%, #20B2AA 60%, #2E8B57 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dock-background {
    text-align: center;
    padding: 40px;
}

.dock-background h1 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 48px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 40px;
}

.dock-boats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.boat {
    background: #8B4513;
    border: 4px solid #654321;
    border-radius: 20px;
    padding: 30px 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.boat:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.boat span {
    font-size: 64px;
    display: block;
}

.boat p {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    color: white;
    margin: 15px 0 0 0;
}

#return-fishing-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    background: #4FC3F7;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

#return-fishing-btn:hover {
    transform: scale(1.05);
}

/* ===== Shop Menu ===== */
#shop-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 30, 60, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    width: 400px;
    z-index: 2500;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#shop-menu h2 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 32px;
}

.shop-items {
    margin-bottom: 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.item-name {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 20px;
    color: #FFD700;
    display: block;
    margin-bottom: 5px;
}

.item-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.buy-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.buy-btn:hover {
    transform: scale(1.05);
}

.buy-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===== Sell Menu ===== */
#sell-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 30, 60, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2500;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#sell-menu h2 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 32px;
}

#inventory-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

#inventory-display p {
    color: rgba(255, 255, 255, 0.6);
}

.sell-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#sell-all-btn {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    padding: 10px 30px;
    border: none;
    border-radius: 30px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
}

#sell-all-btn:hover {
    filter: brightness(1.1);
}

#coins-display {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    color: #FFD700;
}