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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 缩放适配样式 */
html {
    font-size: 16px;
}

/* 高缩放（150%+）适配 */
html[data-zoom="high"] {
    font-size: 14px;
}

html[data-zoom="high"] .main-container {
    padding: 8px 16px 6px;
}

html[data-zoom="high"] .content-wrapper {
    padding: 12px;
    gap: 12px;
}

html[data-zoom="high"] .top-section {
    gap: 16px;
}

html[data-zoom="high"] .hero-area {
    padding: 20px;
}

html[data-zoom="high"] .hero-title {
    font-size: 1.8rem;
}

html[data-zoom="high"] .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

/* 中等缩放（125%-149%）适配 */
html[data-zoom="medium"] {
    font-size: 15px;
}

html[data-zoom="medium"] .main-container {
    padding: 10px 20px 7px;
}

html[data-zoom="medium"] .content-wrapper {
    padding: 14px;
}

html[data-zoom="medium"] .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

/* 低缩放（80%以下）适配 */
html[data-zoom="low"] {
    font-size: 17px;
}

html[data-zoom="low"] .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* 窄视口适配（小窗口或高缩放） */
html.viewport-narrow .content.grid {
    grid-template-columns: 1fr;
}

html.viewport-narrow .top-section {
    grid-template-columns: 1fr;
}

html.viewport-narrow .hero-area {
    min-height: auto;
}

html.viewport-narrow .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

html.viewport-narrow .card {
    padding: 12px;
}

html.viewport-narrow .card-icon {
    width: 36px;
    height: 36px;
}

html.viewport-narrow .card-title {
    font-size: 0.85rem;
}

body {
    background: #0a0a0f;
    color: #f8fafc;
    position: relative;
}

body.gradient-bg {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

.bg-layer, .bg-ambient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 60%);
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 12s ease-in-out infinite;
}

.bg-orb.cyan { width: 400px; height: 400px; background: #06b6d4; top: -100px; right: -100px; }
.bg-orb.blue { width: 350px; height: 350px; background: #3b82f6; bottom: -80px; left: -80px; animation-delay: -4s; }
.bg-orb.purple { width: 300px; height: 300px; background: #8b5cf6; top: 40%; right: 20%; animation-delay: -8s; }
.bg-orb.red { width: 400px; height: 400px; background: #ef4444; top: -100px; right: -100px; }
.bg-orb.orange { width: 350px; height: 350px; background: #f97316; bottom: -80px; left: -80px; animation-delay: -4s; }
.bg-orb.pink { width: 300px; height: 300px; background: #ec4899; top: 40%; right: 20%; animation-delay: -8s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.browser-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff;
    padding: 16px 24px;
    z-index: 9999;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    display: none;
}

.browser-warning.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.browser-warning-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.browser-warning-text {
    flex: 1;
}

.browser-warning-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.browser-warning-desc {
    opacity: 0.95;
}

.browser-warning-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.browser-warning-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 12px 24px 8px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
}

.brand-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(12px);
}

.brand-icon.red-theme::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(236, 72, 153, 0.15) 50%, transparent 70%);
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.brand-text h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #f8fafc;
}

.brand-text p {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.breadcrumb-separator {
    color: #64748b;
    margin: 0 6px;
    font-weight: 400;
}

.breadcrumb-current {
    color: #06b6d4;
    font-weight: 600;
}

.breadcrumb-current.red {
    color: #ef4444;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.status-text {
    font-size: 12px;
    color: #4ade80;
    font-weight: 500;
}

.admin-button, .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
}

.admin-button:hover, .back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
}

