:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(17, 24, 39, 0.95);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --border-color: rgba(75, 85, 99, 0.4);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

input {
    font-family: inherit;
    outline: none;
    border: none;
    background: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.content-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    color: var(--accent-primary);
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    width: 20px;
    height: 20px;
    margin-left: 0.5rem;
    transition: transform var(--transition-normal);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.agreement-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.agreement-text::-webkit-scrollbar {
    width: 4px;
}

.agreement-text::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.text-section {
    margin-bottom: 1rem;
}

.text-section:last-child {
    margin-bottom: 0;
}

.text-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.text-section p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.375rem;
}

.agreement-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform var(--transition-fast);
    margin-top: -2px;
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
    transform: rotate(-45deg) scale(1);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    user-select: none;
}

.verify-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 1rem;
    transition: border-color var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-prefix {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-weight: 500;
    border-right: 1px solid var(--border-color);
    padding-right: 0.5rem;
}

.form-input {
    flex: 1;
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.code-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.code-input-wrapper .form-input {
    text-align: center;
    letter-spacing: 0.5em;
    font-weight: 600;
}

.code-input-wrapper .input-wrapper {
    flex: 1;
}

.error-msg {
    font-size: 0.75rem;
    color: var(--error);
    min-height: 1.25rem;
    display: block;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--success);
}

.notice-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform var(--transition-normal);
    pointer-events: none;
    max-width: 90vw;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.btn-loader {
    display: flex;
    gap: 4px;
    align-items: center;
}

.loader-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: loaderBounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loaderBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.page-home {
    min-height: 100vh;
    position: relative;
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    will-change: transform;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 14, 23, 0.7) 0%,
        rgba(10, 14, 23, 0.85) 50%,
        rgba(10, 14, 23, 0.95) 100%
    );
}

.main-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.user-phone {
    color: var(--text-secondary);
}

.logout-link {
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.logout-link:hover {
    color: var(--accent-secondary);
}

.hero-section {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    color: var(--text-primary);
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5em;
    margin: 0.25rem 0;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    min-width: 64px;
}

.countdown-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.countdown-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.progress-section {
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-percent {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.progress-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 100px;
    transition: width 1.5s ease-out;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-fill[style*="%"] ~ .progress-glow {
    opacity: 1;
}

.progress-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.features-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--accent-primary);
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.site-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.server-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.music-player {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.music-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.music-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.music-toggle.music-paused {
    animation: pulseRed 1.5s ease-in-out infinite;
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.music-toggle svg,
.music-next svg {
    width: 18px;
    height: 18px;
}

.music-next {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.music-next:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.music-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .music-player {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.625rem 1rem;
    }

    .music-status {
        max-width: 160px;
        font-size: 0.8125rem;
    }

    .music-toggle {
        width: 36px;
        height: 36px;
    }

    .music-toggle svg {
        width: 20px;
        height: 20px;
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blinkCursor 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-primary); }
}

@media (max-width: 767px) {
    .content-card {
        background: rgba(17, 24, 39, 0.78);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}

@media (min-width: 768px) {
    .page-wrapper {
        padding: 2rem;
    }

    .content-card {
        padding: 2.5rem;
        max-width: 480px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .agreement-text {
        max-height: 280px;
    }

    .main-content {
        padding: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .countdown-item {
        padding: 1rem 1.5rem;
        min-width: 90px;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .content-card {
        max-width: 520px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .countdown-wrapper {
        gap: 1.25rem;
    }

    .countdown-item {
        padding: 1.25rem 2rem;
        min-width: 110px;
    }

    .countdown-value {
        font-size: 3.5rem;
    }

    .features-grid {
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem;
    }
}

@media (max-width: 374px) {
    html {
        font-size: 14px;
    }

    .content-card {
        padding: 1.25rem;
        background: rgba(17, 24, 39, 0.75);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .countdown-item {
        padding: 0.625rem 0.75rem;
        min-width: 56px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .parallax-bg {
        background-size: cover;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
