/* 🐬 Kun.app — Ocean gradient + Dark/Gold theme toggle */

/* ── Ocean Dark Theme (default) ─────── */
:root, [data-theme="ocean"] {
    --gradient-start: #0a1628;
    --gradient-mid: #0d2847;
    --gradient-end: #0a1a2e;
    --bg: #0e1a2c;
    --surface: #152238;
    --border: #1e3a5f;
    --gold: #d4b450;
    --gold-dim: #8a7030;
    --green: #4caf50;
    --red: #e53935;
    --text: #c8d8f0;
    --text-dim: #5a7a9a;
    --accent: #1e90c8;
    --radius: 8px;
    --wave-color: rgba(30, 144, 200, 0.08);
}

/* ── Gold Light Theme ───────────────── */
[data-theme="gold"] {
    --gradient-start: #1a1200;
    --gradient-mid: #2d1f00;
    --gradient-end: #1a1000;
    --bg: #1c1400;
    --surface: #2a1f08;
    --border: #4a3820;
    --gold: #f0c040;
    --gold-dim: #c09030;
    --green: #4caf50;
    --red: #e53935;
    --text: #e8dcc0;
    --text-dim: #8a7040;
    --accent: #f0a020;
    --radius: 8px;
    --wave-color: rgba(240, 192, 64, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* ── Ocean waves overlay ────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, var(--wave-color) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--wave-color) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, var(--wave-color) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: wavePulse 8s ease-in-out infinite alternate;
}

@keyframes wavePulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* ── Theme Toggle ───────────────────── */
.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 0.3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.theme-toggle button {
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%; border: none;
    cursor: pointer; font-size: 1.2rem;
    transition: all 0.3s;
    background: transparent;
}
.theme-toggle button.active {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}
.theme-toggle button:hover { background: var(--border); }

/* ── Navigation ─────────────────────── */
nav.top-nav {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(21, 34, 56, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
[data-theme="gold"] nav.top-nav {
    background: rgba(42, 31, 8, 0.9);
}
.logo {
    font-size: 1.4rem; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), #fff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex; align-items: center; gap: 0.5rem;
}
.logo-icon { font-size: 1.6rem; -webkit-text-fill-color: initial; }
.sub { color: var(--text-dim); font-size: 0.85rem; margin-left: 0.5rem; }
.nav-links { margin-left: auto; display: flex; gap: 0.25rem; }
.nav-links a {
    padding: 0.5rem 1rem; border-radius: var(--radius);
    color: var(--text-dim); text-decoration: none; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--accent); color: #fff;
}

/* ── Layout ─────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; position: relative; z-index: 1; }

/* ── Cards ──────────────────────────── */
.card {
    background: rgba(21, 34, 56, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem;
    transition: border-color 0.3s;
}
.card:hover { border-color: var(--accent); }
[data-theme="gold"] .card { background: rgba(42, 31, 8, 0.8); }
.card h2 { color: var(--gold); margin-bottom: 0.75rem; font-size: 1.15rem; }
.card.alert { border-color: var(--gold-dim); background: rgba(180, 130, 50, 0.1); }

/* ── Stats grid ─────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat {
    background: rgba(14, 26, 44, 0.6); border-radius: var(--radius);
    padding: 0.75rem; text-align: center;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}
.stat:hover { border-color: var(--accent); }
.stat .label { display: block; font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { display: block; font-size: 1.25rem; font-weight: 700; margin-top: 0.25rem; }
.stat .value.highlight { color: var(--green); }

/* ── Forms ──────────────────────────── */
form { display: flex; flex-direction: column; gap: 0.6rem; }
input, select, button {
    padding: 0.6rem 0.75rem; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font-size: 0.9rem; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(30, 144, 200, 0.15); }
button {
    background: var(--accent); color: #fff; border: none; cursor: pointer;
    font-weight: 600; transition: all 0.2s;
}
button:hover { filter: brightness(1.2); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.swap-btn {
    background: linear-gradient(135deg, var(--green), #2e7d32);
    font-size: 1.1rem; padding: 0.75rem;
}
.quick-btns { display: flex; gap: 0.5rem; }
.quick-btns button { font-size: 0.8rem; padding: 0.4rem 0.75rem; }

/* ── Tables ─────────────────────────── */
table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
code { background: rgba(0,0,0,0.3); padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85em; border: 1px solid var(--border); }

/* ── Signal colors ──────────────────── */
.signal-buy { color: var(--green) !important; text-shadow: 0 0 8px rgba(76, 175, 80, 0.3); }
.signal-wait { color: var(--gold) !important; text-shadow: 0 0 8px rgba(212, 180, 80, 0.3); }

/* ── Token search ───────────────────── */
.token-result {
    padding: 0.4rem 0.75rem; cursor: pointer; border-radius: var(--radius);
    transition: all 0.15s;
}
.token-result:hover { background: var(--accent); color: #fff; }

/* ── Footer ─────────────────────────── */
footer {
    text-align: center; padding: 1rem; color: var(--text-dim);
    font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: 2rem;
    position: relative; z-index: 1;
}
footer span { margin: 0 0.75rem; }

/* ── Hero / Empty state ────────────── */
.hero {
    text-align: center; padding: 3rem 1rem;
}
.hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--gold), #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.hero p { color: var(--text-dim); font-size: 1.1rem; max-width: 500px; margin: 0 auto; }

/* ── Responsive ─────────────────────── */
@media (max-width: 640px) {
    .container { padding: 0.75rem; }
    nav.top-nav { flex-wrap: wrap; padding: 0.5rem 0.75rem; }
    .nav-links { width: 100%; justify-content: space-around; margin-top: 0.5rem; }
    .nav-links a { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 1.8rem; }
    .theme-toggle { bottom: 0.75rem; right: 0.75rem; }
}
