* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background: radial-gradient(circle at 20% 20%, #0f172a 0, #020617 55%);
    position: relative;
}

/* слои звёзд */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: -50px;
    z-index: 0;
    background-repeat: repeat;
    background-size: 240px 240px;
    opacity: 0.6;
    pointer-events: none;
}

/* мелкие звёзды, лёгкое движение */
body::before {
    background-image:
        radial-gradient(1px 1px at 10px 20px, #f9fafb, transparent),
        radial-gradient(1px 1px at 80px 40px, #e5e7eb, transparent),
        radial-gradient(1px 1px at 150px 120px, #fcd34d, transparent),
        radial-gradient(1px 1px at 200px 60px, #f9fafb, transparent),
        radial-gradient(1px 1px at 40px 160px, #e5e7eb, transparent);
    animation: starsDrift 90s linear infinite;
}

/* второй слой звёзд с иным паттерном и скоростью */
body::after {
    background-image:
        radial-gradient(1px 1px at 30px 30px, #e5e7eb, transparent),
        radial-gradient(1px 1px at 120px 80px, #f97316, transparent),
        radial-gradient(1px 1px at 190px 30px, #f9fafb, transparent),
        radial-gradient(1px 1px at 60px 140px, #e5e7eb, transparent),
        radial-gradient(1px 1px at 170px 170px, #fbbf24, transparent);
    animation: starsDriftSlow 140s linear infinite;
    opacity: 0.4;
}

@keyframes starsDrift {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-240px, -240px, 0); }
}

@keyframes starsDriftSlow {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(240px, 240px, 0); }
}

/* чтобы карточка и информеры были поверх космоса */
.wrapper,
.info-bar {
    position: relative;
    z-index: 1;
}



/* ИНФОРМЕРЫ: ПОГОДА/КУРСЫ/КРИПТА */
.info-bar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    width: min(880px, 100% - 32px);
    z-index: 1000;

    background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,0.94));
    backdrop-filter: blur(24px);
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.45);
    box-shadow:
        0 20px 60px rgba(15,23,42,0.95),
        0 0 0 1px rgba(15,23,42,1);
    overflow: hidden;
}

.info-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        rgba(56,189,248,0.0) 0%,
        rgba(56,189,248,0.35) 40%,
        rgba(236,72,153,0.35) 60%,
        rgba(99,102,241,0.0) 100%);
    mix-blend-mode: screen;
    opacity: 0.35;
    transform: translateX(-40%);
    animation: infoBarSweep 10s linear infinite;
    pointer-events: none;
}

@keyframes infoBarSweep {
    0%   { transform: translateX(-60%); }
    50%  { transform: translateX(60%); }
    100% { transform: translateX(-60%); }
}

.info-item {
    position: relative;
    flex: 1 1 0;
    min-width: 90px;
    padding: 8px 10px 6px;
    border-radius: 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    cursor: default;

    background: radial-gradient(circle at top, rgba(15,23,42,0.98), rgba(15,23,42,0.94));
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow:
        0 0 0 1px rgba(15,23,42,1),
        0 10px 24px rgba(0,0,0,0.85);
    transition:
        transform 0.2s cubic-bezier(0.23,1,0.32,1),
        box-shadow 0.2s cubic-bezier(0.23,1,0.32,1),
        border-color 0.2s ease,
        background 0.2s ease;
}

.info-item::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(
        from 180deg,
        rgba(56,189,248,0.0),
        rgba(56,189,248,0.9),
        rgba(236,72,153,0.9),
        rgba(129,140,248,0.9),
        rgba(56,189,248,0.0)
    );
    opacity: 0.0;
    filter: blur(4px);
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: -1;
}

.info-item::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: radial-gradient(circle at top,
        rgba(56,189,248,0.22),
        transparent 55%);
    opacity: 0.0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.info-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 0 0 1px rgba(15,23,42,1),
        0 0 30px rgba(56,189,248,0.75),
        0 0 48px rgba(236,72,153,0.65);
    border-color: rgba(56,189,248,0.9);
}

.info-item:hover::before {
    opacity: 1;
}

.info-item:hover::after {
    opacity: 0.7;
}

.info-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
    text-align: center;
}

