* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #667eea;
}

.login-box input {
    width: 100%;
    padding: 15px;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.login-tip {
    text-align: center;
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;

.login-subtitle {
    color: white;
    font-size: 1.2rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    opacity: 0.9;
}
}

/* 主页面样式 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: bold;
    color: #667eea;
}

.btn-tips {
    padding: 8px 20px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-tips:hover {
    background: #F57C00;
    transform: translateY(-1px);
}

.btn-data {
    padding: 8px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-data:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.btn-logout {
    padding: 8px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

/* 数据提醒横幅 */
.data-notice {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFE69C 100%);
    border-left: 4px solid #FFC107;
    margin: 1rem auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.5s ease-out;
}

.data-notice.hidden {
    display: none;
}

.notice-content {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    gap: 1rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-text {
    flex: 1;
    color: #856404;
    font-weight: 600;
}

.notice-btn {
    padding: 8px 16px;
    background: #FFC107;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.notice-btn:hover {
    background: #FFB300;
    transform: translateY(-1px);
}

.notice-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.notice-close:hover {
    background: rgba(0,0,0,0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 统计面板 */
.stats-panel {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

/* 轮次选择器 */
.round-selector {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.round-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.round-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.round-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* 分类容器 */
.categories-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.category-card.active {
    border-color: #667eea;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.3);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.category-progress {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: bold;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

/* 题目列表 */
.problems-container {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
}

.problems-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.problem-wrapper {
    position: relative;
    aspect-ratio: 1;
}

.problem-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: #666;
}

.problem-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.problem-item.solved {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.problem-item.solved::after {
    content: ' ✓';
    margin-left: 2px;
}

.copy-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
    padding: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.problem-wrapper:hover .copy-btn {
    display: flex;
}

.copy-btn:hover {
    background: #667eea;
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .round-selector {
        flex-direction: column;
    }

    .round-btn {
        min-width: 100%;
    }

    .categories-container {
        grid-template-columns: 1fr;
    }

    .problems-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card, .problem-item {
    animation: fadeIn 0.3s ease-out;
}


/* 数据管理弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0;
    color: #667eea;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.data-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.data-info p {
    margin: 0.8rem 0;
    line-height: 1.6;
    color: #555;
}

.data-info strong {
    color: #333;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.action-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.export-btn:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.import-btn:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.btn-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.btn-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.3rem;
}

.btn-desc {
    font-size: 0.9rem;
    color: #888;
}

/* 响应式调整 - 弹窗和通知 */
@media (max-width: 768px) {
    .notice-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .notice-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header, .modal-body {
        padding: 1.5rem;
    }
}


/* 刷题技巧弹窗 */
.tips-modal {
    max-width: 800px;
}

.tips-intro {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #FF9800;
}

.tips-intro p {
    margin: 0;
    color: #E65100;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
}

.tip-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.tip-section:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tip-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
}

.tip-badge.round1 {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.tip-badge.round2 {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.tip-badge.round3 {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.tip-badge.round4 {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.tip-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.tip-content {
    margin: 0.8rem 0;
    line-height: 1.8;
    color: #555;
    font-size: 1rem;
}

.tip-content strong {
    color: #667eea;
}

.tip-content .highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}
