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

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #020617; /* very dark blue */
    color: #e5e7eb;
}

.page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background */

.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url("/static/img/bg.jpg");
    background-size: cover;
    background-position: center;
    filter: brightness(0.75);
}

/* мягкое затемнение поверх фото */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(15, 23, 42, 0.1), transparent 45%),
                linear-gradient(to bottom, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.95));
}

/* Top bar – fixed */

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    color: #f9fafb;

    /* убираем плашку */
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
}

.brand-logo {
    height: 72px;   /* чуть больше */
    width: auto;
}

/* токен: аккуратная пилюля с адресом */
.token-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
    max-width: 420px;
}

.token-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main layout */

.main-layout {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 112px 16px 32px; /* отступ сверху под фиксированную шапку */
    gap: 32px;
    flex: 1;
}

/* Hero */

.hero {
    max-width: 640px;
    width: 100%;
    text-align: center;
    color: #e5e7eb;
    text-shadow: 0 1px 4px rgba(15, 23, 42, 0.9);
    margin-top: 12px;
}

.hero-title {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hero-line {
    margin: 0 0 4px;
    font-size: 14px;
    color: #d1d5db;
}

.hero-line strong {
    font-weight: 600;
}

.join-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field span {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #cbd5f5;
    text-align: left;
}

.field input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input::placeholder {
    color: #6b7280;
}

.field input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6);
    background: rgba(15, 23, 42, 0.96);
}

.primary-btn {
    margin-top: 6px;
    align-self: center;
    padding: 12px 32px;
    border-radius: 999px;
    border: none;
    background: #60a5fa;
    color: #f9fafb;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.primary-btn:hover {
    background: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.7);
}

.primary-btn:disabled {
    opacity: 0.75;
    cursor: default;
}

.join-message {
    margin-top: 8px;
    min-height: 20px;
    font-size: 13px;
}

.join-message.ok {
    color: #bbf7d0;
}

.join-message.error {
    color: #fecaca;
}

.hero-notes {
    margin-top: 14px;
    font-size: 12px;
    color: #cbd5f5;
}


/* Winners section */

.winners-section {
    max-width: 800px;
    width: 100%;
    color: #e5e7eb;
}

.winners-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
}

.winners-subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    color: #cbd5f5;
}

/* Scrollable list */

.winners-list-shell {
    position: relative;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
}

.winners-list-shell::before,
.winners-list-shell::after {
    content: "";
    position: sticky;
    left: 0;
    right: 0;
    height: 18px;
    z-index: 2;
    pointer-events: none;
}

.winners-list-shell::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0));
}

.winners-list-shell::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0));
}

.winners-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.winner-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    font-size: 13px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.6);
    opacity: 0;
    transform: translateY(4px);
    animation: winner-row-in 0.2s ease-out forwards;
}

.winner-row:last-child {
    border-bottom: none;
}

.winner-row-tx a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
}

.winner-row-tx a:hover {
    text-decoration: underline;
}

.winner-row-wallet {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
    color: #e5e7eb;
}

.winner-row-amount {
    font-weight: 500;
    white-space: nowrap;
    color: #bbf7d0;
}

.winner-row-tx {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.winner-tx-link {
  text-decoration: none;
}

.winner-tx-link:hover {
  text-decoration: underline;
}


/* Footer */

.footer {
    position: relative;
    z-index: 5;
    padding: 16px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(30, 64, 175, 0.75);
    font-size: 13px;
}

.footer-left {
    color: #9ca3af;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #e5e7eb;
    opacity: 0.9;
}

.social-link:hover {
    opacity: 1;
}

.social-icon {
    width: 44px;   /* больше иконки */
    height: 44px;
    border-radius: 999px;
    object-fit: contain;
}

.captcha-wrapper {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}



/* Animations & responsive */

@keyframes winner-row-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 8px 16px;
    }

    .brand-logo {
        height: 52px;
    }

    .main-layout {
        padding: 96px 12px 24px;
        gap: 24px;
    }

    .hero-title {
        font-size: 26px;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px 16px;
    }
}
