:root {
    --bg: #07111f;
    --bg-soft: #10233d;
    --panel: rgba(9, 21, 38, 0.78);
    --panel-border: rgba(142, 210, 255, 0.18);
    --text: #f3f8ff;
    --muted: #98b3cf;
    --accent: #74f2ce;
    --accent-strong: #24d8a6;
    --danger: #ff7a8f;
    --warning: #ffbf69;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(116, 242, 206, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(122, 160, 255, 0.18), transparent 24%),
        linear-gradient(160deg, var(--bg) 0%, #0d1b2d 52%, #102642 100%);
    color: var(--text);
}

.background-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 191, 105, 0.08), transparent 18%),
        radial-gradient(circle at 80% 30%, rgba(36, 216, 166, 0.1), transparent 18%);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.hero {
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
}

h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 0.95;
}

.hero-copy {
    max-width: 700px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.control-panel,
.status-bar,
.ticker-card {
    backdrop-filter: blur(16px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.control-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    margin-bottom: 16px;
}

.ticker-form {
    flex: 1;
}

.ticker-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
}

.form-row {
    display: flex;
    gap: 12px;
}

input,
button {
    border: 0;
    border-radius: 14px;
    font: inherit;
}

input {
    flex: 1;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

button {
    padding: 14px 18px;
    cursor: pointer;
    color: #07231e;
    background: linear-gradient(135deg, var(--accent), #b2ffe7);
    font-weight: 700;
}

.secondary-button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.status-bar {
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: var(--muted);
}

.status-bar .is-error,
.is-error {
    color: var(--danger);
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.ticker-card {
    border-radius: 24px;
    padding: 20px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.ticker-card:hover {
    transform: translateY(-3px);
}

.ticker-card.is-up {
    border-color: rgba(116, 242, 206, 0.34);
}

.ticker-card.is-down {
    border-color: rgba(255, 122, 143, 0.3);
}

.ticker-card.is-error {
    border-color: rgba(255, 122, 143, 0.38);
}

.card-topline,
.price-row,
.meta-grid {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.card-topline {
    align-items: center;
    margin-bottom: 18px;
}

.ticker-symbol {
    font-size: 1.4rem;
    font-weight: 800;
}

.confidence-pill {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.85rem;
}

.label,
dt {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.price {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.delta {
    margin: 18px 0;
    font-weight: 700;
}

.meta-grid {
    flex-wrap: wrap;
}

.meta-grid > div {
    width: calc(50% - 6px);
}

dd {
    margin: 0;
}

.error-text {
    margin: 16px 0 0;
    color: var(--danger);
    line-height: 1.5;
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100vw - 20px, 1120px);
        padding-top: 28px;
    }

    .control-panel,
    .form-row,
    .price-row {
        flex-direction: column;
    }

    .meta-grid > div {
        width: 100%;
    }
}
