/* ═══════════════════════════════════════════
   Cliper — Fishing Theme Base Styles
   Ocean cartoon theme with waves and bubbles
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ─── CSS Variables ─── */
:root {
    --color-primary: #1a8cff;
    --color-primary-dark: #0066cc;
    --color-primary-light: #4da6ff;
    --color-secondary: #2ec4b6;
    --color-secondary-dark: #1fa89c;
    --color-accent: #ff6b35;
    --color-accent-dark: #e55a2a;
    --color-gold: #ffd700;
    --color-gem: #a855f7;

    --color-ocean-deep: #0b1e36;
    --color-ocean-mid: #133a5e;
    --color-ocean-light: #1a4f7a;
    --color-sand: #f5e6c8;
    --color-sand-dark: #e8d5a8;
    --color-coral: #ff7f7f;
    --color-seafoam: #7fdbda;

    --color-bg: #e3f0f9;
    --color-bg-dark: #0e2a47;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f7fa;

    --color-text: #1a2b3c;
    --color-text-light: #5a6b7c;
    --color-text-inverse: #ffffff;

    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 50%;

    --shadow-sm: 0 2px 8px rgba(11, 30, 54, 0.08);
    --shadow-md: 0 4px 16px rgba(11, 30, 54, 0.12);
    --shadow-lg: 0 8px 32px rgba(11, 30, 54, 0.18);

    --font-main: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;

    --container-width: 1100px;
    --header-height: 68px;
}

/* ─── Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(126, 219, 218, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(26, 140, 255, 0.1) 0%, transparent 50%);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
}

/* ─── Layout ─── */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ─── Header ─── */
.site-header {
    background: linear-gradient(135deg, var(--color-ocean-deep) 0%, var(--color-ocean-mid) 50%, var(--color-ocean-light) 100%);
    color: var(--color-text-inverse);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(11, 30, 54, 0.3);
}

/* Wave decoration under header */
.site-header::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 200%;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 12' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,12 400,0 600,6 C800,12 1000,0 1200,6 L1200,0 L0,0 Z' fill='%231a4f7a'/%3E%3C/svg%3E") repeat-x;
    background-size: 600px 12px;
    z-index: 1;
    animation: headerWave 8s linear infinite;
}

@keyframes headerWave {
    from { background-position-x: 0; }
    to { background-position-x: 600px; }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-inverse);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.logo:hover {
    color: var(--color-seafoam);
    transform: scale(1.03);
}

