:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --border-color: #334155;
    --skeletal-color: #e2e8f0;
    --muscular-color: #ef4444;
    --circulatory-color: #3b82f6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

main {
    display: flex;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

.left-panel {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.right-panel {
    flex: 1;
    background: var(--bg-panel);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controls-card, .info-card {
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.control-group label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

input[type="date"], input[type="number"], select {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--accent-blue);
}

.nav-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.icon-btn {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}

.icon-btn:hover {
    background: rgba(255,255,255,0.2);
}

.btn.primary {
    flex: 1;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn.primary:hover {
    background: rgba(255,255,255,0.2);
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn.highlight {
    background: var(--accent-blue);
    color: white;
    width: 100px;
}

.btn.highlight:hover {
    background: #2563eb;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-cyan);
    transition: width linear;
}

.info-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.wiki-link {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.wiki-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.facts-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.facts-list li {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--accent-blue);
    font-size: 0.9rem;
    line-height: 1.5;
}

#svg-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

#svg-wrapper svg {
    max-width: 100%;
    max-height: 100%;
}

.feature-active {
    stroke-dasharray: 4;
    animation: pulse 1.5s infinite;
    stroke-width: 4px !important;
    stroke-opacity: 1 !important;
}

@keyframes pulse {
    0% { filter: drop-shadow(0 0 5px currentColor); }
    50% { filter: drop-shadow(0 0 15px currentColor); }
    100% { filter: drop-shadow(0 0 5px currentColor); }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    .left-panel {
        flex: none;
        width: 100%;
    }
    .right-panel {
        height: 400px;
        flex: none;
    }
    .app-container {
        overflow-y: auto;
    }
    body {
        overflow: auto;
    }
}
