/* PhET Simulation Styles */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-600: #475569;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body { 
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif; 
    background-color: #f8f9fa; 
    color: var(--slate-800); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 50px;
}

/* --- Common Styles --- */
.gradient-text { background: linear-gradient(90deg, #2563eb, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold; }

/* Simulation Card Styles */
.sim-card, .sim-card-alt { 
    transition: transform 0.2s, box-shadow 0.2s; 
    border: 1px solid #eee; 
    border-radius: 12px; 
    overflow: hidden; 
    background: #fff; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    text-decoration: none !important; 
    color: inherit !important; 
    margin-bottom: 20px; 
}
.sim-card:hover, .sim-card-alt:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.sim-thumb, .sim-thumb-alt { height: 160px; width: 100%; object-fit: cover; background: #e9ecef; }
.sim-content, .sim-content-alt { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.sim-title, .sim-title-alt { font-size: 18px; font-weight: bold; margin: 10px 0 5px; color: #333; flex-grow: 1; }
.sim-meta, .sim-meta-alt { font-size: 14px; color: #6c757d; }

/* Level Tags */
.level-tag, .level-tag-alt { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }
.level-263 { background-color: #d1fae5; color: #065f46; } /* 小学 */
.level-264 { background-color: #dbeafe; color: #1e40af; } /* 初中 */
.level-265 { background-color: #f3e8ff; color: #6b21a8; } /* 高中 */
.level-266 { background-color: #fee2e2; color: #991b1b; } /* 大学 */

/* Section Headers */
.section-header { text-align: center; margin: 30px 0 15px; }
.section-title, .section-title-alt { 
    font-size: 22px; 
    font-weight: 700; 
    color: #334155; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 20px;
    margin-bottom: 0;
}
.section-title::before, .section-title::after,
.section-title-alt::before, .section-title-alt::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to var(--dir, right), #82b4ca, transparent);
    max-width: 100px;
}
.section-title::after, .section-title-alt::after { --dir: left; }

/* Grid Containers */
.sim-grid-container {
    border-radius: 10px;
    padding: 15px 10px 5px;
    border: 1px solid #82b4ca;
    background: #fff;
    margin-bottom: 30px;
    margin-left: 2px;
    margin-right: 2px;
}

.sim-grid-container .row {
    margin-left: -10px;
    margin-right: -10px;
}

.sim-grid-container [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

/* --- Index Page Specific --- */
.tabs-container { margin-bottom: 15px; margin-top: 10px; text-align: center; border-radius: 8px; border: 1px solid #82b4ca; padding-bottom: 0; -webkit-overflow-scrolling: touch; }
.tabs-wrapper { display: inline-flex; position: relative; gap: 40px; white-space: nowrap; padding: 0 15px; }
.tab-btn { 
    position: relative;
    padding: 12px 0;
    font-size: 17px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none !important;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tab-btn i { font-size: 14px; opacity: 0.7; }
.tab-btn:hover { color: #3b82f6; }
.tab-btn.active { color: #3b82f6; font-weight: 700; }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #3b82f6;
    border-radius: 3px 3px 0 0;
}
.tab-btn .count-badge {
    font-size: 12px;
    background: #f3f4f6;
    color: #9ca3af;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    margin-left: 4px;
}
.tab-btn.active .count-badge { background: #eff6ff; color: #3b82f6; }

/* Pagination */
.pagination-section { margin-top: 15px; padding: 10px 0; border-top: 1px solid #e5e7eb; margin-bottom: 5px; background: #fff; border-radius: 0 0 16px 16px; }
.pagination { margin: 0; display: inline-flex; vertical-align: middle; }
.pagination > li > a, .pagination > li > span { 
    font-size: 15px; 
    padding: 10px 18px; 
    color: #4b5563; 
    border: 1px solid #e5e7eb;
    margin: 0 2px;
    border-radius: 8px !important;
    transition: all 0.2s;
}
.pagination > li > a:hover { background-color: #f9fafb; color: #3b82f6; border-color: #3b82f6; }
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover { 
    background-color: #3b82f6 !important; 
    border-color: #3b82f6 !important; 
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.total-count-label {
    display: inline-block;
    vertical-align: middle;
    margin-left: 20px;
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

/* --- Content Page Specific --- */
.content-container { 
    margin-top: 25px !important; 
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.page-header {
    margin: 5px 0 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breadcrumb-nav { 
    display: flex; 
    align-items: center; 
    font-size: 15px; 
    padding: 8px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #82b4ca;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.breadcrumb-nav a { 
    color: #4b5563; 
    text-decoration: none; 
    transition: all 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-weight: 500;
}
.breadcrumb-nav a i { color: #3b82f6; }
.breadcrumb-nav a:hover { color: #3b82f6; }
.breadcrumb-nav .separator { margin: 0 15px; color: #94a3b8; font-size: 12px; }
.breadcrumb-nav .current-item { color: #1e293b; font-weight: 700; }

.title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}
.sim-title { 
    font-size: 16px; 
    font-weight: 800; 
    color: #1e293b; 
    margin: 0; 
    letter-spacing: -0.02em; 
}
.sim-meta { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    color: #64748b; 
    font-size: 14px; 
}
.meta-item { display: flex; align-items: center; gap: 6px; }

/* Theater / Simulation Stage */
.theater-wrapper {
    background: #0f172a;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid #82b4ca;
}
.theater-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
}
.theater-title-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}
.fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    pointer-events: auto;
}
.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}
.fullscreen-btn i { font-size: 16px; }

/* Fullscreen适配 */
.theater-wrapper:fullscreen { padding: 0; border-radius: 0; background: #000; }
.theater-wrapper:fullscreen .theater-controls { padding: 15px 30px; background: rgba(0,0,0,0.8); }
.theater-wrapper:fullscreen .sim-stage { height: calc(100vh - 54px); border-radius: 0; }

.sim-stage { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.sim-stage iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Info Grid Layout */
.info-grid { display: grid; gap: 48px; align-items: start; }
.content-card { background: var(--white); padding: 18px; border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); border: 1px solid var(--slate-100); }
.section-label { font-size: 12px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; display: block; }
.rich-content { font-size: 18px; line-height: 1.8; color: var(--slate-600); }
.rich-content p { margin-bottom: 24px; }

/* Sidebar */
.sidebar-stack { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 40px; }
.info-panel { background: var(--white); padding: 32px; border-radius: var(--radius-xl); border: 1px solid var(--slate-100); box-shadow: var(--shadow-sm); }
.panel-title { font-size: 16px; font-weight: 700; color: var(--slate-900); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.panel-title i { color: var(--primary); }
.data-list { display: flex; flex-direction: column; gap: 20px; }
.data-item { display: flex; flex-direction: column; gap: 4px; }
.data-label { font-size: 11px; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.05em; }
.data-value { font-size: 15px; font-weight: 600; color: var(--slate-800); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { background: var(--slate-100); color: var(--slate-600); padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.badge:hover { background: var(--primary-light); color: var(--primary); }

/* CTA Box */
.cta-box { margin-top: 40px; padding: 40px; background: linear-gradient(135deg, var(--slate-900) 0%, #1e293b 100%); border-radius: var(--radius-xl); color: var(--white); display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.cta-text h4 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.cta-text p { font-size: 15px; opacity: 0.7; margin: 0; }
.btn-action { background: var(--primary); color: var(--white); padding: 18px 36px; border-radius: 14px; font-weight: 700; text-decoration: none !important; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 12px; box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3); white-space: nowrap; }
.btn-action:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4); background: var(--primary-dark); color: var(--white); }

/* Responsive */
@media (max-width: 1200px) {
    .info-grid { grid-template-columns: 1fr; }
    .sidebar-stack { position: static; }
    .sim-title { font-size: 40px; }
}
/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .content-container { margin: 10px auto !important; padding: 0 16px; gap: 2px; }
    .title-section { flex-direction: column; align-items: flex-start; gap: 16px; }
    .sim-title { font-size: 32px; }
    .content-card { padding: 32px; }
    .cta-box { flex-direction: column; text-align: center; padding: 32px; }
    .btn-action { width: 100%; justify-content: center; }
}
