/* ══════════════════════════════════════════
   COPYWHALE — SHARED STYLES
   ══════════════════════════════════════════ */

@font-face { font-family:'OpenRunde'; src:url('../fonts/OpenRunde-Medium-BF64ee9c695513a.woff') format('woff'); font-weight:400; }
@font-face { font-family:'OpenRunde'; src:url('../fonts/OpenRunde-Bold-BF64ee9c695513a.woff') format('woff'); font-weight:700; }

:root {
    --bg: #030d1a;
    --card: rgba(8,24,48,0.6);
    --card-border: rgba(0,184,255,0.08);
    --blue: #00b8ff;
    --blue-glow: rgba(0,184,255,0.4);
    --text: #eaf4ff;
    --text-sub: #6a9ec0;
    --text-muted: #3d6d8f;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --rank-unranked: #4a5568;
    --rank-exotic: #ff6ec7;
    --rank-wood: #8B6914;
    --rank-bronze: #cd7f32;
    --rank-silver: #c0c0c0;
    --rank-gold: #ffd700;
    --rank-amethyst: #9b59b6;
    --rank-master: #00e5ff;
}

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

body {
    font-family: 'OpenRunde','Nunito',system-ui,sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── CANVAS OCEAN ── */
canvas#c {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ── SCANLINES ── */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    pointer-events: none;
    z-index: 1;
}

/* ── LOGO TEXT ── */
.logo-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue);
}
.logo-text span { color: var(--text); }

/* ── LOADING SCREEN ── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.loading-screen.active { opacity: 1; visibility: visible; }

.loading-whale-svg {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: swim 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 16px rgba(0,184,255,0.3));
}

.loading-text { font-size: 0.9rem; color: var(--text-sub); letter-spacing: 1px; }
.loading-dots::after { content: ''; animation: dots 1.5s steps(4) infinite; }

.loading-bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.loading-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0,184,255,0.12), rgba(0,184,255,0.03));
    border: 1px solid rgba(0,184,255,0.06);
    animation: lbubble linear infinite;
}

/* ── MODAL OVERLAY (shared) ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,8,18,0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: linear-gradient(160deg, #0a1e32, #061220);
    border: 1.5px solid rgba(0,184,255,0.15);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 420px;
    width: calc(100% - 48px);
    text-align: center;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0,184,255,0.06);
    position: relative;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.modal-sub { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 28px; line-height: 1.5; }

/* ── BUTTONS (shared) ── */
.btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 15px 34px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(180deg, #00ccff 0%, #009ad9 100%);
    color: #001a2e;
    box-shadow: 0 2px 0 #0080b3, 0 4px 0 #006a96, 0 6px 16px rgba(0,0,0,0.4), 0 0 24px var(--blue-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 0 #0080b3, 0 6px 0 #006a96, 0 10px 24px rgba(0,0,0,0.5), 0 0 40px var(--blue-glow); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 0 0 #0080b3, 0 1px 0 #006a96, 0 2px 8px rgba(0,0,0,0.4), 0 0 16px var(--blue-glow); }
.btn-primary::before {
    content: '';
    position: absolute;
    top: 1px; left: 12px; right: 12px;
    height: 50%;
    border-radius: 12px 12px 50% 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    pointer-events: none;
}

.btn-secondary {
    background: rgba(0,60,100,0.2);
    color: var(--text);
    border: 1.5px solid rgba(0,184,255,0.18);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 0 rgba(0,40,70,0.5), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-secondary:hover { border-color: rgba(0,184,255,0.4); background: rgba(0,80,130,0.2); transform: translateY(-2px); box-shadow: 0 4px 0 rgba(0,40,70,0.5), 0 8px 20px rgba(0,0,0,0.35); }
.btn-secondary:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,40,70,0.5), 0 2px 6px rgba(0,0,0,0.3); }
.btn-secondary svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ── PANELS (dashboard) ── */
.panel {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(6px);
}
.panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ── ANIMATIONS ── */
@keyframes swim {
    0%, 100% { transform: translateX(-16px) translateY(4px) rotate(-4deg); }
    30% { transform: translateX(8px) translateY(-10px) rotate(2deg); }
    60% { transform: translateX(16px) translateY(2px) rotate(5deg); }
    80% { transform: translateX(4px) translateY(8px) rotate(-2deg); }
}
@keyframes dots { 0%{content:'';} 25%{content:'.';} 50%{content:'..';} 75%{content:'...';} }
@keyframes lbubble { 0%{transform:translateY(0) scale(0);opacity:0;} 10%{opacity:.6;} 90%{opacity:.6;} 100%{transform:translateY(-100vh) scale(1);opacity:0;} }
@keyframes fu { from{opacity:0;transform:translateY(18px);} to{opacity:1;transform:translateY(0);} }

.fade-in { opacity: 0; animation: fu 0.6s ease forwards; }
.d1{animation-delay:.1s;} .d2{animation-delay:.2s;} .d3{animation-delay:.3s;} .d4{animation-delay:.35s;} .d5{animation-delay:.4s;} .d6{animation-delay:.5s;} .d7{animation-delay:.55s;} .d8{animation-delay:.65s;}
