/* Options Menu Styles for Babel of Dreams */

@font-face {
    font-family: 'Ark Pixel 10px';
    src: url('../fonts/arkpixel10/ark-pixel-10px-proportional-latin.otf.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Ark Pixel 12px Mono';
    src: url('../fonts/arkpixel10/ark-pixel-12px-monospaced-latin.otf.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'NotJam Old Style';
    src: url('../fonts/notjamoldstyle11.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Ark Pixel 10px', monospace;
    color: #fff;
}

.options-container {
    width: 960px;
    height: 540px;
    position: relative;
    overflow: hidden;
}

/* Background */
.pyramid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/scenes/pyramidmidground.png');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}

.dither-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/ditherlayer.png');
    background-repeat: repeat;
    mix-blend-mode: multiply;
    opacity: 0.3;
    pointer-events: none;
    z-index: 2;
}

/* Options Panel */
.options-panel {
    position: relative;
    z-index: 10;
    width: 960px;
    height: 540px;
    margin: 0px auto;
    background-color: rgba(26, 26, 26, 0.95);
    border: 2px solid #ff6b35;
    padding: 30px;
    overflow-y: auto;
}

.options-panel h1 {
    font-family: 'NotJam Old Style', serif;
    color: #ff6b35;
    font-size: 32px;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.tab-button {
    flex: 1;
    background-color: #333;
    color: #999;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: #444;
    color: #fff;
}

.tab-button.active {
    background-color: #ff6b35;
    color: #000;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-family: 'NotJam Old Style', serif;
    color: #ff6b35;
    font-size: 24px;
    margin-bottom: 20px;
}

.tab-content h3 {
    font-family: 'Ark Pixel 12px Mono', monospace;
    color: #ff8c5a;
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.tab-content hr {
    border: none;
    border-top: 1px solid #333;
    margin: 20px 0;
}

/* Text Preview */
.text-preview {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 20px;
    margin-top: 20px;
}

.text-preview h3 {
    margin-top: 0;
}

#preview-text {
    font-family: 'Ark Pixel 10px', monospace;
    color: #ccc;
    line-height: 1.6;
    transition: font-size 0.3s ease;
}

/* Gallery Category Tabs */
.gallery-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-tab-button {
    flex: 1;
    background-color: #333;
    color: #999;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.gallery-tab-button:hover {
    background-color: #444;
    color: #fff;
}

.gallery-tab-button.active {
    background-color: #6bffb8;
    color: #000;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
}

.gallery-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    background-color: #000;
    border: 2px solid #333;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.gallery-thumbnail:hover {
    border-color: #6bffb8;
}

.gallery-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.gallery-thumbnail-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: #6bffb8;
    padding: 5px;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #ff6b35;
    font-size: 40px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    line-height: 1;
    z-index: 10002;
}

.lightbox-close:hover {
    color: #ff8c5a;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 107, 53, 0.3);
    color: #fff;
    border: none;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 30px;
    transition: background-color 0.3s ease;
    z-index: 10002;
}

.lightbox-nav:hover {
    background-color: rgba(255, 107, 53, 0.6);
}

.lightbox-nav.left {
    left: 20px;
}

.lightbox-nav.right {
    right: 20px;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#lightbox-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border: 1px solid #ff6b35;
    font-family: 'Ark Pixel 12px Mono', monospace;
    font-size: 12px;
    color: #ccc;
}

#lightbox-counter {
    color: #ff6b35;
}

#lightbox-title {
    color: #6bffb8;
}

/* Sound Settings */
.setting-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.setting-row label {
    font-size: 14px;
    color: #ccc;
    min-width: 80px;
}

.toggle-button {
    background-color: #6bffb8;
    color: #000;
    border: none;
    padding: 8px 24px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.toggle-button.off {
    background-color: #ff6b35;
}

.toggle-button:hover {
    opacity: 0.8;
}

input[type="range"] {
    flex: 1;
    height: 4px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ff6b35;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff6b35;
    cursor: pointer;
    border: none;
}

#volume-display {
    min-width: 50px;
    text-align: right;
    color: #ff6b35;
    font-family: 'Ark Pixel 12px Mono', monospace;
}

/* Sound Test */
.sound-test {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 20px;
}

.sound-list {
    max-height: 78px;
    overflow-y: auto;
    margin-bottom: 15px;
    background-color: #000;
    border: 1px solid #333;
}

.sound-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.sound-item:hover {
    background-color: #222;
}

.sound-item.selected {
    background-color: #ff6b35;
    color: #000;
}

.sound-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.sound-controls button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.sound-controls button:hover {
    background-color: #ff6b35;
    color: #000;
}

#play-sound {
    background-color: #6bffb8;
    color: #000;
}

#play-sound:hover {
    background-color: #8bffcc;
}

.sound-info {
    text-align: center;
}

.sound-info p {
    font-family: 'Ark Pixel 12px Mono', monospace;
    font-size: 12px;
    color: #999;
    margin: 5px 0;
}

#sound-name {
    color: #ff6b35;
    font-size: 14px;
}

/* Data Tab */
.placeholder-text {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.data-section {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 20px;
    margin-bottom: 20px;
}

.data-section p {
    font-size: 14px;
    margin: 8px 0;
    color: #ccc;
}

.data-section span {
    color: #6bffb8;
    font-family: 'Ark Pixel 12px Mono', monospace;
}

.data-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.danger-button {
    flex: 1;
    background-color: #ff6b35;
    color: #000;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 12px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.danger-button:hover {
    background-color: #ff8c5a;
}

.zone-button {
    flex: 1;
    background-color: #6bffb8;
    color: #000;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 12px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.zone-button:hover {
    background-color: #8bffcc;
}

/* Back Button */
.back-button {
    width: 100%;
    background-color: #28556a;
    color: #fff;
    border: none;
    padding: 14px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #356a82;
}
