:root {
    --bg-1: #07111f;
    --bg-2: #0d1b33;
    --bg-3: #11192a;
    --surface: rgba(11, 19, 35, 0.78);
    --surface-strong: rgba(9, 16, 29, 0.9);
    --surface-soft: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f8fbff;
    --muted: #b2bfd3;
    --muted-2: #8a98b0;

    --primary: #7c97ff;
    --primary-2: #5b72ff;
    --primary-glow: rgba(105, 126, 255, 0.34);

    --gold: #f4cf77;
    --gold-2: #dca942;
    --gold-glow: rgba(244, 207, 119, 0.26);

    --silver: #dce3f2;
    --silver-2: #9aa7bf;
    --silver-glow: rgba(201, 214, 235, 0.24);

    --success: #25c17e;
    --success-bg: rgba(37, 193, 126, 0.14);

    --danger: #ff6a6a;
    --danger-bg: rgba(255, 106, 106, 0.12);

    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.22);

    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;

    --container: 860px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(124, 151, 255, 0.18), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(244, 207, 119, 0.14), transparent 18%),
        radial-gradient(circle at 80% 85%, rgba(91, 114, 255, 0.12), transparent 22%),
        linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 46%, var(--bg-3) 100%);
}

body {
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 340px;
    height: 340px;
    top: -60px;
    left: -80px;
    background: rgba(124, 151, 255, 0.12);
}

body::after {
    width: 300px;
    height: 300px;
    bottom: -70px;
    right: -60px;
    background: rgba(244, 207, 119, 0.1);
}

a {
    color: inherit;
}

.page-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.hero-card,
.detail-card {
    position: relative;
    width: 100%;
    max-width: var(--container);
    padding: 38px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)),
        var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.hero-card::before,
.detail-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.03));
    pointer-events: none;
}

.hero-card::after,
.detail-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    top: -120px;
    right: -100px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(124, 151, 255, 0.18), transparent 62%);
    pointer-events: none;
}

.page-detail .detail-card {
    max-width: 720px;
}

.hero-badge,
.type-chip {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-badge {
    color: #dbe4ff;
    border: 1px solid rgba(124, 151, 255, 0.34);
    background: rgba(124, 151, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.type-chip {
    color: #f2f5fb;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}

.theme-gold .type-chip {
    color: #fff0c2;
    border-color: rgba(244, 207, 119, 0.34);
    background: rgba(244, 207, 119, 0.12);
    box-shadow: 0 0 0 1px rgba(244, 207, 119, 0.06), 0 10px 24px rgba(244, 207, 119, 0.08);
}

.theme-silver .type-chip {
    color: #edf3ff;
    border-color: rgba(201, 214, 235, 0.28);
    background: rgba(201, 214, 235, 0.1);
    box-shadow: 0 0 0 1px rgba(201, 214, 235, 0.06), 0 10px 24px rgba(201, 214, 235, 0.06);
}

h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    max-width: 12ch;
}

.hero-text,
.hero-subtext,
.detail-card p,
.info-grid p,
.resume-box p,
.small-note {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.78;
}

.hero-text strong,
.detail-card p strong,
.resume-box strong {
    color: #ffffff;
    font-weight: 700;
}

.hero-subtext {
    margin-top: 8px;
    margin-bottom: 30px;
    color: #9fb1ca;
}

.promo-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.promo-form label {
    color: #edf2fb;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.promo-form input {
    width: 100%;
    padding: 17px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03)),
        rgba(255,255,255,0.035);
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.promo-form input::placeholder {
    color: var(--muted-2);
}

.promo-form input:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.promo-form input:focus {
    border-color: rgba(124, 151, 255, 0.65);
    background: rgba(255,255,255,0.055);
    box-shadow:
        0 0 0 4px rgba(124, 151, 255, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.primary-btn,
.secondary-btn,
.link-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 16px 22px;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        opacity 0.24s ease,
        border-color 0.24s ease,
        background 0.24s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    box-shadow:
        0 14px 34px rgba(91, 114, 255, 0.3),
        0 0 0 1px rgba(255,255,255,0.04) inset;
}

.primary-btn:hover,
.link-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 40px rgba(91, 114, 255, 0.36),
        0 0 0 1px rgba(255,255,255,0.06) inset;
}

.secondary-btn {
    color: #f0f4fb;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.secondary-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.18);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-group {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.alert {
    position: relative;
    z-index: 1;
    margin: 20px 0 10px;
    padding: 15px 18px;
    border-radius: 18px;
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.6;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
}

.alert-success {
    color: #b7ffd9;
    background: var(--success-bg);
    border-color: rgba(37, 193, 126, 0.32);
    box-shadow: 0 10px 30px rgba(37, 193, 126, 0.08);
}

.alert-error {
    color: #ffc1c1;
    background: var(--danger-bg);
    border-color: rgba(255, 106, 106, 0.3);
    box-shadow: 0 10px 30px rgba(255, 106, 106, 0.08);
}

.info-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.info-grid article,
.resume-box,
.code-preview {
    position: relative;
    z-index: 1;
    padding: 20px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03)),
        rgba(255,255,255,0.028);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-md);
}