.info-value {
    font-size: 16px;
    font-weight: 800;
    min-height: 20px;
    letter-spacing: -0.02em;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.weather .info-value {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56,189,248,0.8);
    animation: weatherPulse 3s ease-in-out infinite;
}

.currency .info-value {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16,185,129,0.7);
}

.crypto .info-value {
    color: #f59e0b;
    text-shadow: 0 0 16px rgba(245,158,11,0.9);
    animation: cryptoSparkle 2.5s ease-in-out infinite;
}

@keyframes weatherPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.25); }
}

@keyframes cryptoSparkle {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-1px); }
}

/* ГЛОУИНГ ОРБЫ НА ФОНЕ */
.orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: float 18s ease-in-out infinite alternate;
}
.orb.orb-1 {
    width: 260px;
    height: 260px;
    top: -40px;
    left: -60px;
    background: #38bdf8;
}
.orb.orb-2 {
    width: 320px;
    height: 320px;
    bottom: -60px;
    right: -80px;
    background: #6366f1;
    animation-delay: 2.5s;
}

@keyframes float {
    0%   { transform: translate3d(0,0,0); }
    100% { transform: translate3d(40px, 30px, 0); }
}

/* КАРТОЧКА В ЦЕНТРЕ — ВАЖНО ДЛЯ "ГЛАВНОГО ОКНА" */
.wrapper {
    width: 100%;
    max-width: 780px;
    padding: 90px 24px 24px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.card {
    background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(15,23,42,0.96));
    border-radius: 26px;
    padding: 32px 28px 24px;
    box-shadow:
        0 28px 90px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(148, 163, 184, 0.3);
    backdrop-filter: blur(26px);
    border: 1px solid rgba(148, 163, 184, 0.35);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(16px);
    width: 100%;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4.5vw, 32px);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(135deg, 
        #38bdf8 0%, #6366f1 25%, 
        #ec4899 50%, #f59e0b 75%, 
        #10b981 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: 
        titleRainbow 4s ease-in-out infinite,
        titleFloat 6s ease-in-out infinite,
        titleGlow 2s ease-in-out infinite;
    text-shadow:
        0 0 20px rgba(56, 189, 248, 0.6),
        0 0 40px rgba(99, 102, 241, 0.4),
        0 0 60px rgba(236, 72, 153, 0.3);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

@keyframes titleRainbow {
    0%, 100% { background-position: 0% 50%; }
    25%      { background-position: 100% 50%; }
    50%      { background-position: 100% 100%; }
    75%      { background-position: 0% 100%; }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-4px); }
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow:
            0 0 20px rgba(56, 189, 248, 0.6),
            0 0 40px rgba(99, 102, 241, 0.4),
            0 0 60px rgba(236, 72, 153, 0.3);
    }
    50% {
        text-shadow:
            0 0 30px rgba(56, 189, 248, 1),
            0 0 60px rgba(99, 102, 241, 0.8),
            0 0 90px rgba(236, 72, 153, 0.6),
            0 0 120px rgba(16, 185, 129, 0.4);
    }
}

/* БЭДЖ */
.badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.9));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow:
        0 0 8px rgba(56, 189, 248, 0.45),
        0 0 18px rgba(56, 189, 248, 0.35);
    animation: neonGlow 2.2s ease-in-out infinite;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34,197,94,0.9);
    animation: neonDot 1.4s ease-in-out infinite;
}

@keyframes neonGlow {
    0% {
        box-shadow:
            0 0 4px rgba(56, 189, 248, 0.3),
            0 0 10px rgba(56, 189, 248, 0.25);
        border-color: rgba(148, 163, 184, 0.4);
        color: #9ca3af;
    }
    50% {
        box-shadow:
            0 0 10px rgba(56, 189, 248, 0.8),
            0 0 26px rgba(56, 189, 248, 0.7),
            0 0 40px rgba(56, 189, 248, 0.55);
        border-color: rgba(56, 189, 248, 0.9);
        color: #e5e7eb;
    }
    100% {
        box-shadow:
            0 0 4px rgba(56, 189, 248, 0.3),
            0 0 10px rgba(56, 189, 248, 0.25);
        border-color: rgba(148, 163, 184, 0.4);
        color: #9ca3af;
    }
}

