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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.model-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.model-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Viewer Page Styles */
.viewer-container {
    display: flex;
    height: 100vh;
    background: #1a1a1a;
}

.canvas-container {
    flex: 1;
    position: relative;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.sidebar {
    width: 350px;
    background: #2a2a2a;
    color: white;
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.sidebar h3 {
    color: #f093fb;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.back-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.back-btn:hover {
    background: #5568d3;
}

.bone-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.bone-item {
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.bone-item:hover {
    background: #4a4a4a;
}

.bone-item.selected {
    background: #667eea;
}

.data-display {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
}

.data-display pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #a0a0a0;
}

.copy-btn {
    width: 100%;
    padding: 0.75rem;
    background: #f093fb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #e082ea;
}

.copy-btn:active {
    background: #d071d9;
}

.controls-info {
    background: #3a3a3a;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.controls-info kbd {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.8rem;
}

.animation-controls {
    margin-top: 1rem;
}

.animation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: #3a3a3a;
    border-radius: 4px;
}

.play-btn {
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.play-btn:hover {
    background: #5568d3;
}

.play-btn.active {
    background: #f093fb;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
}
