/* DAM AFTER DARK - Styles */

/* Reset and Base Styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Courier New', monospace;
    color: #ff9b3d;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Typography */
h1 {
    font-size: 54px;
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    h1 {
        margin-top: -12px;
        margin-bottom: -7px;
    }
}

/* Canvas for Cube Animation */
#projection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Info Panel */
#info {
    position: absolute;
    top: 20px;
    color: #ff9b3d;
    z-index: 10;
    padding: 10px;
    border-radius: 5px;
    max-width: 400px;
    overflow-y: auto;
    max-height: 80vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #info {
        left: 10px;
        right: 10px;
        max-height: 88%;
        width: 25%;
        max-width: 400px;
        left: 20px;
    }
}

@media (max-width: 768px) {
    #info {
        left: 10px;
        right: 10px;
        max-height: 80%;
    }
}

/* Dark Background for Text Sections */
#dark-bg {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Buttons and Form Elements */
button, select, input {
    background-color: #ff9b3d;
    border: none;
    color: #000;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

input[type="range"] {
    width: 100%;
}

/* Static Buttons */
.static-button {
    background-color: #ff9b3d;
    color: #000;
    border: none;
    padding: 20px 0;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 0px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 1px;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
}

.static-button:hover {
    background-color: #e88a2d;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 0px;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    width: 100%;
    background: transparent;
}

.controls a {
    width: 100%;
    max-width: 400px;
    margin: 0 20px;
    display: block;
}

@media (min-width: 768px) {
    .controls {
        justify-content: flex-start;
        display: none;
    }

    .static-button {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 767px) {
    .controls {
        left: 0;
        right: 0;
        width: 100vw;
        padding: 0 0 0 0;
    }

    .controls a {
        max-width: 100vw;
        margin: 0 auto;
    }

    .controls button {
        max-width: 100vw;
        width: 100vw;
        min-width: 0;
        margin: 0 auto;
        border-radius: 0px;
    }
}

/* Icon Buttons */
.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #ff9b3d;
    border-radius: 0px;
    padding: 10px 10px;
    margin: 4px 2px;
}

.icon-button:hover {
    background-color: #e88a2d;
}

.control-icon {
    height: 16px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

/* Scrollbar Styles */
/* Webkit browsers (Chrome, Safari, newer Edge) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #333333 #1a1a1a;
}

/* Gallery Slider Container */
#slider-gallery-container {
    margin: 40px auto 0 auto;
    max-width: 500px;
    width: 100%;
    background: #111;
    border-radius: 8px;
    border: 1px solid #ff9b3d;
    padding: 24px 16px 32px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    #slider-gallery-container {
        position: fixed;
        right: 20px;
        top: 20px;
        bottom: 20px;
        transform: none;
        margin: 0;
        max-width: 450px;
        width: calc(30% - 40px);
        height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    #slider-gallery-container {
        padding: 12px 2vw 18px 2vw;
        max-width: 100vw;
    }
}

@media (max-width: 767px) {
    #slider-gallery-container {
        display: flex;
        flex-direction: column;
    }
}

/* Gallery Slider */
#gallery-slider {
    width: 100%;
    margin-bottom: 18px;
    accent-color: #ff9b3d;
    background: transparent;
    height: 6px;
    border-radius: 3px;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

#gallery-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff9b3d;
    border: 2px solid #ff9b3d;
    cursor: pointer;
    box-shadow: 0 0 0 2px #111;
    transition: background 0.2s;
    margin-top: -11px;
}

#gallery-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff9b3d;
    border: 2px solid #ff9b3d;
    cursor: pointer;
    box-shadow: 0 0 0 2px #111;
    transition: background 0.2s;
    margin-top: -11px;
}

#gallery-slider::-ms-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff9b3d;
    border: 2px solid #ff9b3d;
    cursor: pointer;
    box-shadow: 0 0 0 2px #111;
    transition: background 0.2s;
    margin-top: -11px;
}

#gallery-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: #000;
    border: 2px solid #ff9b3d;
}

#gallery-slider::-ms-fill-lower {
    background: #ff9b3d;
}

#gallery-slider::-ms-fill-upper {
    background: #000;
}

