
/* 保留原有所有样式 */
* {margin: 0; padding: 0; box-sizing: border-box;}
:root {
    --math-blue: #165DFF;
    --physics-green: #00B42A;
    --chem-orange: #FF7D00;
    --dark-bg: #0F172A;
    --light-bg: #1E293B;
    --text-white: #F8FAFC;
    --text-gray: #94A3B8;
}
body { 
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif; 
    min-height: 100vh;
    margin: 0;
    padding: 50px 20px;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.85) 100%),
        url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-white);
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(22, 93, 255, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(0, 180, 42, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 40% 40%, rgba(255, 125, 0, 0.1) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* 右上角用户信息栏 - 修改为登录/注册按钮 */
.user-info {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    color: var(--text-white);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}
.user-info span {
    color: var(--math-blue);
    font-weight: 600;
    font-size: 15px;
}
.auth-btn {
    padding: 6px 12px;
    background: linear-gradient(90deg, var(--math-blue), #4A7CFF);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.auth-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.4);
}
.logout-btn {
    margin-left: 15px;
    padding: 6px 12px;
    background: linear-gradient(90deg, #FF4757, #FF3838);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}
.logout-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    background: linear-gradient(90deg, #FF3838, #FF2B2B);
}
.register-btn {
    background: linear-gradient(90deg, var(--physics-green), #2CD261);
}
.register-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 180, 42, 0.4);
}

.main-title {
    text-align: center;
    margin: 40px 0 60px;
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(90deg, var(--math-blue), var(--physics-green), var(--chem-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(22, 93, 255, 0.3);
    position: relative;
    transition: all 0.5s ease;
}
.main-title:hover {
    text-shadow: 0 0 30px rgba(22, 93, 255, 0.5), 0 0 60px rgba(0, 180, 42, 0.3);
    transform: scale(1.02);
}
.main-title::after {
    content: '&#128218;';
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(50%);
    font-size: 1.2em;
    opacity: 0.5;
    filter: blur(2px);
}
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.grade-card {
    width: 350px;
    padding: 45px 30px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.grade-card.grade10 {
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.2) 0%, rgba(22, 93, 255, 0.4) 100%);
    border: 1px solid rgba(22, 93, 255, 0.3);
}
.grade-card.grade11 {
    background: linear-gradient(135deg, rgba(0, 180, 42, 0.2) 0%, rgba(0, 180, 42, 0.4) 100%);
    border: 1px solid rgba(0, 180, 42, 0.3);
}
.grade-card.grade12 {
    background: linear-gradient(135deg, rgba(255, 125, 0, 0.2) 0%, rgba(255, 125, 0, 0.4) 100%);
    border: 1px solid rgba(255, 125, 0, 0.3);
}
.grade-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 
                0 0 40px rgba(22, 93, 255, 0.3) inset;
    border-color: rgba(255, 255, 255, 0.5);
}
.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.8s ease;
}
.grade-card:hover::before {
    left: 100%;
}
.grade-card h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}
.grade-card p {
    color: var(--text-gray);
    font-size: 1.1em;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}
.grade-card:hover p {
    color: var(--text-white);
}
.grade-card .subject-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.grade-card:hover .subject-icon {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 15px currentColor;
}
.grade10 .subject-icon { color: var(--math-blue); }
.grade11 .subject-icon { color: var(--physics-green); }
.grade12 .subject-icon { color: var(--chem-orange); }

/* 登录提示弹窗样式 */
.login-prompt {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.login-prompt.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.login-prompt h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--text-white);
    background: linear-gradient(90deg, var(--math-blue), var(--physics-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-prompt p {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
}
.prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.prompt-btn {
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}
.prompt-login {
    background: linear-gradient(135deg, var(--math-blue), #4A7CFF);
    color: white;
}
.prompt-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
}
.overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2em;
    }
    .grade-card {
        width: 90%;
        padding: 35px 25px;
    }
    .grade-card:hover {
        transform: translateY(-10px) rotateX(3deg) rotateY(3deg) scale(1.02);
    }
    .user-info {
        padding: 8px 15px;
        font-size: 13px;
    }
    .login-prompt {
        padding: 30px 20px;
    }
}