/* ===== CSS Variables - Deep Ocean Theme ===== */
:root {
    --ocean-surface: #0A4D68;
    --ocean-twilight: #053B50;
    --ocean-midnight: #021526;
    --ocean-abyss: #000810;
    
    --whale-white: #E8F4F8;
    --whale-silver: #B8D4E3;
    --whale-glow: #7DD3E8;
    
    --bioluminescent-cyan: #00FFE5;
    --bioluminescent-blue: #00A8FF;
    --bioluminescent-purple: #9B59B6;
    --bioluminescent-pink: #FF6B9D;
    
    --aurora-1: #00ff88;
    --aurora-2: #00d4ff;
    --aurora-3: #8b5cf6;
    
    --text-primary: #E8F4F8;
    --text-secondary: rgba(232, 244, 248, 0.7);
    --text-muted: rgba(232, 244, 248, 0.4);
    
    --glass-bg: rgba(0, 20, 40, 0.6);
    --glass-border: rgba(125, 211, 232, 0.2);
    --glass-highlight: rgba(125, 211, 232, 0.1);
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--ocean-abyss);
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* ===== Canvas ===== */
#whale-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===== Loading Screen ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center bottom, #0d2137 0%, #050d15 50%, #020408 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s var(--transition-smooth), visibility 1.5s;
    overflow: hidden;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Logo Container */
.logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.main-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: logoFloat 4s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
    z-index: 3;
    object-fit: cover;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 211, 232, 0.4) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
    z-index: 1;
}

.logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(125, 211, 232, 0.3);
    border-radius: 50%;
    animation: ringExpand 3s ease-out infinite;
}

.logo-ring { width: 160px; height: 160px; }
.logo-ring.ring-2 { animation-delay: 1s; }
.logo-ring.ring-3 { animation-delay: 2s; }

@keyframes logoFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(125, 211, 232, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(125, 211, 232, 0.8)); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes ringExpand {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Title */
.loader-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(125, 211, 232, 0.5);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.loader-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3em;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Bar */
.loader-bar {
    width: 280px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 2rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bioluminescent-cyan), var(--bioluminescent-blue), var(--bioluminescent-purple));
    border-radius: 2px;
    animation: loading 2.5s ease-out forwards;
    box-shadow: 0 0 20px var(--bioluminescent-cyan);
}

@keyframes loading {
    0% { width: 0%; }
    30% { width: 40%; }
    60% { width: 75%; }
    100% { width: 100%; }
}

/* Stats */
.loader-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    animation: fadeInUp 1s ease-out 1.2s both;
}

.loader-stat {
    text-align: center;
}

.loader-stat .stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--bioluminescent-cyan);
    text-shadow: 0 0 20px rgba(125, 211, 232, 0.5);
}

.loader-stat .stat-txt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
}

/* Bubbles */
.bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.bubble {
    position: absolute;
    bottom: -50px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: bubbleRise 8s ease-in-out infinite;
}

.bubble:nth-child(1) { left: 10%; width: 15px; height: 15px; animation-delay: 0s; animation-duration: 7s; }
.bubble:nth-child(2) { left: 25%; width: 25px; height: 25px; animation-delay: 1s; animation-duration: 9s; }
.bubble:nth-child(3) { left: 40%; width: 12px; height: 12px; animation-delay: 2s; animation-duration: 6s; }
.bubble:nth-child(4) { left: 55%; width: 18px; height: 18px; animation-delay: 0.5s; animation-duration: 8s; }
.bubble:nth-child(5) { left: 70%; width: 22px; height: 22px; animation-delay: 3s; animation-duration: 10s; }
.bubble:nth-child(6) { left: 85%; width: 14px; height: 14px; animation-delay: 1.5s; animation-duration: 7s; }
.bubble:nth-child(7) { left: 95%; width: 10px; height: 10px; animation-delay: 2.5s; animation-duration: 6s; }

