/* ===== CrabFun — Global Styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #023e8a;
    --bg-mid: #0077b6;
    --bg-light: #00b4d8;
    --accent: #ff6b35;
    --accent-hover: #e85d2a;
    --gold: #ffd60a;
    --gold-glow: #ffc300;
    --text-light: #ffffff;
    --text-dark: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.12);
    --card-border: rgba(255, 255, 255, 0.2);
    --success: #06d6a0;
    --danger: #ef476f;
    --font: 'Fredoka', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,0.25);
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 40%, var(--bg-light) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    outline: none;
}

/* --- Bubbles Background --- */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -80px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    animation: bubbleRise linear infinite;
}

.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 25px; height: 25px; left: 25%; animation-duration: 16s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 60px; height: 60px; left: 40%; animation-duration: 20s; animation-delay: 4s; }
.bubble:nth-child(4) { width: 35px; height: 35px; left: 55%; animation-duration: 14s; animation-delay: 1s; }
.bubble:nth-child(5) { width: 20px; height: 20px; left: 70%; animation-duration: 18s; animation-delay: 3s; }
.bubble:nth-child(6) { width: 50px; height: 50px; left: 85%; animation-duration: 22s; animation-delay: 5s; }
.bubble:nth-child(7) { width: 30px; height: 30px; left: 15%; animation-duration: 15s; animation-delay: 6s; }
.bubble:nth-child(8) { width: 45px; height: 45px; left: 60%; animation-duration: 19s; animation-delay: 7s; }

@keyframes bubbleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-110vh) scale(0.4);
        opacity: 0;
    }
}

/* --- Header / Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(2, 62, 138, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-crab {
    font-size: 2rem;
    animation: logoBounce 2s ease-in-out infinite;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(-5deg); }
    75% { transform: translateY(-4px) rotate(5deg); }
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition);
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid transparent;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* --- Main Container --- */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(8px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-glow) 100%);
    color: var(--text-dark);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(6, 214, 160, 0.95);
    color: var(--text-dark);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    animation: toastIn 0.4s ease forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 350px;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* --- Mute Button --- */
.mute-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    color: var(--text-light);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* --- Crab Party Banner --- */
.party-banner {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 99;
    background: linear-gradient(90deg, #ff6b35, #ffd60a, #ff6b35);
    background-size: 200% 100%;
    animation: partyShimmer 1s linear infinite;
    color: var(--text-dark);
    text-align: center;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    display: none;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
}

.party-banner.active {
    display: block;
}

@keyframes partyShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .main-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
