:root {
    --p-green: #a3c048;
    --p-green-dark: #8ba53c;
    --t-black: #111111;
    --t-gray: #757575;
    --b-light: #e0e0e0;
    --f-white: #ffffff;
    --err: #e53935;
    --ok: #4caf50;
    --transition: 0.3s ease;
    --gold: #ffd700;
    --silver: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--f-white);
    color: var(--t-black);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s, visibility 0.4s;
}

.p-logo {
    background: var(--p-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 36px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.container.show {
    opacity: 1;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--t-gray);
    cursor: pointer;
    padding: 4px;
}

.login-wrapper {
    flex: 1;
}

h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.step-description {
    font-size: 15px;
    color: var(--t-gray);
    margin-bottom: 32px;
    line-height: 1.5;
}

.input-container {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid var(--b-light);
    border-radius: 12px;
    outline: none;
    transition: border-color var(--transition);
    background: transparent;
}

input:focus {
    border-color: var(--p-green);
}

input.invalid {
    border-color: var(--err);
}

.eye-toggle {
    position: absolute;
    right: 16px;
    top: 26px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--t-gray);
    cursor: pointer;
    display: flex;
}

.line-slash {
    opacity: 0;
    transition: opacity 0.2s;
}

.pass-hidden .line-slash {
    opacity: 1;
}

.single-error-area {
    color: var(--err);
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    min-height: 1.2em;
    opacity: 0;
}

.single-error-area.visible {
    opacity: 1;
}

.forgot-link {
    display: block;
    margin: 5px 0 24px;
    color: var(--t-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.arr {
    color: var(--p-green);
    font-weight: 900;
    margin-left: 4px;
}

.prime-btn {
    width: 100%;
    padding: 16px;
    background: var(--p-green);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(163, 192, 72, 0.3);
}

.prime-btn:hover {
    background: var(--p-green-dark);
}

.prime-btn:disabled {
    background: var(--b-light);
    color: var(--t-gray);
    cursor: not-allowed;
}

.alt-link {
    text-align: center;
    margin-top: 18px;
}

.alt-link a,
.link-btn,
.back-link {
    color: var(--t-black);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    background: none;
    border: none;
    cursor: pointer;
}

.back-link {
    text-decoration: underline;
    font-size: 13px;
    color: var(--t-gray);
    font-weight: 400;
}

.error-hint {
    color: var(--err);
    font-size: 11px;
    margin-top: 3px;
    display: none;
}

.p-footer {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.p-square {
    background: var(--p-green);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
}

.hidden {
    display: none !important;
}

/* --- PREMIUM GIFT WHEEL --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #1a1a1a;
    width: 100%;
    max-width: 440px;
    border-radius: 32px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.modal-content h2 {
    color: #ffffff;
    font-size: 30px;
    margin-bottom: 8px;
}

.modal-content p {
    color: #888;
    font-size: 15px;
    margin-bottom: 32px;
}

.wheel-container {
    position: relative;
    width: 330px;
    height: 330px;
    margin: 0 auto 40px;
    padding: 18px;
    /* Increased padding to center the wheel better */
    background: radial-gradient(circle at center, #444, #111);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(163, 192, 72, 0.4), inset 0 0 30px rgba(0, 0, 0, 1);
    border: 6px solid #222;
}

.outer-lights {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}

.light {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #555;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background 0.2s, box-shadow 0.2s;
}

@keyframes flash {

    0%,
    100% {
        background: #444;
        box-shadow: none;
    }

    50% {
        background: var(--p-green);
        box-shadow: 0 0 10px var(--p-green);
    }
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    border: 3px solid #000;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    transition: transform 6s cubic-bezier(0.1, 0, 0.1, 1.05);
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    background: #fff;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.win-state {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 20;
    animation: premiumWin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes premiumWin {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.win-icon {
    width: 100px;
    height: 100px;
    background: var(--p-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    box-shadow: 0 0 40px rgba(163, 192, 72, 0.5);
    border: 4px solid rgba(255, 255, 255, 0.2);
}

#prize-name {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.prize-value {
    font-size: 48px;
    font-weight: 900;
    color: var(--p-green);
    margin-bottom: 32px;
    text-shadow: 0 0 20px rgba(163, 192, 72, 0.3);
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10001;
}

/* --- Password Hints --- */
.password-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.hint {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.hint.met {
    color: #a3c048;
    background: rgba(163, 192, 72, 0.1);
    border-color: rgba(163, 192, 72, 0.3);
}

@media (max-width: 440px) {
    .modal-content {
        padding: 32px 20px;
    }

    .wheel-container {
        width: 290px;
        height: 290px;
    }
}