@keyframes bubbleRise {
    0% { 
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.3; }
    100% { 
        transform: translateY(-100vh) translateX(30px) scale(0.5);
        opacity: 0;
    }
}

/* ===== UI Overlay ===== */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* ===== Top Navigation ===== */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 20, 40, 0.8) 0%, transparent 100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 0 10px var(--whale-glow));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 10px var(--whale-glow)); }
    50% { filter: drop-shadow(0 0 25px var(--bioluminescent-cyan)); }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(125, 211, 232, 0.5);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--glass-highlight);
    border-color: var(--whale-glow);
    box-shadow: 0 0 30px rgba(125, 211, 232, 0.3);
    transform: translateY(-2px);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    font-weight: 400;
    box-shadow: 0 4px 20px rgba(0, 255, 229, 0.3);
}

.nav-btn.primary:hover {
    box-shadow: 0 6px 30px rgba(0, 255, 229, 0.5);
    transform: translateY(-3px);
}

.nav-btn.primary.connected {
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    font-size: 0.85rem;
}

#sound-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ===== Depth Indicator ===== */
.depth-indicator {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.depth-bar {
    width: 6px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.depth-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    max-height: 100%;
    background: linear-gradient(180deg, 
        var(--bioluminescent-purple) 0%,
        var(--bioluminescent-blue) 50%,
        var(--bioluminescent-cyan) 100%
    );
    border-radius: 3px;
    transition: height 0.3s var(--transition-smooth);
    box-shadow: 0 0 20px var(--bioluminescent-cyan);
}

.depth-markers {
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.depth-value {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.depth-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--whale-glow);
    text-shadow: 0 0 30px var(--bioluminescent-cyan);
}

.depth-unit {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ===== Whale Count ===== */
.whale-count {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
}

.count-number {
    display: block;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 30px rgba(125, 211, 232, 0.5);
}

.count-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ===== Instructions ===== */
.instructions {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fade-pulse 3s ease-in-out infinite;
}

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

.instructions p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.scroll-indicator {
    margin-top: 1rem;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 13px;
    margin: 0 auto;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--whale-glow);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--bioluminescent-cyan);
}

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

.instructions.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 8, 16, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(5, 59, 80, 0.95) 0%, rgba(2, 21, 38, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s var(--transition-bounce);
    box-shadow: 
        0 0 100px rgba(0, 255, 229, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-whale {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--whale-glow));
}

.auth-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Auth Tabs ===== */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s var(--transition-smooth);
}

.auth-tab:hover {
    color: var(--text-secondary);
}

.auth-tab.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(125, 211, 232, 0.2);
}

/* ===== Auth Forms ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.form-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s var(--transition-smooth);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--whale-glow);
    box-shadow: 0 0 20px rgba(125, 211, 232, 0.2);
}

.auth-submit {
    position: relative;
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
    margin-top: 0.5rem;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 255, 229, 0.4);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.auth-submit:hover .btn-glow {
    left: 100%;
}

/* ===== Wallet Options ===== */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.wallet-btn:hover {
    border-color: var(--whale-glow);
    background: var(--glass-highlight);
    transform: translateX(5px);
}

.wallet-btn img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.wallet-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ===== User Panel ===== */
.user-panel {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    min-width: 280px;
}

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

.user-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.user-whale-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--whale-white), var(--whale-glow));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--whale-glow);
}

.user-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
}

.user-tier {
    font-size: 0.8rem;
    color: var(--bioluminescent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.user-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.upgrade-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    margin-bottom: 0.75rem;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 229, 0.4);
}

.upgrade-cost {
    opacity: 0.8;
    font-size: 0.85rem;
}

.customize-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.customize-btn:hover {
    border-color: var(--whale-glow);
    color: var(--text-primary);
}

/* ===== Customize Panel ===== */
.customize-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    min-width: 360px;
    z-index: 200;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.panel-close:hover {
    color: var(--text-primary);
}

.customize-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.color-options {
    display: flex;
    gap: 0.75rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 20px currentColor;
}

