/* Windows 11 风格样式 */
:root {
    --primary-color: #0078d4;
    --primary-hover: #106ebe;
    --primary-light: #e3f2fd;
    --secondary-color: #f8f9fa;
    --text-color: #202124;
    --text-muted: #5f6368;
    --border-color: #dadce0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition: all 0.2s ease;
    --success-color: #0f9d58;
    --warning-color: #f4b400;
    --error-color: #db4437;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.coins-badge {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: white;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.username {
    font-weight: 500;
    color: var(--text-color);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* 主要内容区域 */
.main-container {
    min-height: calc(100vh - 70px);
}

/* 英雄区域 */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 40px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.hero-content {
    text-align: center;
    max-width: 600px;
}

.hero-icon {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 仪表板布局 */
.dashboard {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 240px;
    background-color: #f8f9fa;
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.menu-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.content {
    flex: 1;
    padding: 32px;
    max-width: calc(100% - 240px);
}

/* 页面区块 */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

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

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 表单样式 */
.form-container {
    max-width: 600px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-suffix {
    background-color: var(--secondary-color);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    color: var(--text-muted);
    font-size: 14px;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 信息框 */
.info-box {
    background-color: var(--primary-light);
    border: 1px solid rgba(0, 120, 212, 0.2);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
}

/* 解析记录卡片 */
.records-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.record-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 20px;
    transition: var(--transition);
}

.record-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.record-domain {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.record-type {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 600;
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.record-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.record-info-label {
    color: var(--text-muted);
}

.record-info-value {
    color: var(--text-color);
    font-weight: 500;
}

.record-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 个人中心 */
.profile-container {
    max-width: 500px;
}

.profile-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 24px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.profile-item label {
    font-weight: 500;
    color: var(--text-muted);
}

.profile-value {
    font-weight: 500;
    color: var(--text-color);
}

.profile-value.coins {
    color: var(--warning-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 签到页面 */
.checkin-container {
    max-width: 400px;
    margin: 0 auto;
}

.checkin-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 40px;
    text-align: center;
}

.checkin-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.checkin-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.checkin-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.highlight {
    color: var(--warning-color);
    font-weight: 600;
}

.checkin-status {
    margin-top: 24px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-hover);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    border-bottom: none;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.modal-header + form {
    padding-top: 16px;
}

.modal form {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background-color: #323232;
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

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

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

.toast.warning {
    background-color: var(--warning-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-color);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
        padding: 12px 0;
    }
    
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 16px;
    }
    
    .menu-item {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .content {
        max-width: 100%;
        padding: 20px;
        order: 1;
    }
    
    .records-container {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .record-actions {
        flex-direction: column;
    }
}