/* ==========================================================================
   Page Layout
   ========================================================================== */

html, body {
    height: 100%;
}

.totp-center {
    min-height: calc(100dvh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}


/* ==========================================================================
   Card
   ========================================================================== */

.card {
    background: rgba(15, 15, 35, 0.75);
    backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(136, 108, 228, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, #ff0a1f, #886ce4, #00d4ff);
    opacity: 0.7;
}


/* ==========================================================================
   Header
   ========================================================================== */

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(90deg, #ff0a1f, #886ce4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 3px;
    margin-bottom: 32px;
}


/* ==========================================================================
   Code Display
   ========================================================================== */

.code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding: 24px 20px;
    background: rgba(30, 30, 60, 0.4);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.code-display:hover {
    background: rgba(50, 50, 90, 0.5);
    transform: translateY(-2px);
    border: 1px solid rgba(136, 108, 228, 0.6);
}


/* ==========================================================================
   COPY EFFECT (ВОЗВРАЩЕН ПОЛНОСТЬЮ)
   ========================================================================== */

.code-display.copy-active {
    animation: copyFlash 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.code-display.copy-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;

    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255,255,255,0.25),
        transparent 70%
    );

    animation: shimmerSwipe 0.8s ease;
    pointer-events: none;
}

@keyframes copyFlash {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(136,108,228,0);
    }

    35% {
        transform: scale(1.04);
        box-shadow:
            0 0 20px rgba(136,108,228,0.7),
            0 0 40px rgba(136,108,228,0.5);
    }

    65% {
        transform: scale(1.02);
        box-shadow:
            0 0 10px rgba(136,108,228,0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(136,108,228,0);
    }
}

@keyframes shimmerSwipe {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}


/* ==========================================================================
   Code Text (ГРАДИЕНТ ВСЕГДА)
   ========================================================================== */

.code-full {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(42px, 12vw, 72px);
    font-weight: 800;
    letter-spacing: 6px;

    background: linear-gradient(90deg, #ff0a1f 0%, #ff4e6e 50%, #886ce4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.copy-hint {
    font-size: 14px;
    opacity: 0.75;
    color: #c0a8ff;
}


/* ==========================================================================
   Timer
   ========================================================================== */

.timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 56px;
    font-weight: 700;
    margin: 16px 0 4px;
    background: linear-gradient(90deg, #ff0a1f, #886ce4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timer-label {
    font-size: 13px;
    opacity: 0.6;
    color: #b19cd9;
}


/* ==========================================================================
   Progress
   ========================================================================== */

progress {
    width: 100%;
    height: 6px;
    margin-top: 14px;
    border: none;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
}

progress::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ff0a1f, #886ce4);
    border-radius: 4px;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, #ff0a1f, #886ce4);
    border-radius: 4px;
}


/* ==========================================================================
   Meta
   ========================================================================== */

.secret-hint {
    margin-top: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #aaa;
    opacity: 0.7;
    letter-spacing: 1.2px;
}

.error {
    margin-top: 14px;
    font-size: 13px;
    color: #ff6b6b;
}