.logo-img {
    height: 60px;
    width: auto;
    border-radius: 50%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.nav-admin {
    color: var(--color-accent);
    font-weight: 700;
}

.nav-admin:hover {
    color: #fff;
    background: rgba(255, 107, 53, 0.2);
}

.nav-logout {
    color: rgba(255, 255, 255, 0.5);
}

.nav-currencies {
    display: flex;
    gap: 0.8rem;
    margin-right: 0.8rem;
    padding-right: 0.8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.currency {
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.currency.gold {
    color: var(--color-gold);
}

.currency.gems {
    color: #c084fc;
}

/* ─── Footer ─── */
.site-footer {
    background: var(--color-ocean-deep);
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 1.2rem 0;
    font-size: 0.85rem;
    margin-top: auto;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    width: 200%;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 14' preserveAspectRatio='none'%3E%3Cpath d='M0,14 C200,2 400,14 600,8 C800,2 1000,14 1200,8 L1200,14 L0,14 Z' fill='%230b1e36'/%3E%3C/svg%3E") repeat-x;
    background-size: 600px 14px;
    animation: footerWave 10s linear infinite;
}

@keyframes footerWave {
    from { background-position-x: 0; }
    to { background-position-x: -600px; }
}

/* ─── Toast Notifications (Side Panel) ─── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    min-width: 350px;
    border-left: 5px solid rgba(255, 255, 255, 0.3);
}

.toast-show {
    transform: translateX(0);
}

.toast-hide {
    transform: translateX(100%);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.toast-content {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    color: white;
}

.toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Toast variants */
.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.toast-info {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-left-color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 60px;
        right: 0;
        left: 0;
        max-width: none;
    }

    .toast {
        min-width: auto;
        border-radius: 0;
        margin: 0 10px;
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26, 140, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(26, 140, 255, 0.4);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 2px solid #d0dce5;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #ff8a55 0%, var(--color-accent) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(255, 107, 53, 0.4);
}

.btn-lg {
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ─── Hero Section (Landing Page) ─── */
.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--color-ocean-deep);
}

.highlight {
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    background: var(--color-surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid rgba(26, 140, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    opacity: 0;
    transition: opacity 0.25s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    color: var(--color-ocean-deep);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Auth Forms ─── */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 0;
}

.auth-card {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 430px;
    border: 1px solid rgba(26, 140, 255, 0.06);
}

.auth-card h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    margin-bottom: 0.3rem;
    color: var(--color-ocean-deep);
}

.auth-subtitle {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.7rem 0.9rem;
    border: 2px solid #d0dce5;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 140, 255, 0.12);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ─── Google OAuth Button ─── */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.2rem 0;
    gap: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d0dce5;
}

.auth-divider span {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
    background: #2a2a42;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
    text-decoration: none;
}

.google-icon {
    flex-shrink: 0;
}

/* ─── Upgrades Page ─── */
.upgrades-page {
    padding: 1rem 0;
}

.upgrades-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.upgrades-header h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-ocean-deep);
}

.user-wallet {
    display: flex;
    gap: 1.2rem;
    font-weight: 700;
    font-size: 1rem;
}

.stats-bar {
    display: flex;
    gap: 2rem;
    padding: 0.8rem 1.2rem;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid rgba(26, 140, 255, 0.06);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(26, 140, 255, 0.06);
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, var(--color-ocean-deep), var(--color-ocean-mid));
    color: var(--color-text-inverse);
}

.category-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.bonus-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-per_click {
    background: var(--color-primary);
    color: #fff;
}

.badge-per_second {
    background: var(--color-secondary);
    color: #fff;
}

.tiers-list {
    padding: 0.5rem;
}

.tier-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.tier-item:not(:last-child) {
    border-bottom: 1px solid #eef2f5;
}

.tier-item:hover {
    background: var(--color-surface-alt);
}

.tier-owned {
    background: #f0fdf4;
}

.tier-owned:hover {
    background: #dcfce7;
}

.tier-locked {
    opacity: 0.5;
}

.tier-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tier-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.tier-icon-placeholder {
    font-size: 2rem;
}

.tier-info {
    flex: 1;
    min-width: 0;
}

.tier-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-ocean-deep);
    margin-bottom: 0.15rem;
}

.tier-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 0.3rem;
}

.tier-stats {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.tier-bonus {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.tier-quantity {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    background: #e0f2fe;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
}

.tier-action {
    flex-shrink: 0;
}

.btn-buy {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-owned {
    background: var(--color-success);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
}

.btn-locked {
    background: #94a3b8;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }

    .site-header {
        height: auto;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .nav-currencies {
        border-right: none;
        margin-right: 0;
        padding-right: 0;
        width: 100%;
        justify-content: center;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .tier-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tier-action {
        width: 100%;
    }

    .tier-action .btn {
        width: 100%;
    }

    .stats-bar {
        flex-direction: column;
        gap: 0.3rem;
    }

    .upgrades-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ─── AdSense Side Columns ─── */

.page-with-ads {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex: 1;
    width: 100%;
    padding: 0 1rem;
}

.page-with-ads > main.container {
    flex: 1;
    max-width: var(--container-width);
    margin: 0;
}

.ad-column {
    width: 160px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    align-self: flex-start;
    padding-top: 2rem;
}

.ad-placeholder {
    width: 160px;
    min-height: 600px;
    border: 2px dashed rgba(26, 140, 255, 0.25);
    border-radius: var(--radius-md);
    background: rgba(26, 140, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 0.75rem;
    font-family: var(--font-main);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.6;
}

@media (max-width: 1500px) {
    .ad-column {
        display: none;
    }

    .page-with-ads {
        padding: 0;
    }

    .page-with-ads > main.container {
        margin: 0 auto;
    }
}