.color-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.glow-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, transparent, var(--bioluminescent-cyan));
    border-radius: 4px;
    outline: none;
}

.glow-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px var(--bioluminescent-cyan);
}

.trail-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trail-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.trail-btn:hover {
    border-color: var(--whale-glow);
}

.trail-btn.active {
    background: var(--glass-highlight);
    border-color: var(--whale-glow);
    color: var(--text-primary);
}

.trail-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.save-customize {
    width: 100%;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    border: none;
    border-radius: 10px;
    padding: 0.875rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.save-customize:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4);
}

/* ===== Aurora Effect (for whale songs) ===== */
.aurora-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 2s;
}

.aurora-overlay.active {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .top-nav {
        padding: 1rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .depth-indicator {
        left: 1rem;
    }
    
    .depth-markers {
        display: none;
    }
    
    .depth-number {
        font-size: 2rem;
    }
    
    .whale-count {
        right: 1rem;
    }
    
    .count-number {
        font-size: 2.5rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .user-panel {
        right: 1rem;
        bottom: 1rem;
        min-width: auto;
        width: calc(100% - 2rem);
    }
    
    .customize-panel {
        width: calc(100% - 2rem);
        min-width: auto;
    }
}

/* ===== Animations ===== */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--whale-glow); }
    50% { box-shadow: 0 0 40px var(--bioluminescent-cyan); }
}

/* ===== Creature Info Panel ===== */
.creature-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    min-width: 320px;
    z-index: 300;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.creature-preview {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 20px var(--whale-glow));
    animation: float 3s ease-in-out infinite;
}

.creature-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.creature-stats {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.stat-row .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-row .stat-value {
    color: var(--text-primary);
    font-weight: 400;
    transition: color 0.3s ease;
}

.buy-creature-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    margin-bottom: 0.75rem;
}

.buy-creature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 229, 0.4);
}

.sell-creature-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    margin-bottom: 0.75rem;
}

.sell-creature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.view-owner-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s;
}

.view-owner-btn:hover {
    border-color: var(--whale-glow);
    color: var(--text-primary);
}

/* ===== Shop Button ===== */
.shop-button {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ocean-abyss);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.3);
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

.shop-button:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.5);
}

.shop-button span:first-child {
    font-size: 1.3rem;
}

/* ===== My Creatures Button ===== */
.my-creatures-button {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(0, 168, 255, 0.3);
    border: 1px solid rgba(0, 168, 255, 0.5);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

.my-creatures-button:hover {
    background: rgba(0, 168, 255, 0.5);
    border-color: rgba(0, 168, 255, 0.8);
    transform: translateY(-2px);
}

.my-creatures-button.active {
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    color: var(--ocean-abyss);
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(0, 255, 229, 0.3);
}

/* ===== Claim Button ===== */
.claim-button {
    position: absolute;
    bottom: 9rem;
    left: 2rem;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: #00ff88;
    backdrop-filter: blur(10px);
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(255, 215, 0, 0.6); }
}

.claim-button:hover {
    transform: translateY(-2px);
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.7);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

.claim-button .claim-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
}

.claim-button .claim-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.claim-button .claim-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0, 255, 136, 0.6);
}

.claim-button #claimable-amount {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ===== Social Float ===== */
.social-float {
    position: fixed;
    bottom: 2.45rem;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

.social-float:hover {
    color: #fff;
    transform: scale(1.1);
}

.social-float svg {
    width: 22px;
    height: 22px;
}

/* ===== Collection Modal ===== */
.collection-content {
    max-width: 420px;
    text-align: center;
}

.collection-header {
    margin-bottom: 1.5rem;
}

.collection-avatar {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 20px var(--whale-glow));
    animation: float 3s ease-in-out infinite;
}

.collection-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.collection-address {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}

.collection-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.collection-stat {
    text-align: center;
}

.collection-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--bioluminescent-cyan);
}

.collection-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.collection-creatures {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.collection-creature-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.collection-creature-icon:hover {
    border-color: var(--whale-glow);
    transform: scale(1.1);
}

.collection-view-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s var(--transition-smooth);
}

