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

:root {
    --primary: #FBBF24;
    --bgDark: #0E1115;
    --inputDark: #15181E;
    --borderDark: #1F2937;
    --textMuted: #707D8F;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--bgDark);
    font-family: 'Inter', sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Subtle radial glow in center */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(251, 191, 36, 0.055) 0%, transparent 70%);
    pointer-events: none;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rocket-icon {
    color: var(--primary);
    display: flex;
    align-items: center;
    animation: rockettilt 3s ease-in-out infinite;
}

@keyframes rockettilt {
    0%, 100% { transform: rotate(-10deg) translateY(0px); }
    50%       { transform: rotate(-10deg) translateY(-4px); }
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--textMuted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 4px;
    width: 480px;
    max-width: 90vw;
}

.search-input {
    flex: 1;
    background: var(--inputDark);
    border: 1px solid var(--borderDark);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 0 16px;
    height: 44px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input::placeholder {
    color: var(--textMuted);
}

.search-input:focus {
    border-color: #00a63e;
}

.search-btn {
    height: 44px;
    width: 48px;
    background: var(--primary);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0E1115;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: #f5b014;
    transform: scale(1.04);
}

.search-btn:active {
    transform: scale(0.97);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.shake {
  animation: shake 0.35s ease;
}

.input-error {
  font-size: 0.78rem;
  color: #f87171;
  margin-top: -6px;
  animation: fadeUp 0.2s ease both;
}

/* ── LOADER ── */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.4s ease;
}
#loader.hidden {
    opacity: 0;
    pointer-events: none;
}
.loader-logo {
    width: 48px;
    height: 48px;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50%       { opacity: 1;   transform: scale(1.05); }
}

/* ── IFRAME ── */
#chart-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── FLOATING BUTTON ── */
#float-btn {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 100px;
    padding: 14px 32px;
    cursor: pointer;
    box-shadow: 0 4px 32px rgba(251, 191, 36, 0.35);
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    z-index: 100;
    opacity: 0;
    animation: floatIn 0.5s ease 0.3s both;
}
@keyframes floatIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#float-btn:hover {
    background: #f5b014;
    box-shadow: 0 6px 40px rgba(251, 191, 36, 0.5);
    transform: translateX(-50%) scale(1.04);
}
#float-btn:active {
    transform: translateX(-50%) scale(0.97);
}

/* ── MODAL OVERLAY ── */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
#modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ── MODAL BOX ── */
.modal {
    background: var(--modalBg);
    border: 1px solid var(--borderDark);
    border-radius: 16px;
    width: 450px;
    max-width: calc(100vw - 32px);
    padding: 32px 28px 28px;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
    text-align: center;
}
#modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--textMuted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,0.07); }

.modal-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    background: var(--borderDark);
}
.modal-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--borderDark);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--textMuted);
}

.modal h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--textMuted);
    line-height: 1.5;
    margin-bottom: 24px;
}
.modal-subtitle strong {
    color: #fff;
    font-weight: 600;
}

/* ── FEATURE ROWS ── */
.features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
    text-align: left;
}
.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feature-text {
    font-size: 0.83rem;
    color: #C9D1DC;
    line-height: 1.45;
    padding-top: 6px;
}

/* ── VOTE BUTTON ── */
.modal-vote-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-bottom: 14px;
}
.modal-vote-btn:hover { background: #f5b014; transform: scale(1.02); }
.modal-vote-btn:active { transform: scale(0.98); }

.modal-skip {
    font-size: 0.8rem;
    color: var(--textMuted);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s;
}
.modal-skip:hover { color: #fff; }