/* ===== BLOBFISK.DK - Ocean Theme ===== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700&display=swap');

:root {
    --ocean-deep: #0a1628;
    --ocean-dark: #0f2744;
    --ocean-mid: #1a4a6e;
    --ocean-light: #2980b9;
    --ocean-surface: #5dade2;
    --blob-pink: #f4a0b0;
    --blob-dark: #d4707f;
    --blob-nose: #c25a6a;
    --sand: #f5deb3;
    --coral: #ff7f50;
    --foam: #e8f4f8;
    --text-light: #ecf0f1;
    --text-dark: #2c3e50;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--ocean-deep);
    color: var(--text-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka One', cursive;
}

/* ===== NAVIGATION ===== */
nav {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--ocean-mid);
}

nav .logo {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--blob-pink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav .logo svg {
    width: 40px;
    height: 32px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
    position: relative;
}

nav ul a:hover {
    color: var(--blob-pink);
}

nav ul a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blob-pink);
    transition: width 0.3s;
}

nav ul a:hover::after {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    background: linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-dark) 40%, var(--ocean-mid) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 30% 50%, rgba(255,255,255,0.2), transparent),
        radial-gradient(3px 3px at 50% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 90% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(3px 3px at 20% 80%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 60% 90%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(255,255,255,0.2), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-blob {
    width: 350px;
    height: 280px;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(244, 160, 176, 0.3));
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--blob-pink), var(--coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin-bottom: 2rem;
    color: var(--foam);
    line-height: 1.8;
}

/* ===== BUBBLES ANIMATION ===== */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: rise linear infinite;
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    100% { transform: translateY(-110vh) scale(0.3); opacity: 0; }
}

.bubble:nth-child(1) { width: 30px; height: 30px; left: 10%; animation-duration: 8s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 20px; height: 20px; left: 25%; animation-duration: 10s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 40px; height: 40px; left: 45%; animation-duration: 7s; animation-delay: 1s; }
.bubble:nth-child(4) { width: 15px; height: 15px; left: 60%; animation-duration: 12s; animation-delay: 3s; }
.bubble:nth-child(5) { width: 25px; height: 25px; left: 75%; animation-duration: 9s; animation-delay: 0.5s; }
.bubble:nth-child(6) { width: 35px; height: 35px; left: 90%; animation-duration: 11s; animation-delay: 4s; }
.bubble:nth-child(7) { width: 18px; height: 18px; left: 35%; animation-duration: 8s; animation-delay: 2.5s; }
.bubble:nth-child(8) { width: 28px; height: 28px; left: 55%; animation-duration: 10s; animation-delay: 1.5s; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blob-pink), var(--coral));
    color: white;
    box-shadow: 0 4px 20px rgba(244, 160, 176, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(244, 160, 176, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--blob-pink);
    border: 2px solid var(--blob-pink);
}

.btn-secondary:hover {
    background: var(--blob-pink);
    color: var(--ocean-deep);
    transform: translateY(-3px);
}

.btn-game {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    font-size: 1.4rem;
    padding: 1.2rem 3rem;
}

.btn-game:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(46, 204, 113, 0.6);
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--blob-pink);
}

/* ===== FACTS SECTION ===== */
.facts {
    background: linear-gradient(180deg, var(--ocean-mid) 0%, var(--ocean-dark) 100%);
    max-width: 100%;
    padding: 5rem 2rem;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--blob-pink);
}

.fact-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--coral);
}

.fact-card p {
    color: var(--foam);
    line-height: 1.7;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--foam);
}

.about-blob {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    animation: float 4s ease-in-out infinite;
}

/* ===== GALLERY ===== */
.gallery {
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-deep) 100%);
    max-width: 100%;
    padding: 5rem 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    text-align: center;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--blob-pink);
}

.gallery-item svg {
    width: 100%;
    height: 200px;
}

.gallery-item p {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--blob-pink);
}

/* ===== GAME PROMO ===== */
.game-promo {
    text-align: center;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 30px;
    padding: 4rem 2rem;
    margin: 3rem auto;
    max-width: 800px;
}

.game-promo h2 {
    color: #2ecc71;
    margin-bottom: 1rem;
}

.game-promo p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--foam);
}

/* ===== FOOTER ===== */
footer {
    background: rgba(10, 22, 40, 0.95);
    border-top: 2px solid var(--ocean-mid);
    text-align: center;
    padding: 2rem;
    color: var(--ocean-surface);
}

footer a {
    color: var(--blob-pink);
    text-decoration: none;
}

/* ===== BLOBFISKPEDIA ===== */
.pedia-hero {
    background: linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-dark) 100%);
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.pedia-hero h1 {
    font-size: 3.5rem;
    color: var(--blob-pink);
    margin-bottom: 1rem;
}

.pedia-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.pedia-section {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pedia-section h2 {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 1.5rem;
    color: var(--coral);
    border-bottom: 2px solid var(--ocean-mid);
    padding-bottom: 0.5rem;
}

.pedia-section p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1rem;
    color: var(--foam);
}

.pedia-section ul {
    list-style: none;
    padding: 0;
}

.pedia-section ul li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--foam);
    line-height: 1.7;
}

.pedia-section ul li::before {
    content: '🐡';
    position: absolute;
    left: 0;
}

.info-box {
    background: rgba(244, 160, 176, 0.1);
    border-left: 4px solid var(--blob-pink);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.info-box h4 {
    color: var(--blob-pink);
    margin-bottom: 0.5rem;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-fact {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.quick-fact .number {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--coral);
}

.quick-fact .label {
    font-size: 0.9rem;
    color: var(--ocean-surface);
    margin-top: 0.3rem;
}

/* ===== GAME PAGE ===== */
.game-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
}

.game-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 2rem;
    background: linear-gradient(180deg, var(--ocean-deep), var(--ocean-dark));
}

.leaderboard-sidebar {
    min-width: 240px;
    max-width: 320px;
    background: rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 2rem 1rem;
    margin-top: 5rem;
    color: var(--blob-pink);
    box-shadow: 0 0 24px rgba(244,160,176,0.12);
}

.leaderboard-sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--blob-pink);
}

@media (max-width: 900px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
    }
    .leaderboard-sidebar {
        margin-top: 2rem;
        width: 100%;
        max-width: 100%;
    }
}

.game-page h1 {
    font-size: 2.5rem;
    color: var(--blob-pink);
    margin-bottom: 0.5rem;
}

.game-page .subtitle {
    color: var(--ocean-surface);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#gameCanvas {
    border: 3px solid var(--ocean-mid);
    border-radius: 12px;
    background: #1a1a2e;
    display: block;
    box-shadow: 0 0 40px rgba(41, 128, 185, 0.3);
    touch-action: none; /* Prevent iOS from intercepting multi-touch */
}

.game-controls {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--ocean-surface);
}

.game-controls kbd {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.game-hud {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
}

.hud-item {
    background: rgba(255,255,255,0.08);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
}

.hud-item .hud-label {
    font-size: 0.8rem;
    color: var(--ocean-surface);
}

.hud-item .hud-value {
    font-size: 1.2rem;
    color: var(--blob-pink);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-blob {
        width: 250px;
        height: 200px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .pedia-hero h1 {
        font-size: 2.5rem;
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== WAVE DIVIDER ===== */
.wave-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}
