* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'ZCOOL KuaiLe', 'Microsoft YaHei', cursive, sans-serif;
}

:root {
    --pink-50: #fff5f8;
    --pink-100: #ffe7f1;
    --pink-200: #ffc9dc;
    --pink-300: #ff9ec3;
    --pink-400: #ff79b4;
    --pink-500: #ff5aa8;
    --pink-600: #ff3f9a;
    --pink-700: #f61d86;
    --rose-700: #c71d62;
    --text-main: #5f2a42;
    --text-soft: #9d5d7c;
    --card-bg: rgba(255, 255, 255, 0.38);
    --card-border: rgba(255, 255, 255, 0.55);
    --shadow-soft: 0 18px 45px rgba(206, 88, 136, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 190, 218, 0.65), transparent 35%),
        linear-gradient(135deg, #fffafc 0%, #ffe6f0 22%, #ffcfe0 52%, #ffbdd1 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(55px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -120px;
    left: -90px;
    background: rgba(255, 255, 255, 0.9);
}

body::after {
    right: -100px;
    bottom: -120px;
    background: rgba(255, 185, 217, 0.7);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 26px 20px;
}

.container.no-container {
    display: contents;
    padding: 0;
    min-height: auto;
}

.glass-card,
.login-card,
.dashboard-card,
.quiz-card,
.welcome-card.glass-panel {
    position: relative;
    z-index: 2;
    width: min(92vw, 460px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    animation: cardFloat 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes cardFloat {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.glow-text {
    color: #ff5ea8;
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 0 18px rgba(255, 94, 168, 0.28), 0 6px 18px rgba(255, 255, 255, 0.65);
}

.subtitle,
.timer-label,
.footer-note,
.hint,
.ready-sub,
.input-label,
.combo-hint,
.forever-text,
.login-title {
    color: var(--text-soft);
}

.subtitle {
    font-size: 1.12rem;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
}

.heart-beat {
    font-size: clamp(2.5rem, 5vw, 3.3rem);
    margin: 18px 0 12px;
    animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.14); }
    28% { transform: scale(1); }
    42% { transform: scale(1.18); }
    70% { transform: scale(1); }
}

.hint,
.footer-note,
.ready-sub,
.combo-hint,
.timer-sub,
.forever-text {
    line-height: 1.7;
    letter-spacing: 0.04em;
}

.btn-pink,
.btn-start,
.btn-next-memory,
.btn-continue-memory,
.btn-outline,
.opt-btn,
.num-key,
.btn-prev {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-pink,
.btn-start {
    display: inline-block;
    width: 100%;
    padding: 15px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff90c5 0%, #ff4fa1 35%, #ff2d8d 100%);
    color: white;
    font-size: 1.08rem;
    letter-spacing: 2px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 12px 26px rgba(255, 76, 163, 0.28);
    position: relative;
    overflow: hidden;
}

.btn-pink::after,
.btn-start::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.32) 50%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
}

.btn-pink:hover::after,
.btn-start:hover::after {
    transform: translateX(120%);
}

.btn-pink:hover,
.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(255, 76, 163, 0.32);
}

.btn-outline,
.btn-prev,
.btn-continue-memory {
    display: inline-block;
    border: 1.5px solid rgba(255, 105, 180, 0.4);
    border-radius: 999px;
    padding: 12px 28px;
    color: var(--rose-700);
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
}

.btn-outline:hover,
.btn-prev:hover,
.btn-continue-memory:hover {
    border-color: rgba(255, 94, 168, 0.8);
    background: rgba(255, 94, 168, 0.08);
    transform: translateY(-1px);
}

.input-pink {
    width: 100%;
    border: 1.5px solid rgba(255, 155, 191, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--pink-700);
    padding: 15px 18px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.08rem;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.6);
}

.input-pink::placeholder {
    color: rgba(158, 93, 124, 0.7);
}

.input-pink:focus {
    border-color: rgba(255, 94, 168, 0.95);
    box-shadow: 0 0 0 4px rgba(255, 94, 168, 0.12), 0 8px 18px rgba(255, 94, 168, 0.12);
    background: rgba(255, 255, 255, 0.9);
}

.error-msg {
    margin: 8px 0 16px;
    color: #ff4d6d;
    font-size: 0.9rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.home-bg-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 0;
}

.bg-image {
    position: absolute;
    inset: -6%;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1.03);
    animation: bgBreath 18s ease-in-out infinite alternate;
}

@keyframes bgBreath {
    from { transform: scale(1.04); }
    to { transform: scale(1.11); }
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 245, 248, 0.55) 0%, rgba(255, 198, 221, 0.38) 42%, rgba(255, 122, 177, 0.24) 100%);
}

.footer-note {
    margin-top: 24px;
    font-size: 0.8rem;
    opacity: 0.8;
    letter-spacing: 0.08em;
}

.deco-stars,
.lock-icon,
.header-deco,
.timer-deco {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.login-card,
.dashboard-card,
.quiz-card {
    padding: 36px 28px;
    text-align: center;
}

.login-card {
    width: min(86vw, 420px);
    min-height: 380px;
    padding: 34px 26px 32px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 26px;
}

.login-card form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-title {
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #f94ca9;
}

.input-label {
    display: block;
    text-align: left;
    font-size: 0.84rem;
    margin: 2px 0 8px 5px;
    color: #bf567d;
}

.combo-hint {
    font-size: 0.75rem;
    margin: -4px 0 18px;
    color: #d881a6;
}

@media (max-width: 480px) {
    .container {
        padding: 18px 14px;
    }

    .glass-card,
    .login-card,
    .dashboard-card,
    .quiz-card {
        width: min(94vw, 420px);
        padding: 28px 18px;
    }

    .bg-overlay {
        background: linear-gradient(135deg, rgba(255, 245, 248, 0.6) 0%, rgba(255, 198, 221, 0.4) 60%, rgba(255, 122, 177, 0.2) 100%);
    }
}
