@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css");

:root {
    color-scheme: light dark;
    --site-bg: #f4f7fb;
    --site-surface: #ffffff;
    --site-surface-soft: #eef4fb;
    --site-text: #142033;
    --site-muted: #64748b;
    --site-border: rgba(20, 32, 51, 0.12);
    --site-primary: #2563eb;
    --site-primary-strong: #1d4ed8;
    --site-accent: #14b8a6;
    --site-danger: #dc2626;
    --site-header: rgba(12, 20, 35, 0.92);
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --site-bg: #0d1117;
        --site-surface: #151b24;
        --site-surface-soft: #1d2633;
        --site-text: #eef4ff;
        --site-muted: #a8b3c7;
        --site-border: rgba(226, 232, 240, 0.14);
        --site-primary: #60a5fa;
        --site-primary-strong: #3b82f6;
        --site-accent: #2dd4bf;
        --site-header: rgba(7, 11, 18, 0.94);
        --site-shadow: 0 20px 55px rgba(0, 0, 0, 0.36);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--site-surface-soft), var(--site-bg));
    color: var(--site-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.bg-light,
body.bg-dark {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--site-surface-soft), var(--site-bg)) !important;
    color: var(--site-text) !important;
}

a {
    color: var(--site-primary);
}

.container {
    width: min(100% - 2rem, 1180px);
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--site-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
}

.site-logo {
    width: 38px;
    height: 38px;
    margin-right: 0.65rem;
    object-fit: contain;
    vertical-align: middle;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    letter-spacing: 0;
}

.navbar .nav-link {
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

.site-userbar .navbar-text {
    color: rgba(255, 255, 255, 0.82);
}

header.hero {
    min-height: 430px;
    display: grid;
    place-items: center;
    padding: 5rem 1rem;
    text-align: center;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(37, 99, 235, 0.7)),
        url("/css/img/icom.png") center / 220px no-repeat,
        #101827;
}

header.hero h1 {
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(2.25rem, 4vw, 4.75rem);
    line-height: 1.04;
}

header.hero .lead {
    color: rgba(255, 255, 255, 0.84);
}

main,
.container {
    flex: 0 0 auto;
}

body > .container,
body > .file-list,
body > .player-box {
    margin-top: 2rem;
}

.card,
.modal-content,
.list-group-item {
    background: var(--site-surface);
    color: var(--site-text);
    border-color: var(--site-border);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.card.shadow,
.card.shadow-sm {
    box-shadow: var(--site-shadow) !important;
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.22);
}

.form-control,
.form-select {
    color: var(--site-text);
    background-color: var(--site-surface);
    border-color: var(--site-border);
    border-radius: 8px;
}

.form-control::placeholder {
    color: var(--site-muted);
}

.btn {
    border-radius: 8px;
    font-weight: 650;
    letter-spacing: 0;
}

.btn-primary {
    --bs-btn-bg: var(--site-primary);
    --bs-btn-border-color: var(--site-primary);
    --bs-btn-hover-bg: var(--site-primary-strong);
    --bs-btn-hover-border-color: var(--site-primary-strong);
}

.btn-danger {
    --bs-btn-bg: var(--site-danger);
    --bs-btn-border-color: var(--site-danger);
}

.progress {
    min-height: 0.75rem;
    background: var(--site-surface-soft);
}

.text-muted {
    color: var(--site-muted) !important;
}

.site-footer {
    margin-top: auto;
    padding: 1.35rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    background: #0c1423;
}

.site-footer a {
    color: #bfdbfe;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
}

.captcha-box {
    margin-bottom: 0.75rem;
    padding: 0.85rem;
    border-radius: 8px;
    background: var(--site-surface-soft);
    color: var(--site-text);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-align: center;
    user-select: none;
}

#news {
    padding: 2rem;
    border-radius: 8px;
    background:
        linear-gradient(rgba(6, 20, 36, 0.35), rgba(6, 20, 36, 0.35)),
        url("https://wapgames.lt/assets/img/bg-0.webp") center / cover;
}

#news h3 {
    color: #ffffff;
    font-weight: 800;
}

.hero:not(header) {
    padding: 3.75rem 1.25rem;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #334155);
}

.site-card {
    border: 0;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--site-shadow);
}

.badge-new {
    background: #e11d48;
}

.badge-online {
    background: #10b981;
}

.badge-offline {
    background: #94a3b8;
}

.site-url {
    color: var(--site-muted);
    font-size: 0.82rem;
    word-break: break-all;
}