@keyframes neonDot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(34,197,94,0.7);
        background: #22c55e;
    }
    50% {
        transform: scale(1.3);
        box-shadow:
            0 0 12px rgba(34,197,94,1),
            0 0 22px rgba(56,189,248,0.9);
        background: #4ade80;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(34,197,94,0.7);
        background: #22c55e;
    }
}

/* ТЕКСТ ПОД ЗАГОЛОВКОМ */
.subtitle {
    margin: 0 0 22px;
    font-size: 14px;
    color: #9ca3af;
}
.subtitle strong { color: #e5e7eb; font-weight: 600; }

/* ИНПУТ+КНОПКА */
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.input-shell {
    position: relative;
    flex: 1 1 260px;
}

.input-label {
    position: absolute;
    top: 8px;
    left: 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
}

#siteInput {
    width: 100%;
    padding: 30px 44px 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: radial-gradient(circle at top left, #020617, #020617 35%, #020617);
    color: #e5e7eb;
    font-size: 15px;
    outline: none;
    transition:
        border 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        transform 0.15s ease;
}

#siteInput::placeholder { color: #4b5563; }

#siteInput:focus {
    border-color: #38bdf8;
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.75),
        0 0 38px rgba(56, 189, 248, 0.45);
    background: radial-gradient(circle at top left, #020617, #020617 28%, #020617);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(4px);
    font-size: 18px;
    color: #6b7280;
    pointer-events: none;
}

.btn-main {
    flex: 0 0 auto;
    padding: 14px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #0b1120;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow:
        0 14px 32px rgba(37, 99, 235, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease,
        filter 0.14s ease,
        background-position 0.3s.ease;
    background-size: 160% 160%;
    background-position: 0% 50%;
}

.btn-main span.icon { font-size: 18px; margin-top: -1px; }

.btn-main:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow:
        0 18px 42px rgba(37, 99, 235, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    background-position: 100% 50%;
}

.btn-main:active {
    transform: translateY(0);
    box-shadow:
        0 10px 26px rgba(37, 99, 235, 0.6),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* ЧИПЫ, ПОДПИСИ, ПОИСКОВИКИ */
.panel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
    font-size: 11px;
    color: #9ca3af;
    transition:
        border 0.15s ease,
        background 0.15s.ease,
        color 0.15s ease,
        transform 0.12s.ease;
}

.chip:hover {
    border-color: #38bdf8;
    color: #e5e7eb;
    transform: translateY(-1px);
}

.chip:active { transform: translateY(0); }

.hint-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.engine-label { margin-right: 4px; }

.engine-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.engine-pill {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,0.9);
    background: rgba(15,23,42,0.9);
    cursor: pointer;
    font-size: 11px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition:
        border 0.15s ease,
        background 0.15s.ease,
        color 0.15s.ease,
        box-shadow 0.15s.ease,
        transform 0.12s.ease;
}

.engine-pill span.dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: transparent;
}

.engine-pill.active {
    border-color: #38bdf8;
    background: radial-gradient(circle at top, rgba(37,99,235,0.4), rgba(15,23,42,0.9));
    color: #e5e7eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.4);
    transform: translateY(-1px);
}

.engine-pill.active span.dot {
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56,189,248,0.9);
}

.engine-pill:hover {
    border-color: #38bdf8;
    color: #e5e7eb;
}
.corp-footer {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;

    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.45);
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.88));
    backdrop-filter: blur(16px);

    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6b7280;

    box-shadow:
        0 0 0 1px rgba(15,23,42,0.9),
        0 10px 24px rgba(0,0,0,0.75);
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .corp-footer {
        bottom: 8px;
        font-size: 10px;
        padding: 5px 10px;
        max-width: calc(100% - 24px);
        white-space: normal;
    }
}

/* АДАПТИВ */
@media (max-width: 640px) {
    .info-bar { 
        padding: 8px 10px; 
        gap: 8px;
        width: calc(100% - 16px);
    }
    .info-item { min-width: 80px; flex: 1 1 45%; }
    .wrapper { padding-top: 130px; }
    .card { padding: 24px 18px 18px; }
    .title-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    h1 { font-size: clamp(22px, 6vw, 26px); }
    .subtitle { font-size: 13px; }
    .btn-main { width: 100%; justify-content: center; }
    .panel-row { align-items: flex-start; }
}