.content-wrapper, .content {
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.content-wrapper {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content.grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.top-section {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.hero-area {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 28px;
    font-weight: 600;
    color: #f9fafb;
    letter-spacing: -0.3px;
}

.hero-subtitle {
    font-size: 16px;
    color: #9ca3af;
    margin-bottom: 24px;
    line-height: 1.5;
}

.entry-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.entry-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    min-height: 0;
}

.entry-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
    transform: translateY(-2px);
}

.entry-emoji {
    font-size: 28px;
    margin-bottom: 6px;
}

.entry-name {
    font-size: 18px;
    font-weight: 600;
    color: #f3f4f6;
}

.entry-desc {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 2px;
}

.summary-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.summary-header-line {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.summary-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.summary-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    min-height: 0;
}

.summary-card:hover {
    background: #374151;
    border-color: #4b5563;
}

.summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #374151;
    border: none;
}

.summary-card:nth-child(1) .summary-icon {
    background: #1e3a5f;
}

.summary-card:nth-child(2) .summary-icon {
    background: #064e3b;
}

.summary-card:nth-child(3) .summary-icon {
    background: #3730a3;
}

.summary-card:nth-child(4) .summary-icon {
    background: #065f46;
}

.summary-card:nth-child(5) .summary-icon {
    background: #78350f;
}

.summary-card:nth-child(6) .summary-icon {
    background: #831843;
}

.summary-info {
    flex: 1;
}

.summary-value {
    font-size: 25px;
    font-weight: 600;
    color: #f9fafb;
    line-height: 1.2;
}

.summary-label {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 0px;
}

.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 0;
    flex: 1;
}

.bottom-panel {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title-line {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #06b6d4, #3b82f6);
    border-radius: 2px;
}

.panel-title-line.red {
    background: linear-gradient(180deg, #ef4444, #f97316);
}

.panel-title h2, .panel-title h3 {
    font-size: 23px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.2px;
}

.panel-badge {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 19px;
    color: #94a3b8;
    font-weight: 500;
}

.panel-badge.blue {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.panel-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.tiles-grid, .subject-bars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 200px;
    overflow: visible;
}

.subject-bars-grid {
    display: flex;
    gap: 8px;
    min-height: 0;
    height: 100%;
    align-items: flex-end;
    padding: 10px 4px;
    overflow: visible;
    flex: 1;
}

.tile-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
}

.tile-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(148, 163, 184, 0.3);
    transform: scale(1.02);
    z-index: 1;
}

.tile-card.recent-tile {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.tile-card.recent-tile:hover {
    background: #1f2937;
    border-color: #4b5563;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tile-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tile-count {
    font-size: 37px;
    font-weight: 700;
    color: #f9fafb;
    line-height: 1;
    letter-spacing: -1px;
}

.tile-unit {
    font-size: 15px;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 2px;
}

.tile-name {
    font-size: 16px;
    font-weight: 500;
    color: #9ca3af;
}

.tile-meta {
    display: flex;
    align-items: center;
}

.tile-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tile-rate {
    font-size: 16px;
    font-weight: 600;
    color: #818cf8;
    padding: 5px 10px;
    background: rgba(129, 140, 248, 0.15);
    border-radius: 16px;
}

.tile-rate.high {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.tile-rate.medium {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.tile-rate.low {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}

.tile-time {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    padding: 4px 8px;
    background: rgba(156, 163, 175, 0.15);
    border-radius: 12px;
}

.tile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.tile-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tile-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}

.tile-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.subject-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 50px;
    max-width: 90px;
    height: 100%;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.subject-bar-item:hover {
    transform: translateY(-5px);
    filter: brightness(1.2);
}

.subject-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    min-height: 120px;
}

.subject-bar-track {
    width: 100%;
    flex: 1;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.subject-bar-60-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 40%;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    z-index: 5;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.subject-bar-60-line::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.subject-bar-60-line span {
    position: absolute;
    right: 4px;
    top: -18px;
    font-size: 10px;
    font-weight: 700;
    color: #f87171;
    text-shadow: 0 0 4px rgba(248, 113, 113, 0.5);
}

.subject-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 10px;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    min-height: 4px;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: barGrow 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.subject-bar-fill.pass {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.subject-bar-fill.fail {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.5), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.subject-bar-fill.pass:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.7);
}

.subject-bar-fill.fail:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 25px rgba(248, 113, 113, 0.7);
}

