* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 0.875rem 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), #f093fb);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
}

.nav-link.active::before {
    width: 100%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.8), 0 0 30px rgba(240, 147, 251, 0.5);
    }
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 1001;
    position: relative;
}

.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.dark-mode-toggle:hover .dark-mode-icon {
    transform: rotate(15deg);
}

.dark-mode-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    overflow: hidden;
}

.user-info:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.user-dropdown a:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.hero {
    min-height: 420px;
    max-height: 50vh;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero-carousel {
    position: relative;
    height: calc(100% - 70px);
    min-height: 350px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6rem;
    color: white;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.carousel-slide.prev {
    transform: translateX(-30px);
}

.carousel-slide:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.carousel-slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.carousel-slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.carousel-slide:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.carousel-slide:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.slide-content {
    max-width: 600px;
    z-index: 2;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.slide-visual {
    font-size: 12rem;
    animation: float 4s ease-in-out infinite;
    z-index: 1;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-visual canvas {
    background: transparent;
    border: none;
    display: block;
}

.pendulum-demo {
    position: relative;
    width: 280px;
    height: 350px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: none;
    filter: none;
}

.pendulum-mount {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 18px;
    background: linear-gradient(180deg, #8B4513 0%, #654321 50%, #5D3A1A 100%);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.pendulum-arm {
    position: absolute;
    top: 48px;
    left: 50%;
    width: 4px;
    height: 170px;
    margin-left: -2px;
    transform-origin: top center;
    animation: pendulumSwing 2s ease-in-out infinite;
}

.pendulum-arm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(90deg, #D2691E 0%, #CD853F 50%, #D2691E 100%);
    border-radius: 2px;
}

.pendulum-ball {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFD700 0%, #DAA520 40%, #B8860B 70%, #8B6914 100%);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 -8px 15px rgba(0, 0, 0, 0.3),
        inset 0 5px 10px rgba(255, 255, 255, 0.2);
}

.pendulum-highlight {
    position: absolute;
    top: 12px;
    left: 16px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 70%);
}

.pendulum-shadow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 50px;
    height: 12px;
    margin-left: -25px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: scaleX(0.8);
    animation: pendulumShadow 2s ease-in-out infinite;
}

@keyframes pendulumSwing {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(-30deg); }
}

@keyframes pendulumShadow {
    0%, 100% { transform: translateX(55px) scaleX(0.8); }
    50% { transform: translateX(-55px) scaleX(0.8); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.875rem;
    z-index: 10;
}

.indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
    left: 30px;
}

.carousel-next {
    right: 30px;
}

.features-section {
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.quick-access {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #e0f2fe 100%);
    max-width: 1400px;
    margin: 0 auto;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
}

.quick-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.quick-card:hover::before {
    transform: scaleX(1);
}

.quick-icon {
    font-size: 2rem;
    margin-bottom: 0.875rem;
    transition: transform 0.3s ease;
}

.quick-card:hover .quick-icon {
    transform: translateY(-3px);
}

.quick-card h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 1rem;
}

.quick-count {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

footer {
    background: #0f172a;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-logo .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: white;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.copyright {
    color: #64748b;
    font-size: 0.85rem;
}

.main-content {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.25rem;
    position: fixed;
    left: 0;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.category-tab {
    flex: 1;
    padding: 0.625rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.tab-icon {
    font-size: 0.95rem;
}

.category-tab.active,
.category-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.category-tree {
    padding-left: 0.25rem;
}

.tree-section {
    display: block;
}

.tree-section.hidden {
    display: none;
}

.tree-item {
    padding: 0.5rem 0.625rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.tree-children {
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
}

.tree-item:hover {
    background: rgba(59, 130, 246, 0.06);
}

.tree-item.parent {
    font-weight: 580;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tree-item.child {
    padding: 0.4rem 0.625rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: 0;
    padding-left: 0;
}

.tree-item.child .child-icon {
    margin-left: 20px;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tree-item.child:hover {
    background: rgba(59, 130, 246, 0.04);
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    transition: transform 0.25s ease;
    color: var(--text-secondary);
}

.tree-item.expanded .tree-toggle {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.tree-icon {
    font-size: 0.9rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.child-icon {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.7;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tree-children {
    display: none;
    margin-top: 0.25rem;
}

.tree-item.expanded > .tree-children {
    display: block;
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.tree-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.tree-item.child.active {
    background: rgba(59, 130, 246, 0.08);
}

.content-area {
    flex: 1;
    margin-left: 260px;
    padding: 1.75rem;
    background: var(--bg-primary);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.content-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination.visible {
    display: flex;
}

.pagination-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-bar input {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 280px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    padding: 0.625rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.experiment-grid,
.question-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.experiment-card,
.question-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    will-change: transform;
}

.experiment-card:hover,
.question-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* 卡片缩略图样式 */
.exp-thumbnail,
.q-thumbnail {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.exp-thumbnail img,
.q-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exp-thumbnail::after,
.q-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}

/* 服务器缩略图样式 */
.exp-thumbnail img.server-thumbnail,
.q-thumbnail img.server-thumbnail {
    transition: transform 0.3s ease;
}

.exp-thumbnail:hover img.server-thumbnail,
.q-thumbnail:hover img.server-thumbnail {
    transform: scale(1.05);
}

/* ==================== 懒加载样式 ==================== */
.thumbnail-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

img.lazy-thumbnail {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy-thumbnail.loaded {
    opacity: 1;
}

img.lazy-thumbnail.loaded + .thumbnail-loading {
    display: none;
}

@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.skeleton-thumbnail {
    aspect-ratio: 4/3;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

.skeleton-info {
    padding: 0.875rem 1rem;
}

.skeleton-title {
    height: 18px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-meta {
    display: flex;
    gap: 0.5rem;
}

.skeleton-category,
.skeleton-difficulty {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-category {
    width: 60px;
}

.skeleton-difficulty {
    width: 50px;
}

/* 缩略图加载完成动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.experiment-card .exp-thumbnail img.loaded,
.question-card .q-thumbnail img.loaded {
    animation: fadeInUp 0.3s ease forwards;
}

.exp-info,
.q-info {
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}

.exp-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exp-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.exp-difficulty {
    font-size: 0.85rem;
    color: #f59e0b;
}

.exp-info h3,
.q-info h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 1rem;
}

.exp-info p,
.q-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.625rem;
    line-height: 1.5;
}

.exp-tags,
.q-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.experiment-list,
.question-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experiment-item,
.question-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    padding: 1.375rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.experiment-item:hover,
.question-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.exp-icon,
.q-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.exp-info,
.q-info {
    flex: 1;
    min-width: 0;
}

.exp-info h3,
.q-info h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 1.05rem;
}

.exp-info p,
.q-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-tags,
.q-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.725rem;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.tag.difficulty {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
}

.exp-action,
.q-action {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.exp-action:hover,
.q-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.exp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.modal.active {
    display: flex;
    animation: fadeInModal 0.25s ease;
}

.exp-modal.active {
    display: flex;
    animation: fadeInModal 0.25s ease;
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 1400px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 78vw;
    width: 78vw;
    max-height: 92vh;
    height: 92vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.close-btn:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.exp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 1rem;
    border-bottom: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: auto;
    height: auto;
}

.exp-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exp-modal-icon {
    font-size: 1.5rem;
}

.exp-modal-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.exp-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.exp-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.exp-modal-body {
    padding: 0;
    margin: 0;
    background: #f1f5f9;
    overflow: hidden;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.exp-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: white;
    box-shadow: none;
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.exp-modal-iframe::-webkit-scrollbar {
    display: none;
}

.exp-modal-body::-webkit-scrollbar {
    display: none;
}

.exp-modal-content::-webkit-scrollbar {
    display: none;
}

.exp-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.exp-modal-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-container {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
}

.auth-page {
    min-height: 100vh;
    background: #f5f5f5;
}

.page-content {
    padding: 4rem 2rem;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 550;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
    transition: opacity 0.3s ease;
}

.error-message:empty {
    opacity: 0;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1rem;
    color: #dc2626;
    font-size: 0.875rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.form-error.show {
    display: flex;
}

.form-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1rem;
    color: #16a34a;
    font-size: 0.875rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.form-success.show {
    display: flex;
}

.submit-btn {
    position: relative;
    overflow: hidden;
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.captcha-row {
    display: flex;
    gap: 0.75rem;
}

.captcha-btn {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-btn:hover {
    background: #2563eb;
}

.captcha-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.captcha-image {
    width: 100px;
    height: 42px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

.admin-login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-container {
    width: 100%;
    max-width: 420px;
}

.admin-login-box {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo-icon {
    width: 55px;
    height: 55px;
    font-size: 2rem;
    margin: 0 auto 0.75rem;
}

.login-header h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 1.75rem;
}

.login-header p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.admin-body {
    margin: 0;
    padding: 0;
}

.admin-sidebar {
    width: 240px;
    background: #0f172a;
    min-height: 100vh;
    color: white;
    padding: 1.25rem;
    position: fixed;
    left: 0;
    top: 0;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.25rem;
}

.admin-logo .logo-text {
    color: white;
    -webkit-text-fill-color: white;
    font-size: 1.125rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    text-align: left;
    font-size: 0.9rem;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

.nav-icon {
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn {
    position: absolute;
    bottom: 2rem;
    left: 1.25rem;
    right: 1.25rem;
    padding: 0.625rem;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.admin-content {
    margin-left: 240px;
    padding: 1.75rem;
    min-height: 100vh;
    background: var(--bg-primary);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.admin-user {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.admin-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.admin-panel.hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-primary);
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.table-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.375rem;
    transition: all 0.25s ease;
    font-weight: 500;
}

.table-btn.edit {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.table-btn.edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.table-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.table-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.725rem;
    font-weight: 500;
}

.status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status.admin {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.upload-modal {
    max-width: 520px;
}

.upload-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    padding: 1.375rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.upload-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.upload-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.upload-success {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(34, 197, 94, 0.1);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.success-icon {
    font-size: 1.5rem;
}

.success-info strong {
    color: #16a34a;
    font-size: 1rem;
}

.success-info p {
    margin: 0.2rem 0;
    color: #475569;
    font-size: 0.85rem;
}

.upload-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: #dc2626;
}

.file-name {
    color: var(--primary-color);
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.85rem;
}

.simulation-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.canvas-area {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.control-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.control-panel h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 550;
    color: #475569;
    margin-bottom: 0.5rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.control-group .value {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: monospace;
}

.control-group select {
    width: 100%;
    padding: 0.625rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    border-color: var(--primary-color);
}

.control-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.control-buttons button {
    flex: 1;
    padding: 0.625rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.control-buttons button:nth-child(1) {
    background: var(--primary-color);
    color: white;
}

.control-buttons button:nth-child(2) {
    background: var(--warning-color);
    color: white;
}

.control-buttons button:nth-child(3) {
    background: var(--danger-color);
    color: white;
}

.control-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.formula-display {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-sm);
    padding: 0.875rem;
    margin-top: 0.875rem;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.solution-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step {
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    border-left: 3px solid var(--primary-color);
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }

    .slide-visual {
        font-size: 6rem;
    }

    .carousel-slide {
        padding: 0 2rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .features-grid {
        gap: 1.25rem;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }

    .content-area {
        margin-left: 0;
        padding: 1rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-bar input {
        width: 100%;
    }

    .experiment-item,
    .question-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .exp-tags,
    .q-tags {
        justify-content: center;
    }

    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }

    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .simulation-container {
        grid-template-columns: 1fr;
    }

    .admin-login-box {
        width: 100%;
        padding: 2rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }
}

.batch-upload-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.batch-upload-info p {
    margin-bottom: 0.5rem;
}

.batch-upload-info ul {
    margin: 0;
    padding-left: 1.5rem;
}

.batch-upload-info li {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
}

.batch-upload-info code {
    background: #e2e8f0;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.batch-upload-area {
    min-height: 80px;
}

.batch-file-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 1rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.batch-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.batch-file-item:last-child {
    border-bottom: none;
}

.batch-file-name {
    font-weight: 500;
    color: #1e293b;
}

.batch-file-category {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
}

.batch-file-status {
    font-size: 0.85rem;
}

.batch-file-status.success {
    color: #22c55e;
}

.batch-file-status.error {
    color: #ef4444;
}

.batch-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.batch-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
}

.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
}

.category-tabs {
    background: white;
    padding: 0.75rem;
    margin: -1.25rem -1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
}

.category-tab {
    position: relative;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab::before {
    display: none;
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.category-tab:hover:not(.active) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.category-tree {
    padding: 0;
}

.tree-item {
    padding: 0.625rem 0.875rem;
    margin: 0.125rem 0;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.tree-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.tree-item.active::before {
    height: 60%;
}

.tree-item.parent {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: transparent;
}

.tree-item.parent:hover {
    background: rgba(59, 130, 246, 0.06);
}

.tree-item.parent.expanded {
    color: var(--primary-color);
}

.tree-item.parent.expanded .tree-icon {
    transform: scale(1.1);
}

.tree-toggle {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.tree-item:hover .tree-toggle {
    opacity: 1;
    color: var(--primary-color);
}

.tree-item.expanded .tree-toggle {
    transform: rotate(90deg);
    color: var(--primary-color);
    opacity: 1;
}

.tree-icon {
    font-size: 1rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tree-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tree-item:hover .tree-count,
.tree-item.active .tree-count {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.tree-children {
    display: none;
    margin-top: 0.25rem;
    padding-left: 0.25rem;
}

.tree-item.expanded > .tree-children {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.tree-item.child {
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
}

.tree-item.child::before {
    left: 20px;
    width: 2px;
}

.tree-item.child .child-icon {
    margin-left: 0;
    width: 16px;
    height: 16px;
    font-size: 0.5rem;
    color: var(--primary-color);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.tree-item.child:hover .child-icon,
.tree-item.child.active .child-icon {
    opacity: 1;
    transform: scale(1.2);
}

.tree-item.child:hover {
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-primary);
}

.tree-item.child.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: var(--primary-color);
    font-weight: 500;
}

.tree-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-area {
    background: linear-gradient(180deg, var(--bg-primary) 0%, #f1f5f9 100%);
}

.content-header {
    background: white;
    margin: -1.75rem -1.75rem 1.75rem;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    position: sticky;
    top: 64px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    cursor: pointer;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--border-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 320px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-bar input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.experiment-grid,
.question-grid {
    gap: 1.5rem;
}

.experiment-card,
.question-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.experiment-card::before,
.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), #f093fb);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.experiment-card:hover::before,
.question-card:hover::before {
    opacity: 1;
}

.experiment-card:hover,
.question-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.exp-thumbnail,
.q-thumbnail {
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
}

.exp-thumbnail::after,
.q-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experiment-card:hover .exp-thumbnail::after,
.question-card:hover .q-thumbnail::after {
    opacity: 1;
}

.exp-thumbnail img,
.q-thumbnail img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.experiment-card:hover .exp-thumbnail img,
.question-card:hover .q-thumbnail img {
    transform: scale(1.08);
}

.exp-info,
.q-info {
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: stretch;
    justify-content: flex-start;
}

.exp-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    min-height: 2.6em;
    transition: color 0.3s ease;
}

.experiment-card:hover .exp-title,
.question-card:hover .exp-title {
    color: var(--primary-color);
}

.exp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.exp-category {
    font-size: 0.725rem;
    color: var(--primary-color);
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.exp-difficulty {
    font-size: 0.8rem;
    color: #f59e0b;
    letter-spacing: -1px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.875rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .slide-content h1 {
        font-size: 1.75rem;
    }

    .features-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }

    .features-section,
    .quick-access {
        padding: 3rem 1rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
        margin: -1rem -1rem 1rem;
    }

    .search-bar input {
        width: 100%;
    }

    .experiment-grid,
    .question-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .exp-info {
        padding: 0.75rem;
    }

    .exp-title {
        font-size: 0.85rem;
    }
}