/* Gallery Media Area */
#gallery-media-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

@media (min-width: 768px) {
    #gallery-media-area {
        min-height: 375px;
        max-height: 595px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #gallery-media-area .media-wrapper {
        height: 375px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
}

@media (max-width: 600px) {
    #gallery-media-area {
        min-height: 120px;
    }
}

@media (max-width: 767px) {
    #gallery-media-area {
        flex-shrink: 0;
    }

    #gallery-media-area .media-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    #gallery-media-area .media-wrapper img,
    #gallery-media-area .media-wrapper video,
    #gallery-media-area .media-wrapper .media-poster-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        background: #000;
        border-radius: 6px;
    }
}

/* Gallery Navigation Arrows */
.gallery-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ff9b3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s, filter 0.3s;
}

.gallery-nav-arrow:hover {
    background: rgba(255, 155, 61, 0.2);
}

.gallery-nav-arrow.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed;
    filter: grayscale(1);
}

.gallery-nav-arrow svg {
    width: 20px;
    height: 20px;
    fill: #ff9b3d;
}

.gallery-nav-prev {
    left: 10px;
}

.gallery-nav-next {
    right: 10px;
}

@media (min-width: 768px) {
    #gallery-media-area:hover .gallery-nav-arrow {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .gallery-nav-arrow {
        display: none;
    }
}

/* Media Elements */
.media-poster-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 6px;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    border: 2px solid #ff9b3d;
}

.play-overlay svg {
    width: 36px;
    height: 36px;
    fill: #ff9b3d;
    display: block;
}

.play-overlay:active {
    background: rgba(255, 155, 61, 0.2);
}

.media-wrapper.slide-left {
    transform: translateX(-100%);
    opacity: 0;
}

.media-wrapper.slide-right {
    transform: translateX(100%);
    opacity: 0;
}

#gallery-media-area img,
#gallery-media-area video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Gallery Details */
#gallery-details {
    width: 100%;
    color: #ff9b3d;
    font-family: inherit;
    text-align: left;
    margin-top: 12px;
}

@media (min-width: 768px) {
    #gallery-details {
        margin-top: 18px;
    }
}

#gallery-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ff9b3d;
    font-family: inherit;
}

#gallery-description {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ff9b3d;
    font-family: inherit;
}

#gallery-artist-info {
    font-size: 16px;
    font-weight: 700;
    color: #ff9b3d;
    font-family: inherit;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    #gallery-title {
        font-size: 18px;
    }

    #gallery-description,
    #gallery-artist-info {
        font-size: 14px;
    }
}

/* Collection Info Section */
.countdown-container {
    margin: 50px 0 20px 0;
    text-align: center;
    border: 1px solid #ff9b3d;
    border-radius: 5px;
    padding: 20px;
}

@media (min-width: 768px) {
    .countdown-container {
        max-width: 400px;
        margin: 30px auto;
        border: 1px solid #ff9b3d;
        border-radius: 5px;
        padding: 20px;
    }
}

/* Countdown Timer */
.countdown-label {
    color: #ff9b3d;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-item span:first-child {
    font-size: 32px;
    font-weight: 600;
    color: #ff9b3d;
    font-family: 'Courier New', monospace;
    width: 2.2ch;
    display: inline-block;
    text-align: center;
}

.countdown-item .countdown-label {
    font-size: 12px;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .countdown-timer {
        gap: 10px;
    }

    .countdown-item span:first-child {
        font-size: 24px;
    }

    .countdown-item .countdown-label {
        font-size: 10px;
    }
}

/* Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: help;
}

.tooltip-wrapper .tooltip-text {
    visibility: hidden;
    background-color: #1a1a1a;
    color: #ff9b3d;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.1s;
    font-size: 12px;
    border: 1px solid #ff9b3d;
}

.tooltip-wrapper .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #ff9b3d transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mint Collection Button */
.mint-collection-button {
    background-color: #ff9b3d;
    color: #000;
    border: none;
    padding: 20px 0;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0px;
    margin-top: 30px;
    margin-bottom: 10px;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.mint-collection-button:hover {
    background-color: #e88a2d;
}

@media (min-width: 768px) {
    .mint-collection-button {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Collection Links */
.collection-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
