:root {
    --brand-color: #ffbe00;
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-dim: #a0a0a0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Splash Screen */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#splash img {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 190, 0, 0.2);
    border-top: 3px solid var(--brand-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Header */
header {
    padding: 20px;
    text-align: center;
    background-color: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

header img {
    height: 64px;
    width: auto;
}

/* Main Content */
main {
    padding: 10px 15px 120px 15px;
    max-width: 600px;
    margin: 0 auto;
}

.media-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.media-item {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    border: 1px solid rgba(255, 190, 0, 0.05);
}

.media-item.show {
    opacity: 1;
    transform: translateY(0);
}

.media-content {
    width: 100%;
    display: block;
    background-color: #000;
    min-height: 200px;
}

.media-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-meta {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dim);
}

.btn-download {
    background-color: var(--brand-color);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
}

.btn-download:active {
    transform: scale(0.95);
}

/* Floating Action Bar */
#fab {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    z-index: 500;
    display: none;
}

#btn-download-all {
    width: 100%;
    background-color: var(--brand-color);
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(255, 190, 0, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Empty State */
#empty-state {
    text-align: center;
    padding: 100px 20px;
    display: none;
}

#empty-state h2 {
    margin-bottom: 10px;
    color: var(--text-dim);
}

/* Toast */
#toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    z-index: 1000;
    display: none;
    text-align: center;
}