@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0e27;
    color: #fff;
    overflow: hidden;
}

#app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Header */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 2rem;
    background: linear-gradient(180deg, rgba(10,14,39,0.95) 0%, rgba(10,14,39,0) 100%);
    text-align: center;
}

.title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 0 0 20px rgba(212,175,55,0.5), 0 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1rem;
    color: #f5f5dc;
    opacity: 0.8;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Canvas */
#glCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0e27;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.strawberry {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-content h2 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin: 1rem 0;
    font-size: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 2rem 0 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #c5a028);
    width: 0%;
    transition: width 0.3s ease;
}

#loading-text {
    color: #f5f5dc;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Control Panel */
#control-panel {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(10,14,39,0.9);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 280px;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

#control-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

#control-panel h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    color: #f5f5dc;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.control-hint {
    font-size: 0.8rem;
    color: rgba(245,245,220,0.6);
    margin-top: 0.25rem;
}

input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: #d4af37;
}

.btn-control {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: rgba(212,175,55,0.2);
    border: 1px solid #d4af37;
    color: #d4af37;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-control:hover {
    background: rgba(212,175,55,0.3);
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

/* Info Panel */
#info-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10,14,39,0.95);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(212,175,55,0.3);
    transition: opacity 0.3s ease;
    z-index: 200;
}

#info-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #d4af37;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

#info-panel h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#info-panel ul {
    list-style: none;
    padding: 0;
}

#info-panel li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: #f5f5dc;
    line-height: 1.6;
}

#info-panel li:before {
    content: "✨";
    position: absolute;
    left: 0;
}

#info-panel strong {
    color: #d4af37;
}

.tech-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(212,175,55,0.1);
    border-left: 3px solid #d4af37;
    color: #f5f5dc;
    font-size: 0.9rem;
}

/* WebGL Error */
#webgl-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

#webgl-error.hidden {
    display: none;
}

#webgl-error h2 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin-bottom: 1rem;
}

#webgl-error p {
    color: #f5f5dc;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(0deg, rgba(10,14,39,0.95) 0%, rgba(10,14,39,0) 100%);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(245,245,220,0.6);
}

footer a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #c5a028;
}

.tech-badge {
    margin-top: 0.25rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    #control-panel {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        min-width: auto;
    }
    
    #info-panel {
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
        padding: 1.5rem;
    }
}

/* Scrollbar styling for info panel */
#info-panel::-webkit-scrollbar {
    width: 8px;
}

#info-panel::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: #c5a028;
}