@keyframes barGrow {
    from { height: 0; }
}

.subject-bar-value {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    z-index: 10;
}

.subject-bar-value.pass {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(74, 222, 128, 0.5);
}

.subject-bar-value.fail {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(248, 113, 113, 0.5);
}

.subject-bar-item:hover .subject-bar-value {
    transform: scale(1.15);
}

.subject-bar-name {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
    letter-spacing: 1px;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 8px;
    box-sizing: border-box;
}

.panel {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: all 0.3s ease;
}

.panel:hover {
    border-color: rgba(148, 163, 184, 0.25);
}

.sidebar-panel, .detail-panel, .main-panel, .quiz-panel {
    overflow-y: auto;
}

.sidebar-panel::-webkit-scrollbar,
.detail-panel::-webkit-scrollbar,
.main-panel::-webkit-scrollbar,
.quiz-panel::-webkit-scrollbar {
    width: 6px;
}

.sidebar-panel::-webkit-scrollbar-track,
.detail-panel::-webkit-scrollbar-track,
.main-panel::-webkit-scrollbar-track,
.quiz-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-panel::-webkit-scrollbar-thumb,
.detail-panel::-webkit-scrollbar-thumb,
.main-panel::-webkit-scrollbar-thumb,
.quiz-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.subject-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-item {
    position: relative;
}

.subject-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.subject-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.25);
    transform: translateX(4px);
}

.subject-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
}

.subject-btn.active.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.2));
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.subject-btn.active .subject-name {
    color: #f8fafc;
}

.subject-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.subject-btn.active .subject-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.3));
}

.subject-btn.active.red .subject-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(249, 115, 22, 0.3));
}

.subject-info {
    flex: 1;
}

.subject-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 16px;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.detail-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.detail-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(249, 115, 22, 0.3));
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.detail-title-info h2 {
    font-size: 23px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.detail-title-info p {
    font-size: 14px;
    color: #64748b;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.greeting-time-horizontal {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

.greeting-time-horizontal.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.time-display {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 25px;
    font-weight: 700;
    color: #06b6d4;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.time-display.red {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.greeting-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #cbd5e1;
    padding-left: 14px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    transition: all 0.25s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.2);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.06);
}

.stat-card:nth-child(1) .stat-card-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(6, 182, 212, 0.1));
}

.stat-card:nth-child(1) .stat-card-icon.red-theme {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
}

.stat-card:nth-child(2) .stat-card-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.1));
}

.stat-card:nth-child(3) .stat-card-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
}

.stat-card:nth-child(4) .stat-card-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(249, 115, 22, 0.1));
}

.stat-card-info {
    flex: 1;
}

.stat-card-value {
    font-size: 25px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.1;
}

.stat-card-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.stat-card-trend {
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: #4ade80; }
.trend-down { color: #f87171; }

.chapters-section {
    flex: 1;
}

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

.chapters-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapters-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e1;
}

.chapters-count {
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: #06b6d4;
    font-weight: 600;
}

.chapters-count.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.chapters-grid, .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    transition: all 0.4s ease;
}

