@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap");

:root {
    --primary-gold: #ffd700;
    --primary-gold-dim: #b8860b;
    --magic-blue: #a208ff;
    --magic-purple: #8a2be2;
    --magic-teal: #119ca2;
    --panel-bg: rgba(14, 18, 25, 0.86);
    --input-bg: rgba(5, 12, 18, 0.8);
    --input-border: #3d4f66;
    --text-soft: #b7cae4;
    --text-muted: #8fa6c3;
}

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

body.pre-register-page {
    min-height: 100vh;
    font-family: "Chakra Petch", sans-serif;
    color: #fff;
    overflow-x: hidden;
    background: #05070a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    text-transform: uppercase;
}

.bg-container {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, rgba(22, 100, 127, 0.2), rgba(5, 5, 16, 0.96) 60%), #050510;
}

.bg-scene {
    position: absolute;
    inset: 0;
    background: url('../../assets/img/home/hero/hero-bg.png?') no-repeat center center / cover;
    filter: brightness(0.45) saturate(1.1);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.86) 100%);
}

.magic-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 82%, rgba(0, 255, 255, 0.12) 0%, transparent 20%),
        radial-gradient(circle at 82% 22%, rgba(157, 0, 255, 0.13) 0%, transparent 20%);
    animation: pulse-bg 10s infinite alternate;
}

@keyframes pulse-bg {
    0% {
        opacity: 0.55;
    }

    100% {
        opacity: 1;
    }
}

.circle-rune {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, 70vw);
    height: min(620px, 70vw);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    animation: rotate-slow 60s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes rotate-slow {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.main-container {
    width: min(1380px, calc(100% - 42px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: 26px;
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.left-panel {
    border: 1px solid rgba(72, 101, 138, 0.5);
    border-radius: 18px;
    background: rgba(8, 12, 22, 0.8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    backdrop-filter: blur(6px);
}

.logo-area {
    text-align: left;
}

.logo-text {
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    font-size: clamp(46px, 8vw, 82px);
    line-height: 0.92;
    background: linear-gradient(180deg, #ffffff 0%, #d18dfc 50%, #a208ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.subtitle {
    margin-top: 8px;
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 4.5vw, 34px);
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 2px solid #a208ff;
    padding-bottom: 8px;
    display: inline-block;
}

.description {
    margin-top: 12px;
    font-size: 16px;
    color: #d6e4f0;
    line-height: 1.6;
    max-width: 90%;
}

.rewards-section {
    background: rgba(14, 18, 30, 0.8);
    border: 1px solid rgba(100, 149, 237, 0.32);
    border-radius: 14px;
    padding: 22px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #a8c0ff;
}

.progress-header span:last-child {
    text-align: right;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #7f2bff, #ff6500);
    box-shadow: 0 0 12px rgba(157, 0, 255, 0.8);
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 7px;
    background: rgba(255, 255, 255, 0.95);
    filter: blur(2px);
}

.milestones {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.milestone-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chest-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 215, 0, 0.38);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.22), transparent 70%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.chest-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
}

.chest-icon.locked {
    filter: grayscale(100%);
    opacity: 0.48;
}

.milestone-val {
    font-size: 12px;
    color: var(--text-muted);
}

.countdown-title {
    font-size: 16px;
    color: var(--magic-blue);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.count-box {
    background: #47007466;
    border: 1px solid #47007466;
    padding: 14px 8px;
    border-radius: 10px;
    text-align: center;
    box-shadow: inset 0 0 15px #47007466;
}

.count-num {
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 33px);
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    line-height: 1;
}

.count-label {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.right-panel {
    background: var(--panel-bg);
    border: 2px solid #2d3648;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.right-panel::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 22px;
    padding: 3px;
    background: linear-gradient(135deg, #b8860b, #4b3621, #00ffff, #b8860b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.panel-rune-decor {
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0.8;
    border-top: 2px solid var(--magic-blue);
    border-left: 2px solid var(--magic-blue);
}

.rune-tl {
    top: 16px;
    left: 16px;
}

.rune-tr {
    top: 16px;
    right: 16px;
    transform: rotate(90deg);
}

.rune-bl {
    bottom: 16px;
    left: 16px;
    transform: rotate(-90deg);
}

.rune-br {
    bottom: 16px;
    right: 16px;
    transform: rotate(180deg);
}

.form-header {
    text-align: center;
    margin-bottom: 22px;
}

.form-title {
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4.2vw, 34px);
    color: #fff;
}

.form-subtitle {
    font-size: 20px;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-message {
    grid-column: span 2;
}

.input-label {
    display: block;
    font-size: 12px;
    color: #a8c0ff;
    margin-bottom: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.input-wrapper {
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.input-wrapper:hover,
.input-wrapper:focus-within {
    border-color: var(--magic-blue);
    box-shadow: 0 0 9px rgba(0, 255, 255, 0.24);
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--magic-blue);
    font-size: 18px;
}

.styled-input,
.styled-select {
    width: 100%;
    background: transparent;
    border: none;
    padding: 13px 14px 13px 44px;
    color: #fff;
    font-size: 15px;
    outline: none;
    text-transform: uppercase;
}

.styled-input::placeholder {
    color: rgba(255, 255, 255, 0.34);
    text-transform: uppercase;
}

.styled-input[type="email"],
.styled-input[type="password"],
.styled-input[type="date"] {
    text-transform: none;
}

.styled-input[type="email"]::placeholder,
.styled-input[type="password"]::placeholder {
    text-transform: none;
}

.styled-select {
    appearance: none;
    cursor: pointer;
}

.styled-select option {
    background: #111c2b;
    color: #fff;
}

.input-wrapper.password-field .styled-input {
    padding-right: 46px;
}

.password-visibility-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9fd4ef;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
    color: var(--magic-blue);
    background: rgba(0, 217, 255, 0.12);
    outline: none;
}

.password-visibility-toggle span {
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a8c0ff;
    pointer-events: none;
}

.checkbox-group {
    grid-column: span 2;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #a8c0ff;
    line-height: 1.35;
}

.styled-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #4a5a75;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 1px;
}

.styled-checkbox:checked {
    background: var(--magic-blue);
    border-color: var(--magic-blue);
}

.styled-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -53%);
    color: #000;
    font-size: 12px;
    font-weight: 700;
}

.captcha-wrap {
    grid-column: span 2;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
}

.cta-container {
    grid-column: span 2;
    margin-top: 4px;
}

.cta-btn {
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    color: #fff;
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #a208ff 0%, #470074 100%);
    box-shadow: 0 5px 15px rgba(0, 120, 215, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #a208ff 0%, #470074 100%);
}

.messageError,
.messageSuccess {
    grid-column: span 2;
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    width: 100%;
    margin-bottom: 2px;
}

.messageError {
    background: rgba(189, 33, 48, 0.95);
}

.messageSuccess {
    background: rgba(30, 126, 52, 0.95);
}

.discord-button {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #5f70be;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.34);
    z-index: 1000;
    animation: pulse-discord 1.1s infinite;
}

.discord-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(88, 101, 242, 0.5);
    z-index: -1;
    animation: ripple-discord 1.1s infinite;
}

.discord-button img {
    width: 44px;
    border-radius: 50%;
}

@keyframes pulse-discord {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes ripple-discord {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

#reward-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.97);
    padding: 0;
    background: linear-gradient(160deg, rgba(8, 16, 28, 0.96), rgba(4, 9, 16, 0.94));
    color: #fff;
    border: 1px solid rgba(32, 212, 248, 0.5);
    border-radius: 14px;
    font-size: 14px;
    pointer-events: auto;
    display: none;
    width: min(520px, calc(100vw - 22px));
    max-height: min(80vh, 760px);
    white-space: normal;
    word-break: break-word;
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(32, 212, 248, 0.16) inset,
        0 0 30px rgba(32, 212, 248, 0.2);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 9999;
}

#reward-tooltip.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#reward-tooltip::-webkit-scrollbar {
    width: 8px;
}

#reward-tooltip::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(32, 212, 248, 0.4);
}

#reward-tooltip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

.reward-tooltip-loading,
.reward-tooltip-error {
    padding: 22px 16px;
    text-align: center;
}

.reward-tooltip-loading span {
    display: block;
    margin-top: 8px;
    color: #9ec0df;
    font-size: 13px;
}

.reward-tooltip-error {
    color: #ffd0d6;
}

.reward-tooltip-card {
    padding: 14px 14px 16px;
}

.reward-tooltip-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(32, 212, 248, 0.24);
}

