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

body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: 'Inter', sans-serif;
    color: white;
}
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}
.content.hidden {
    opacity: 0;
    pointer-events: none;
}
#page-title {
    font-size: 3rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
#page-subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #ccc;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: rgba(40, 40, 50, 0.9);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}
.close-modal-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal-btn:hover {
    color: white;
}
.modal-content p {
    color: #ccc;
    line-height: 1.6;
}
.modal-footer {
    margin-top: 25px;
    text-align: right;
}
.ok-btn {
    background: #4A90E2;
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}
.ok-btn:hover {
    background-color: #357ABD;
}

/* --- Scene Selector Modal Specific Styles --- */
#scene-selector-modal .modal-content {
    max-width: 500px;
}
#scene-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- Controls Panel Styles --- */
#controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: rgba(30, 30, 40, 0.8);
    padding: 20px;
    border-radius: 15px;
    z-index: 100;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(0);
}
#controls.hidden {
    transform: translateX(calc(100% + 40px));
}
.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.controls-header h2 { margin: 0; padding: 0; border: none; font-size: 1.2rem; }
.hide-btn {
    background: none; border: none; color: #aaa; font-size: 1.8rem;
    line-height: 1; cursor: pointer; padding: 0 5px; transition: color 0.2s;
}
.hide-btn:hover { color: white; }
.show-btn {
    position: fixed; bottom: 20px; z-index: 99;
    background: #4A90E2; border: none; border-radius: 50%; width: 50px; height: 50px;
    font-size: 1.5rem; line-height: 50px; text-align: center; color: white;
    cursor: pointer;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0; transform: scale(0); pointer-events: none;
}

#open-scene-modal-btn {
    left: 50%;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}
.show-btn.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
#showControlsBtn { right: 20px; }

.scene-btn { background: #444; border: 1px solid #666; color: white; padding: 8px 15px; margin: 5px; border-radius: 8px; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; font-size: 0.9rem; }
.scene-btn:hover { background-color: #555; border-color: #888; }
.scene-btn.active { background-color: #4A90E2; border-color: #4A90E2; }
#toggleContentBtn { width: 100%; margin-top: 15px; }
.control-row { margin-bottom: 15px; display: grid; grid-template-columns: 100px 1fr 60px; align-items: center; gap: 10px; }
.control-row label { font-size: 0.9rem; }
.control-row input[type="range"] { width: 100%; }
.control-row span, .control-row input[type="text"], .control-row input[type="color"] { text-align: right; font-size: 0.9rem; background: #222; padding: 5px; border-radius: 4px; color: #eee; border: 1px solid #444; box-sizing: border-box; }
.control-row input[type="text"] { width: 100%; font-family: 'Inter', sans-serif; }
.control-row input[type="color"] { padding: 0; border: none; width: 30px; height: 30px; }
#generateCodeBtn { width: 100%; padding: 10px; background: #4A90E2; border: none; border-radius: 8px; color: white; font-size: 1rem; cursor: pointer; margin-top: 10px; }
#embed-code { width: 100%; height: 250px; background: #111; border: 1px solid #444; border-radius: 8px; color: #eee; font-family: monospace; font-size: 0.9rem; padding: 15px; box-sizing: border-box; resize: vertical; }
#copy-code-btn { width: 100%; padding: 12px; background: #4A90E2; border: none; border-radius: 8px; color: white; font-size: 1rem; cursor: pointer; margin-top: 15px; transition: background-color 0.2s; }
#copy-code-btn:hover { background-color: #357ABD; }