.info-grid article {
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.info-grid article:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.045);
}

.info-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.info-grid article:first-child .info-title::before,
.theme-silver .type-chip::before {
    content: "◈";
    color: var(--silver);
    text-shadow: 0 0 18px var(--silver-glow);
}

.info-grid article:last-child .info-title::before,
.theme-gold .type-chip::before {
    content: "✦";
    color: var(--gold);
    text-shadow: 0 0 18px var(--gold-glow);
}

.code-preview {
    display: grid;
    gap: 8px;
    margin: 18px 0 4px;
}

.code-preview span,
.resume-box span,
.small-note {
    color: var(--muted);
}

.code-preview strong,
.resume-box strong {
    word-break: break-word;
    font-size: 1rem;
}

.resume-box {
    margin-top: 22px;
    display: grid;
    gap: 10px;
}

.back-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    text-decoration: none;
    color: #dfe8f9;
    font-weight: 700;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    opacity: 1;
    transform: translateX(-2px);
}

.success-icon {
    position: relative;
    z-index: 1;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #2dd28a, #16a864);
    box-shadow:
        0 16px 36px rgba(45, 210, 138, 0.26),
        0 0 0 8px rgba(45, 210, 138, 0.08);
}

.theme-gold .detail-card::after,
.detail-card.theme-gold::after {
    background: radial-gradient(circle, rgba(244, 207, 119, 0.16), transparent 62%);
}

.theme-silver .detail-card::after,
.detail-card.theme-silver::after {
    background: radial-gradient(circle, rgba(201, 214, 235, 0.12), transparent 62%);
}

.small-note {
    margin-top: 14px;
    font-size: 0.95rem;
}

.small-note #countdown {
    color: #ffffff;
    font-weight: 800;
}

.link-btn {
    text-decoration: none;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card,
.detail-card,
.info-grid article,
.alert {
    animation: floatIn 0.45s ease both;
}

.info-grid article:nth-child(2) {
    animation-delay: 0.08s;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

@media (max-width: 860px) {
    .hero-card,
    .detail-card {
        padding: 28px;
        border-radius: 28px;
    }

    h1 {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 18px 12px;
    }

    .hero-card,
    .detail-card {
        padding: 22px 18px;
        border-radius: 24px;
    }

    h1 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
        line-height: 1.08;
    }

    .hero-text,
    .hero-subtext,
    .detail-card p,
    .info-grid p,
    .resume-box p,
    .small-note {
        font-size: 0.96rem;
        line-height: 1.68;
    }

    .promo-form input,
    .primary-btn,
    .secondary-btn,
    .link-btn {
        min-height: 52px;
        padding: 15px 16px;
        font-size: 0.96rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .success-icon {
        width: 66px;
        height: 66px;
        font-size: 1.7rem;
    }

    .hero-badge,
    .type-chip {
        font-size: 0.72rem;
        padding: 10px 13px;
    }
}