.reward-tooltip-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid rgba(32, 212, 248, 0.35);
    background: rgba(9, 16, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(32, 212, 248, 0.15);
    flex-shrink: 0;
}

.reward-tooltip-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.reward-tooltip-name {
    font-size: 16px;
    line-height: 1.2;
    color: #f2f9ff;
    font-weight: 700;
}

.reward-tooltip-id {
    margin-top: 3px;
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #8fb8d9;
}

.reward-tooltip-body {
    font-size: 13px;
    color: #e8f6ff;
    line-height: 1.5;
}

.reward-tooltip-body p {
    margin: 0 0 9px;
}

.reward-tooltip-body ul {
    margin: 0 0 12px;
}

.reward-tooltip-body li {
    margin-bottom: 8px;
}

.reward-tooltip-body img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #20d4f8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.floating-element {
    position: fixed;
    pointer-events: none;
    z-index: 1;
}

.sparkle-1 {
    top: 16%;
    right: 10%;
    font-size: 24px;
    color: gold;
    animation: twinkle 4s infinite;
}

.sparkle-2 {
    bottom: 20%;
    left: 40%;
    font-size: 18px;
    color: cyan;
    animation: twinkle 3s infinite 1s;
}

.sparkle-3 {
    top: 42%;
    left: 5%;
    font-size: 30px;
    color: violet;
    animation: twinkle 5s infinite 0.5s;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.15) rotate(45deg);
    }
}

@media (max-width: 1100px) {
    body.pre-register-page {
        align-items: flex-start;
        padding: 18px 0 24px;
    }

    .main-container {
        grid-template-columns: 1fr;
        width: min(860px, calc(100% - 24px));
        margin: 18px auto 24px;
    }

    .description {
        max-width: 100%;
    }

    .right-panel {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .main-container {
        width: calc(100% - 16px);
        gap: 14px;
    }

    .left-panel,
    .right-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-group.full-width,
    .form-message,
    .checkbox-group,
    .captcha-wrap,
    .cta-container,
    .messageError,
    .messageSuccess {
        grid-column: span 1;
    }

    .milestones {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .discord-button {
        width: 48px;
        height: 48px;
        right: 14px;
        bottom: 14px;
    }

    .discord-button img {
        width: 38px;
    }

    #reward-tooltip {
        width: min(520px, calc(100vw - 12px));
        border-radius: 12px;
    }
}