.grid-container.has-expanded .card:not(.expanded) {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.grid-container.has-expanded .card.expanded {
    grid-column: 1 / -1;
    max-width: 100%;
}

.chapter-card, .card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.card.expanded {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(6, 182, 212, 0.1);
    transform: scale(1);
    animation: expandCard 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.expanded.red {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(239, 68, 68, 0.1);
}

@keyframes expandCard {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.card.expanded .card-title {
    font-size: 20px;
}

.card.expanded .section-info {
    padding: 16px;
    margin: 16px 0;
}

.card.expanded .section-info-value {
    font-size: 18px;
}

.card.expanded .section-actions {
    margin-top: 16px;
}

.card.expanded .btn-small {
    padding: 10px 16px;
    font-size: 14px;
}

.chapter-card::before, .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card.red::before {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.chapter-card:hover, .card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.chapter-card:hover::before, .card:hover::before {
    opacity: 1;
}

.chapter-header, .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.chapter-name, .card-title {
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.4;
}

.card-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapter-number, .card-number {
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 6px;
    font-size: 14px;
    color: #06b6d4;
    font-weight: 600;
}

.card-number.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.chapter-stats, .card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.chapter-stat, .card-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chapter-stat-value, .card-stat-value {
    font-size: 21px;
    font-weight: 700;
    color: #f8fafc;
}

.chapter-stat-value.loading, .card-stat-value.loading {
    color: #475569;
}

.chapter-stat-value.has-data {
    color: #22d3ee;
}

.card-stat-value.has-data {
    color: #ef4444;
}

.chapter-stat-label, .card-stat-label {
    font-size: 14px;
    color: #64748b;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.red {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.section-card .section-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card.expanded .section-info {
    grid-template-columns: repeat(5, 1fr);
    padding: 16px;
    gap: 16px;
}

.card.expanded.red .section-info {
    grid-template-columns: repeat(4, 1fr);
}

.section-card .section-info-item {
    text-align: center;
}

.section-card .section-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.section-card .section-info-value.percent {
    color: #ef4444;
}

.section-card .section-info-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.card.expanded .section-info-value {
    font-size: 20px;
}

.card.expanded .section-info-label {
    font-size: 13px;
}

.section-card .section-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-small {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-start {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
}

.btn-start.red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-start.red:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-stats {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-stats:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(148, 163, 184, 0.3);
}

.question-stats-panel {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.question-stats-panel.expanded {
    display: block;
    max-height: 2000px;
    opacity: 1;
    animation: slideDown 0.4s ease;
}

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

.card.expanded .question-stats-panel.expanded {
    margin-top: 24px;
    padding-top: 24px;
}

.card.expanded .question-item {
    padding: 14px 16px;
    margin-bottom: 10px;
}

.card.expanded .question-num {
    font-size: 16px;
}

.card.expanded .question-type-badge {
    font-size: 13px;
    padding: 3px 10px;
}

.card.expanded .question-status {
    font-size: 13px;
    padding: 4px 12px;
}

.question-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 100px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.question-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.question-num {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    flex-shrink: 0;
}

.question-type-badge {
    padding: 2px 8px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 4px;
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.question-preview {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.question-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.question-stat {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.question-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #f8fafc;
}

.question-stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.question-status.mastered {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.question-status.partial {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.question-status.need-work {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.question-status.not-started {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    font-size: 14px;
}

.breadcrumb-item {
    color: #64748b;
    cursor: pointer;
    transition: color 0.25s ease;
    text-decoration: none;
}

.breadcrumb-item:hover {
    color: #06b6d4;
}

.breadcrumb-item.red:hover {
    color: #ef4444;
}

.breadcrumb-item.active {
    color: #06b6d4;
    font-weight: 600;
}

.breadcrumb-item.active.red {
    color: #ef4444;
}

.breadcrumb-divider {
    color: #475569;
}

.main-panel, .quiz-panel {
    flex: 1;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 24px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    flex-wrap: wrap;
    gap: 12px;
}

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

.question-number {
    font-size: 22px;
    font-weight: 600;
    color: #f8fafc;
}

.question-type {
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 8px;
    font-size: 15px;
    color: #06b6d4;
    font-weight: 600;
}

.question-type.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.question-content {
    font-size: 20px;
    line-height: 1.8;
    color: #e2e8f0;
    margin-bottom: 24px;
    min-height: 80px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    word-wrap: break-word;
    word-break: break-all;
    text-align: left;
}

.question-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.options-container {
    margin: 20px 0;
}

.option {
    display: flex;
    align-items: flex-start;
    padding: 14px 18px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.option:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

.option.selected {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.option input[type="checkbox"] {
    margin-right: 14px;
    cursor: pointer;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #06b6d4;
}

.option-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.option-label {
    font-weight: 600;
    min-width: 24px;
    font-size: 18px;
    color: #94a3b8;
}

.option-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.5;
    color: #e2e8f0;
    word-break: break-all;
    white-space: normal;
    text-align: left;
}

.answer-input-container {
    margin-bottom: 24px;
}

.answer-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    font-size: 18px;
    font-family: inherit;
    color: #f1f5f9;
    transition: all 0.25s ease;
    resize: vertical;
    min-height: 80px;
}

.answer-input::placeholder {
    color: #64748b;
}

.answer-input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.submit-btn {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.feedback-container {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    display: none;
    border: 1px solid;
}

.feedback-correct {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.feedback-incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.feedback-content {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
}

.feedback-correct .feedback-content {
    color: #4ade80;
}

.feedback-incorrect .feedback-content {
    color: #f87171;
}

.question-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    color: #64748b;
}

.stat-value {
    font-weight: 600;
    color: #f8fafc;
}

.correct-answer {
    font-size: 17px;
    color: #94a3b8;
    margin-bottom: 16px;
    line-height: 1.5;
}

.tip-container {
    margin-top: 16px;
    padding: 16px;
    background: rgba(234, 179, 8, 0.1);
    border-radius: 8px;
    border-left: 3px solid #facc15;
}

.tip-title {
    font-weight: 600;
    color: #facc15;
    margin-bottom: 8px;
    font-size: 16px;
}

.tip-content {
    font-size: 17px;
    color: #e2e8f0;
    line-height: 1.5;
}

.tip-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
}

.next-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.wrong-book-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.wrong-book-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.wrong-book-modal {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wrong-book-modal-overlay.show .wrong-book-modal {
    transform: scale(1);
}

.wrong-book-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.wrong-book-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 12px;
}

.wrong-book-modal-content {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wrong-book-modal-reason {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
    font-size: 14px;
    color: #f87171;
}

.wrong-book-modal-countdown {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.wrong-book-modal-countdown span {
    color: #f87171;
    font-weight: 600;
    font-size: 18px;
}

.wrong-book-modal-btn {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.wrong-book-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.time-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #06b6d4;
    font-family: 'SF Mono', monospace;
}

.time-counter::before {
    content: '⏱️';
    font-size: 16px;
}

@media (max-width: 768px) {
    .main-container {
        padding: 16px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .question-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.6s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    font-size: 15px;
    color: #f8fafc;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    outline: none;
    border-color: #06b6d4;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    transition: color 0.3s ease;
}

.form-input:focus ~ .input-icon {
    color: #06b6d4;
}

.captcha-section {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.captcha-box {
    flex: 1;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #22d3ee;
    letter-spacing: 4px;
    user-select: none;
    min-height: 52px;
}

.captcha-input-wrapper {
    flex: 1;
}

.captcha-input-wrapper .form-input {
    padding-left: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.3), transparent);
    margin: 20px 0;
}

.footer-line {
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 480px) {
    .main-container {
        padding: 16px 20px;
    }
    
    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 20px;
    }
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 10px 0 5px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    gap: 20px;
}

.copyright {
    flex: 1;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.version {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-label {
    font-size: 12px;
    color: #64748b;
}

.version-badge {
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    font-size: 11px;
    color: #a78bfa;
    font-weight: 600;
}

.footer .time {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
}

.welcome-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 500px;
    line-height: 1.6;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

/* 最近7天学习记录样式 */
.weekly-learning-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) rgba(148, 163, 184, 0.1);
}

.weekly-learning-grid::-webkit-scrollbar {
    height: 6px;
}

.weekly-learning-grid::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

.weekly-learning-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.weekly-learning-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.daily-learning-card {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 160px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    position: relative;
    min-height: 200px;
    text-align: center;
    overflow: hidden;
}

.daily-learning-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.daily-learning-card.today {
    border-color: #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.daily-learning-card.no-data {
    opacity: 0.6;
}

.daily-week-day {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 2px;
}

.daily-date {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.daily-divider {
    width: 80%;
    height: 1px;
    background: rgba(148, 163, 184, 0.1);
    margin: 8px 0;
}

.daily-questions-label {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    margin-bottom: 4px;
}

.daily-questions {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
    margin-bottom: 8px;
}

.daily-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: 6px 0;
    width: 100%;
}

.daily-subject-tag {
    padding: 2px 6px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.daily-subject-tag.more {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.daily-attempts {
    font-size: 11px;
    color: #64748b;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.daily-evaluation {
    margin-top: auto;
    text-align: center;
    width: 100%;
    margin-bottom: 6px;
}

.daily-evaluation-text {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.daily-rate-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.daily-evaluation.excellent .daily-rate-value,
.daily-evaluation.excellent .daily-evaluation-text {
    color: #4ade80;
}

.daily-evaluation.good .daily-rate-value,
.daily-evaluation.good .daily-evaluation-text {
    color: #22d3ee;
}

.daily-evaluation.effort .daily-rate-value,
.daily-evaluation.effort .daily-evaluation-text {
    color: #fbbf24;
}

.daily-evaluation.bad .daily-rate-value,
.daily-evaluation.bad .daily-evaluation-text {
    color: #ef4444;
}

.daily-time {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.daily-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    color: #64748b;
    font-size: 12px;
}

.daily-no-data-icon {
    font-size: 24px;
}

.weekly-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    padding: 40px 0;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cache-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    font-size: 11px;
    color: #a78bfa;
    font-weight: 500;
}

.day-details-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.view-more-btn {
    padding: 6px 12px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    font-size: 12px;
    color: #22d3ee;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-more-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: #22d3ee;
    transform: translateY(-1px);
}

/* 弹出窗口样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    width: 60%;
    max-width: 60vw;
    max-height: 90vh;
    height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
}

.modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 12px;
}

.tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: #22d3ee;
    color: #22d3ee;
}

.tab-btn:hover {
    border-color: #64748b;
    color: #f8fafc;
}

/* 日历视图样式 */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.calendar-nav {
    padding: 6px 12px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f8fafc;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    width: 100%;
    min-height: 400px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    padding: 8px;
    color: #64748b;
}

.calendar-day {
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 80px;
    font-size: 14px;
}

.calendar-day:hover {
    background: rgba(148, 163, 184, 0.05);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calendar-day.has-data {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
}

.calendar-day.current-month {
    color: #f8fafc;
}

.calendar-day.other-month {
    color: #475569;
    opacity: 0.6;
}

.calendar-day-number {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f8fafc;
}

.calendar-day-data {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-day-data span {
    display: block;
}

/* 日卡片详情样式 */
.day-details-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.day-detail-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.day-detail-stat-label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.day-detail-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
}

.day-detail-stat-value.success {
    color: #4ade80;
}

.day-detail-stat-value.info {
    color: #a78bfa;
}

.day-details-section {
    margin-bottom: 20px;
}

.day-details-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 12px;
}

.day-details-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-detail-subject {
    padding: 6px 12px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    font-size: 14px;
    color: #94a3b8;
}

.day-details-stats-list {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    padding: 20px;
}

.day-details-stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.day-details-stat-item:last-child {
    margin-bottom: 0;
}

.day-details-stat-item span:first-child {
    color: #94a3b8;
}

.day-details-stat-item span:last-child {
    color: #f8fafc;
    font-weight: 600;
}

.day-details-stat-item span.success {
    color: #4ade80;
    font-weight: 600;
}

/* 列表视图样式 */
.list-header {
    margin-bottom: 20px;
}

.list-header input[type="date"] {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 14px;
}

.learning-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.learning-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.learning-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.2);
}

.learning-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.learning-item-date {
    font-size: 14px;
    font-weight: 600;
    color: #f8fafc;
}

.learning-item-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.learning-item-subject {
    padding: 2px 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    font-size: 11px;
    color: #a78bfa;
}

.learning-item-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.learning-item-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.empty-desc {
    font-size: 13px;
    color: #64748b;
}

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

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

.slide-in {
    animation: slideIn 0.4s ease;
}

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

.panel-title-bar {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #06b6d4, #3b82f6);
    border-radius: 2px;
}