:root {
    --primary-bg: #000;
    --panel-bg: rgba(0,0,0,0.7);
    --text-color: white;
    --accent-color: #4a9eff;
    --border-radius: 0.5rem;
    --primary-hue: 200;
    --face-opacity: 0.85;
    --stroke-width: 1.5;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--primary-bg);
    font-family: Arial, sans-serif;
    user-select: none;
}

#info {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    z-index: 100;
    background: var(--panel-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    max-width: 20rem;
    backdrop-filter: blur(0.5rem);
}

#fileInput {
    margin: 1rem 0;
    color: var(--text-color);
}

#loadingIndicator {
    color: var(--accent-color);
    margin-top: 1rem;
}

.hidden {
    display: none;
}

canvas {
    display: block;
}

/* Editor Toggle Button */
.editor-toggle {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.editor-toggle:hover {
    background: rgba(74, 158, 255, 0.4);
}

.editor-toggle.active {
    background: var(--accent-color);
}

.toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.editor-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Model Editor Styles */
.model-editor {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icosahedron Navigator Styles */
#icosahedronContainer {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 12rem;
    height: 12rem;
    z-index: 200;
}

.icosahedron-svg {
    width: 12rem;
    height: 12rem;
    cursor: grab;
    filter: drop-shadow(0 0.125rem 0.5rem rgba(74, 158, 255, 0.3));
}

.icosahedron-svg:active {
    cursor: grabbing;
}

.face {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: var(--stroke-width);
    stroke-linejoin: round;
    opacity: var(--face-opacity);
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.face:hover {
    opacity: 1;
    stroke: rgba(74, 158, 255, 0.6);
    stroke-width: 2;
}

.edges {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 0.8;
    fill: none;
    pointer-events: none;
}

.nav-overlay {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
}

.nav-button {
    background: var(--panel-bg);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(0.5rem);
}

.nav-button:hover {
    background: rgba(74, 158, 255, 0.4);
}

/* Animation controls */
#animationControls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--panel-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(0.5rem);
}

.controls-row {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.control-button {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.control-button:hover {
    background: rgba(74, 158, 255, 0.4);
}

.control-button.active {
    background: var(--accent-color);
}

/* View navigation arrows */
.view-arrow {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    user-select: none;
}

.view-arrow:hover {
    background: rgba(74, 158, 255, 0.4);
    transform: scale(1.1);
}

.view-arrow:active {
    transform: scale(0.95);
}