/* 全局样式 */
:root {
    --primary-color: #00c6ff;
    --secondary-color: #0072ff;
    --accent-color: #ff3a5e;
    --dark-bg: #0f172a;
    --darker-bg: #0a1120;
    --card-bg: #1e293b;
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --text-lighter: #cbd5e1;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --glow: 0 0 15px rgba(0, 198, 255, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuGKYAZ9hiA.woff2) format('woff2');
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    transition: var(--transition);
}

.my_container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
/* 顶部导航栏 */
        .header-nav {
            background-color: rgba(15, 23, 42, 0.9);
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
            padding: 0.8rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(148, 163, 184, 0.1);
            width:100vw;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 162px;
        }
        
        .logo img {
            height: 36px;
            filter: drop-shadow(0 0 8px rgba(0, 198, 255, 0.6));
        }
        
        .logo h1 {
		        
		    all: initial;/* 重置所有可能继承的样式 */
		    color: initial;/* 或重置特定属性 */
		    
            background: linear-gradient(90deg, #00c6ff, #0072ff);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-family: 'Poppins', sans-serif;
            font-size: 1.6rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        /*
        nav ul {
            display: flex;
            list-style: none;
            gap: 1.5rem;
			padding-left:0;
			margin-left:0;

        }
        
        nav ul li {
            margin-left:0;
            min-width: 31px;
        }
        
        nav ul li a {
            color: var(--text-lighter);
            font-weight: 500;
            padding: 0.5rem 0;
            position: relative;
            font-size: 1.2rem;
            letter-spacing: 0.3px;
            text-decoration: none;
        }
        
        nav ul li a:hover {
            color: var(--primary-color);
        }
        
        nav ul li a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
            transition: var(--transition);
        }
        
        nav ul li a:hover::after {
            width: 100%;
        }
        
        .user-actions {
            display: flex;
            gap: 1rem;
            align-items: center;
            min-width: 50px;
    		justify-content: center;
        }*/
        
        .btn {
            padding: 0.6rem 1.4rem;
            border-radius: 6px;
            font-weight: 500;
            border: none;
            font-size: 0.9rem;
            letter-spacing: 0.3px;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 198, 255, 0.4);
        }
        
        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--primary-color);
            color: var(--primary-color);
        }
        
        .btn-outline:hover {
            background-color: rgba(0, 198, 255, 0.1);
        }
/****************************************************/
        
        
.user-info span {
    margin-right: 15px;
}

.auth-links a {
    margin-left: 15px;
}

.alert {
    padding: 10px;
    margin-bottom: 20px;
}

.error {
    background: #ffebee;
    color: #d32f2f;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
}

form div {
    margin-bottom: 15px;
}

label {
    display: inline-block;
}
/*
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
    padding: 5px;
    width: 200px;
}*/


/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    background-color: rgba(148, 163, 184, 0.1);
    border-color: rgba(0, 198, 255, 0.3);
}

th {
    background-color: var(--card-bg);
}

tr:hover {
    background-color: rgba(148, 163, 184, 0.05);
}
td:nth-child(2) { text-align: left; }

.center-row th { text-align: center; }


/* 答题结果标记 */
.correct { background-color: #135316a3; }
.wrong { background-color: #fd556d4d; }

/* 管理操作区 */
.admin-actions {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 30px;
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
}

/* 用户资料页专用样式 */
.profile-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    width: auto;
    margin-bottom: 5px;
    font-weight: bold;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"],
.profile-form input[type="number"] {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

/* 练习答题页面样式 */
.practice-form {
    margin: 0 auto;
}

.question-box {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.question-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.question-number {
    font-weight: bold;
    margin-right: 10px;
    color: var(--primary-color);
}

.question-text {
    flex: 1;
    font-size: 16px;
    font-weight: bold;
}

.favorite-btn {
    color: #ffc107;
    text-decoration: none;
    margin-left: 15px;
}

.favorite-btn:hover {
    color: #ff9800;
}

.form-footer {
    text-align: center;
    margin-top: 30px;
}

.check-btn {
    padding: 12px 30px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.check-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.result-summary {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    text-align: center;
}

.result-summary h3 {
    margin-top: 0;
    color: #333;
}

.no-questions {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 5px;
}

.refresh-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* 操作反馈动画 */
.alert {
    animation: fadeInOut 3s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* 结果弹窗 */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 300px;
}

.modal-content button {
    margin-top: 15px;
    padding: 8px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 题目选项 */
.options {
    margin-bottom: 0.2rem;
}
.options label {
    display: block;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: var(--transition);
    background-color: rgba(148, 163, 184, 0.05);
    font-size: 1rem;
}

.options label:hover {
    background-color: rgba(148, 163, 184, 0.1);
    border-color: rgba(0, 198, 255, 0.3);
}

.options input[type="radio"] {
    margin-right: 0.2rem;
    accent-color: var(--primary-color);
}

.question-level{
	padding: 0px 0 0 15px;
}

/* 收藏按钮样式 */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #666;
    transition: all 0.3s;
    padding: 5px;
}

.favorite-btn:hover {
    color: #ffd700;
}

.favorite-btn.active {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* 主页样式 */
.homepage {
    background: radial-gradient(circle at 20% 30%, rgba(0, 198, 255, 0.15) 0%, transparent 30%), radial-gradient(circle at 80% 70%, rgba(255, 58, 94, 0.15) 0%, transparent 30%), linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), url('../images/bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
    position: fixed;
    overflow: hidden;
    top:0;
    width: 100%;
    height: 100%;
}

.homepage h1 {
    font-size: 3.5rem;
    color: #00f0ff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.homepage p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 900px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}


/********/
.answer-feedback {
    padding: 1.5rem;
    background-color: rgba(0, 198, 255, 0.1);
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.answer-feedback h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}
/******************************************************/
/* 知识卡页面 - 炫酷卡片 */
.category-nav, .category-nav1 {
    padding: 0 1rem;
}

.category-nav  h3, .category-nav1 h3 {
    padding: 1.2rem 0.3rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.9rem -0.5rem;
    display: flex;
    align-items: center;
}

.category-nav h3::before, .category-nav1 h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    margin-right: 10px;
    border-radius: 2px;
}

.category-nav div, .category-nav1 div {
    padding: 0.5rem 0.5rem;
    margin-bottom: 0.3rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    /*display: flex;
    align-items: center;*/
    color: var(--text-light);
    white-space: nowrap;   
  	overflow: hidden;      
  	text-overflow: ellipsis; 
}

.category-nav div:hover, .category-nav1 div:hover {
    color: var(--text-color);
    background-color: rgba(148, 163, 184, 0.1);
}

.category-nav div.active, .category-nav1 div.active {
    color: var(--primary-color);
    background-color: rgba(0, 198, 255, 0.1);
    font-weight: 500;
}

.category-nav div::before, .category-nav1 div::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    margin-right: 10px;
    opacity: 0.6;
}

.category-nav div.active::before, .category-nav1 div.active::before {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    opacity: 1;
    box-shadow: 0 0 8px rgba(0, 198, 255, 0.6);
}

main h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
}

main h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    margin-left: 1rem;
    opacity: 0.3;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

.svg-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.svg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.1), rgba(0, 114, 255, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.svg-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 198, 255, 0.3);
}

.svg-card:hover::before {
    opacity: 1;
}