.stats-box {
    padding: 1.25rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

.news-card .card-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.view-article {
    cursor: pointer;
    color: var(--site-muted);
}

.view-article:hover {
    color: var(--site-primary);
}

.partner-card {
    overflow: hidden;
}

.partner-card .visit-btn {
    bottom: 15px;
    left: 50%;
    opacity: 0.95;
    transform: translateX(-50%);
}

.file-item {
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.list-group .file-item:hover,
.file-list .file-item:hover,
.playlist .file-item:hover {
    background: var(--site-surface-soft);
    cursor: pointer;
}

.modal-body img,
.modal-body video,
.modal-body audio {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.file-info {
    margin-top: 0.75rem;
    text-align: left;
}

.modal-icon {
    margin-bottom: 0.75rem;
    font-size: 3.75rem;
}

.preview-header {
    padding: 1rem 1.25rem;
    background: var(--site-header);
    color: #ffffff;
}

.preview-body,
.file-preview {
    background: var(--site-surface);
}

.file-preview {
    padding: 1rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
}

/* Audio player */
.file-list {
    width: min(100% - 2rem, 740px);
    margin-inline: auto;
}

.file-list .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.player-box {
    width: min(100% - 2rem, 740px);
    margin-inline: auto;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    box-shadow: var(--site-shadow);
}

#playerTitle {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
}

#controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1rem;
}

#playPause,
.control-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--site-primary);
}

#progressContainer,
#volumeContainer,
.volume-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: var(--site-surface-soft);
    cursor: pointer;
}

#progressContainer {
    flex: 1;
}

#progressBar,
#volumeBar,
.bar,
.volume-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--site-accent), var(--site-primary));
}

.knob,
.volume-knob {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

#time {
    min-width: 110px;
    color: var(--site-muted);
    font-size: 0.9rem;
    text-align: right;
}

.volume-wrapper,
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-wrapper {
    width: 130px;
}

#volumeContainer,
.volume-bar {
    flex: 1;
}

#volumeIcon {
    cursor: pointer;
}

textarea {
    width: 100%;
    min-height: 70px;
    margin-top: 1rem;
    padding: 0.75rem;
    resize: vertical;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface-soft);
    color: var(--site-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Video player */
.video-page {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.video-section {
    flex: 2;
    min-width: 0;
    position: relative;
}

.video-wrap {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    background: #000000;
    box-shadow: var(--site-shadow);
}

.video-wrap video,
#video {
    width: 100%;
    display: block;
    border-radius: 8px;
    background: #000000;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.66);
}

.controls .progress {
    flex: 1;
    height: 8px;
    min-width: 160px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.playlist {
    flex: 1;
    max-height: 680px;
    overflow-y: auto;
    position: sticky;
    top: 5.5rem;
}

.playlist .file-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.6rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
}

.playlist .file-item.active {
    color: #ffffff;
    background: var(--site-primary);
}

.playlist .file-item img {
    width: 72px;
    height: 48px;
    margin-right: 0.75rem;
    object-fit: cover;
    border-radius: 6px;
}

#nowPlaying {
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.notify {
    display: none;
    position: absolute;
    top: 0.75rem;
    left: 50%;
    z-index: 2;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.78);
    transform: translateX(-50%);
}

.auth-card {
    width: min(100% - 2rem, 450px);
    margin: 4rem auto;
}

.form-container {
    width: min(100% - 2rem, 460px);
    margin: 4rem auto;
    padding: 1.5rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    box-shadow: var(--site-shadow);
}

.form-container h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.form-container input {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    color: var(--site-text);
}

.form-container button {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--site-primary);
    font-weight: 700;
}

.form-container.success {
    border-color: rgba(20, 184, 166, 0.45);
}

.form-container.error {
    border-color: rgba(220, 38, 38, 0.45);
}

.guest-progress {
    height: 25px;
    display: none;
}

.is-hidden {
    display: none;
}

.hidden-field {
    display: none;
}

.file-filter,
.file-filter-all {
    cursor: pointer;
}

.preview-card {
    width: min(100% - 2rem, 920px);
    margin: 2rem auto;
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
    box-shadow: var(--site-shadow);
}

.preview-body {
    padding: 1.25rem;
}

.expired-message {
    margin-top: 2.5rem;
    color: var(--site-danger);
    text-align: center;
}

#fireworks {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: #020617;
}

.box {
    width: min(100% - 2rem, 560px);
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.thumb-list {
    display: grid;
    gap: 1rem;
}

.thumb-item {
    padding: 1rem;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: var(--site-surface);
}

.thumb-item img {
    width: 200px;
    max-width: 100%;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.confirm-screen {
    overflow: hidden;
}

.confirm-screen .container {
    text-align: center;
}

.confirm-screen h1 {
    margin-bottom: 1.25rem;
    font-size: clamp(3rem, 8vw, 5rem);
    animation: pulse 1.5s ease-in-out infinite;
}

.confetti {
    position: fixed;
    top: 0;
    width: 10px;
    height: 10px;
    background-color: var(--site-accent);
    animation: fall linear forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 18px rgba(20, 184, 166, 0.8);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 34px rgba(37, 99, 235, 0.8);
    }
}

@keyframes fall {
    from {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    to {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

@media (max-width: 991.98px) {
    .navbar .btn {
        width: 100%;
        margin: 0.35rem 0 0;
    }

    .site-userbar {
        align-items: stretch !important;
    }

    #controls {
        flex-wrap: wrap;
    }

    .video-page {
        flex-direction: column;
    }

    .playlist {
        width: 100%;
        max-height: none;
        position: static;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1560px;
    }
}
