/* ---------- CLOUD LAYOUT ---------- */

main.cloud {
    max-width: 900px;
    margin: 2rem auto 0;
}

/* ---------- FILE LIST ---------- */

.cloud-files {
    margin-top: 2.5rem;
    text-align: left;
}

.cloud-files ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #181818;
    border-radius: 6px;
    overflow: hidden;
    background: #070707;
}

/* File row */
.cloud-files li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #141414;
}

.cloud-files li:last-child {
    border-bottom: none;
}

/* Filename */
.cloud-files li span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    opacity: 0.95;
}

/* Download button */
.cloud-files button {
    background: transparent;
    color: #f5f5f5;
    border: 1px solid #2a2a2a;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.cloud-files button:hover {
    background: #141414;
    border-color: #3a3a3a;
}

.cloud-files button:active {
    background: #1c1c1c;
}

.cloud-files button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---- Filename zoom overlay ---- */
.filename-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.filename-overlay.hidden {
    display: none;
}

.filename-box {
    max-width: 90vw;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    word-break: break-all;
    color: #f5f5f5;
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.video-modal.hidden {
    display: none;
}

.video-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.video-box video {
    width: 100%;
    max-height: 90vh;
    background: black;
}

.video-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.image-modal.hidden {
    display: none;
}

.image-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-box img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    background: #000;
}

.image-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.audio-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.audio-modal.hidden {
    display: none;
}

.audio-box {
    position: relative;
    width: 90vw;
    max-width: 500px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 1rem;
}

.audio-box audio {
    width: 100%;
}

.audio-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}
