@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --abyss: #020c18;
    --deep: #041525;
    --mid: #072240;
    --surface: #0a3358;
    --teal: #00d4c8;
    --teal-dim: #009e94;
    --teal-glow: rgba(0, 212, 200, 0.15);
    --teal-glow-strong: rgba(0, 212, 200, 0.35);
    --cyan: #38bdf8;
    --foam: rgba(255,255,255,0.07);
    --foam-border: rgba(0, 212, 200, 0.2);
    --text: #c8eaf5;
    --text-dim: rgba(200, 234, 245, 0.5);
    --danger: #f87171;
}

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

body {
    font-family: 'Syne', sans-serif;
    background-color: var(--abyss);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ── OCEAN BG ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0,80,120,0.5) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0,212,200,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(7,34,64,0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── BUBBLES ── */
.bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.bubble {
    position: absolute;
    bottom: -60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0,212,200,0.25), rgba(0,212,200,0.04));
    border: 1px solid rgba(0,212,200,0.2);
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-110vh) translateX(30px) scale(0.6); opacity: 0; }
}

/* ── CARD / PANEL ── */
.ocean-card {
    background: linear-gradient(160deg, rgba(7,34,64,0.85) 0%, rgba(4,21,37,0.95) 100%);
    border: 1px solid var(--foam-border);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(0,212,200,0.08),
        0 8px 40px rgba(0,0,0,0.6),
        0 0 60px rgba(0,212,200,0.05),
        inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
}

/* ── TYPOGRAPHY ── */
.title-glow {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    color: var(--teal);
    text-shadow: 0 0 20px rgba(0,212,200,0.6), 0 0 60px rgba(0,212,200,0.2);
    letter-spacing: 0.05em;
}
.mono { font-family: 'Space Mono', monospace; }

/* ── INPUTS ── */
.ocean-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(2,12,24,0.6);
    border: 1px solid rgba(0,212,200,0.25);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    outline: none;
}
.ocean-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,212,200,0.12), 0 0 20px rgba(0,212,200,0.1);
    background: rgba(7,34,64,0.5);
}
.ocean-input::placeholder { color: var(--text-dim); }

select.ocean-input option {
    background: var(--deep);
    color: var(--text);
}

/* ── BUTTONS ── */
.btn-teal {
    background: linear-gradient(135deg, var(--teal-dim), var(--teal));
    color: var(--abyss);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,212,200,0.25);
    width: 100%;
}
.btn-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,212,200,0.4);
    filter: brightness(1.1);
}
.btn-teal:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--teal);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(0,212,200,0.35);
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}
.btn-ghost:hover {
    background: rgba(0,212,200,0.08);
    border-color: var(--teal);
    box-shadow: 0 0 20px rgba(0,212,200,0.1);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-danger:hover {
    background: rgba(248,113,113,0.08);
    border-color: var(--danger);
}

/* ── LABEL ── */
.field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 8px;
    opacity: 0.85;
}

/* ── DIVIDER ── */
.ocean-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,200,0.2), transparent);
    margin: 20px 0;
}

/* ── ERROR MSG ── */
.error-box {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--danger);
    font-size: 0.85rem;
    animation: shakeAnim 0.4s ease;
}
@keyframes shakeAnim {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-5px); }
    80%      { transform: translateX(5px); }
}

/* ── HISTORY LOG ── */
.log-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0,212,200,0.04);
    border: 1px solid rgba(0,212,200,0.1);
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
    color: var(--text-dim);
    transition: all 0.2s;
}
.log-item:hover {
    background: rgba(0,212,200,0.08);
    color: var(--text);
}
.log-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--teal);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--teal);
}

/* ── COUNTER BADGE ── */
.counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,212,200,0.1);
    border: 1px solid rgba(0,212,200,0.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--teal);
}

/* ── MODAL / PREVIEW ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,12,24,0.85);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-box {
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s;
}
.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

/* ── CHECKBOX ── */
.ocean-checkbox {
    appearance: none;
    width: 16px; height: 16px;
    border: 1px solid rgba(0,212,200,0.4);
    border-radius: 4px;
    background: rgba(2,12,24,0.6);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}
.ocean-checkbox:checked {
    background: var(--teal);
    border-color: var(--teal);
}
.ocean-checkbox:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--abyss);
    font-size: 10px;
    font-weight: 700;
}

/* ── LOADING SPINNER ── */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(2,12,24,0.3);
    border-top-color: var(--abyss);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── COPY SUCCESS TOAST ── */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,212,200,0.15);
    border: 1px solid var(--teal);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--teal);
    z-index: 999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 10px; }

/* ── LOGO ── */
.logo-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 0 30px rgba(0,212,200,0.4);
}
.logo-ring img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ── CONFETTI (done page) ── */
.confetti-piece {
    position: fixed;
    width: 8px; height: 8px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 200;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── COPY FIELD ── */
.copy-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(2,12,24,0.6);
    border: 1px solid rgba(0,212,200,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-dim);
    word-break: break-all;
}
.copy-btn-inline {
    flex-shrink: 0;
    background: rgba(0,212,200,0.12);
    border: 1px solid rgba(0,212,200,0.3);
    border-radius: 6px;
    color: var(--teal);
    cursor: pointer;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    transition: all 0.2s;
}
.copy-btn-inline:hover { background: rgba(0,212,200,0.22); }

/* ── WAVE DECOR ── */
.wave-decor {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(0deg, rgba(0,212,200,0.04) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}
