/**
 * 高考志愿填报模拟小游戏 - 主样式表
 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #f4f5f7;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: #4a6bdf;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2e4ebe;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 220px);
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.card-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-menu a:hover, 
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 页脚样式 */
.footer {
    background-color: #2d3748;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #4a6bdf;
    outline: none;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-select:focus {
    border-color: #4a6bdf;
    outline: none;
}

.form-error {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 5px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4a6bdf;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    text-align: center;
}

.btn:hover {
    background-color: #2e4ebe;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-large {
    padding: 14px 28px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-primary {
    background-color: #4a6bdf;
}

.btn-secondary {
    background-color: #718096;
}

.btn-success {
    background-color: #48bb78;
}

.btn-danger {
    background-color: #e53e3e;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #4a6bdf;
    color: #4a6bdf;
}

.btn-outline:hover {
    background-color: #4a6bdf;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 进度指示器 */
.progress-tracker {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 40px;
}

.progress-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #e2e8f0;
    color: #718096;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.progress-step.active .progress-step-number {
    background-color: #4a6bdf;
    border-color: #4a6bdf;
    color: white;
}

.progress-step.completed .progress-step-number {
    background-color: #48bb78;
    border-color: #48bb78;
    color: white;
}

.progress-step-label {
    font-size: 14px;
    color: #718096;
    white-space: nowrap;
}

.progress-step.active .progress-step-label {
    color: #4a6bdf;
    font-weight: bold;
}

/* 志愿卡片样式 */
.school-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: white;
    transition: all 0.3s;
    position: relative;
}

.school-card:hover {
    border-color: #4a6bdf;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.school-card.selected {
    border-color: #4a6bdf;
    background-color: #ebf0ff;
}

.school-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.school-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #e2e8f0;
}

.school-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.school-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.school-tag {
    background-color: #edf2f7;
    color: #4a5568;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 20px;
}

.school-tag.tag-985 {
    background-color: #fed7d7;
    color: #c53030;
}

.school-tag.tag-211 {
    background-color: #bee3f8;
    color: #2b6cb0;
}

.school-tag.tag-double {
    background-color: #c6f6d5;
    color: #2f855a;
}

.school-tag.tag-nature {
    background-color: #e6fffa;
    color: #234e52;
}

.school-tag.tag-type {
    background-color: #fef5e7;
    color: #744210;
}

.major-info {
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
}

.major-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.major-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #718096;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.category-badge.reach {
    background-color: #f56565;
}

.category-badge.match {
    background-color: #4299e1;
}

.category-badge.safety {
    background-color: #48bb78;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

/* 欢迎页面特殊样式 */
.welcome-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.welcome-card {
    max-width: 800px;
    width: 90%;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    text-align: center;
}

.welcome-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    background: linear-gradient(to right, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
    font-size: 18px;
    color: #718096;
    margin-bottom: 30px;
}

.mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.mode-card {
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.mode-card:hover {
    border-color: #4a6bdf;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mode-card.selected {
    border-color: #4a6bdf;
    background-color: #ebf0ff;
}

.mode-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2d3748;
}

.mode-desc {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
}

.province-info {
    background-color: #edf2f7;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .mode-selection {
        grid-template-columns: 1fr;
    }
    
    .progress-step-label {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

/* 加载动画 */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top-color: #4a6bdf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-text {
    margin-top: 15px;
    font-size: 18px;
    color: #4a6bdf;
}

/* 添加游戏化元素样式 */
.pixel-border {
    border-style: solid;
    border-width: 4px;
    border-image: linear-gradient(45deg, #38b2ac 0%, #4299e1 100%) 1;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.pixel-border:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
}

/* 成就徽章样式 */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    color: #7c2d12;
    margin: 4px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.achievement-badge:hover {
    transform: scale(1.05);
}

.achievement-badge .icon {
    margin-right: 5px;
    font-size: 16px;
}

/* 进度条动画效果 */
@keyframes progress-fill {
    0% { width: 0; }
    100% { width: var(--progress-width, 0%); }
}

.animated-progress-bar {
    height: 12px;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.animated-progress-bar .fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #38b2ac);
    border-radius: 6px;
    animation: progress-fill 1.5s ease-out forwards;
}

/* 像素风格按钮 */
.pixel-button {
    background: linear-gradient(to bottom, #4299e1, #3182ce);
    border: none;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    position: relative;
    transition: all 0.1s ease;
    border-radius: 4px;
    box-shadow: 0 4px 0 #2c5282;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.pixel-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2c5282;
}

.pixel-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2c5282;
}

/* 动画效果卡片 */
.animated-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
}

.animated-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.animated-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #38b2ac, #4299e1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.animated-card:hover::after {
    transform: scaleX(1);
}

/* 结果展示动画 */
@keyframes number-increment {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.incrementing-number {
    font-size: 36px;
    font-weight: bold;
    color: #4299e1;
    animation: number-increment 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 状态图标 */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-icon.success {
    background-color: #48bb78;
    color: white;
}

.status-icon.warning {
    background-color: #ecc94b;
    color: #744210;
}

.status-icon.danger {
    background-color: #f56565;
    color: white;
}

/* 设置页面样式 */
.settings-card,
.achievements-card,
.stats-card,
.points-card {
    margin-bottom: 2rem;
}

.settings-section {
    padding: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
    font-size: 1.1rem;
}

/* 切换开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* 滑块样式 */
.slider {
    -webkit-appearance: none;
    width: 70%;
    height: 10px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    margin-right: 10px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

/* 成就样式 */
.achievements-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.achievement-stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.achievement-progress {
    flex-grow: 1;
    margin-left: 2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.progress-label {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: transform 0.2s;
}

.achievement-item:hover {
    transform: translateY(-5px);
}

.achievement-item.unlocked {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

.achievement-item.locked {
    background-color: #f5f5f5;
    border-left: 4px solid #9e9e9e;
    opacity: 0.7;
}

.achievement-icon {
    font-size: 2rem;
    margin-right: 1rem;
    min-width: 40px;
    text-align: center;
}

.achievement-details {
    flex-grow: 1;
}

.achievement-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.achievement-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.achievement-points {
    font-size: 0.8rem;
    color: #4CAF50;
    font-weight: bold;
}

.achievement-loading,
.points-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.no-achievements,
.no-history {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* 统计样式 */
.stats-overview {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    min-width: 100px;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.stats-table th,
.stats-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

/* 点数样式 */
.points-overview {
    padding: 1rem;
}

.points-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.points-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #FFD700;
}

.points-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.points-label {
    font-size: 1rem;
    color: #666;
}

.points-history-title {
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.points-history-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.history-points {
    font-weight: bold;
    color: #4CAF50;
    margin-right: 1rem;
    min-width: 40px;
}

.history-details {
    flex-grow: 1;
}

.history-reason {
    margin-bottom: 0.3rem;
}

.history-time {
    font-size: 0.8rem;
    color: #999;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.modal-title {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}

.modal-footer button {
    margin-left: 0.5rem;
} 