.collection-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 229, 0.4);
}

/* ===== Coming Soon Button ===== */
.coming-soon-button {
    position: fixed;
    bottom: 2rem;
    right: 5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(125, 211, 232, 0.2);
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

.coming-soon-button:hover {
    background: rgba(125, 211, 232, 0.1);
    border-color: rgba(125, 211, 232, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ===== Coming Soon Modal ===== */
.coming-soon-content {
    max-width: 500px;
}

.coming-soon-header {
    text-align: center;
    margin-bottom: 2rem;
}

.coming-soon-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(125, 211, 232, 0.2), rgba(0, 168, 255, 0.2));
    border: 1px solid rgba(125, 211, 232, 0.3);
    color: var(--bioluminescent-cyan);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.coming-soon-header h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.coming-soon-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.coming-soon-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.coming-soon-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s var(--transition-smooth);
}

.coming-soon-item:hover {
    border-color: rgba(125, 211, 232, 0.3);
    background: rgba(125, 211, 232, 0.05);
    transform: translateX(5px);
}

.coming-soon-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(125, 211, 232, 0.4);
    width: 40px;
    flex-shrink: 0;
}

.coming-soon-info {
    flex: 1;
}

.coming-soon-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.coming-soon-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.coming-soon-status {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    flex-shrink: 0;
}

.coming-soon-status.planned {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

.coming-soon-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.coming-soon-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.social-link svg {
    opacity: 0.7;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(125, 211, 232, 0.3);
    color: var(--text-primary);
}

.social-link:hover svg {
    opacity: 1;
}

/* ===== Shop Modal ===== */
.shop-content {
    max-width: 700px;
}

.shop-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shop-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.shop-header p {
    color: var(--text-secondary);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shop-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s var(--transition-smooth);
}

.shop-item:hover {
    border-color: var(--whale-glow);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.shop-item.featured {
    border-color: var(--bioluminescent-cyan);
    background: rgba(0, 255, 229, 0.1);
}

.shop-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.shop-name {
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.shop-price {
    color: var(--bioluminescent-cyan);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.shop-apy {
    color: var(--aurora-1);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.shop-buy-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    border: none;
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--ocean-abyss);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.shop-buy-btn:hover {
    box-shadow: 0 5px 20px rgba(0, 255, 229, 0.4);
}

.shop-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.shop-footer span {
    color: var(--bioluminescent-cyan);
    font-weight: 500;
}

@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .creature-panel {
        width: calc(100% - 2rem);
        min-width: auto;
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Confirmation Modal ===== */
.confirm-content {
    max-width: 400px;
    text-align: center;
    padding: 2.5rem;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 0.5s ease-out;
}

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

.confirm-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.confirm-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.confirm-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.confirm-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.confirm-details .detail-row:last-child {
    border-bottom: none;
}

.confirm-details .detail-label {
    color: var(--text-muted);
}

.confirm-details .detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.confirm-details .detail-value.highlight {
    color: var(--bioluminescent-cyan);
}

.confirm-buttons {
    display: flex;
    gap: 1rem;
}

.confirm-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.confirm-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.confirm-btn.accept {
    background: linear-gradient(135deg, var(--bioluminescent-cyan), var(--bioluminescent-blue));
    color: var(--ocean-abyss);
}

.confirm-btn.accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 229, 0.3);
}

.confirm-btn.accept.sell {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

.confirm-btn.accept.sell:hover {
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* ===== Toast Notifications ===== */
#toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: rgba(0, 20, 40, 0.95);
    border: 1px solid rgba(125, 211, 232, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    backdrop-filter: blur(20px);
    animation: toastIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success {
    border-color: rgba(0, 255, 136, 0.4);
}

.toast.error {
    border-color: rgba(255, 107, 107, 0.4);
}

.toast-icon {
    font-size: 1.2rem;
}

@keyframes toastIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

