* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
}

body {
    min-height: 100vh;
    background-image: url('/assets/7days-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.background-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.72)),
        rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.topbar {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.topbar-login {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logged-in-text {
    font-size: 0.95rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.login-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-form input {
    width: 170px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.78);
    color: #ffffff;
    outline: none;
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.login-form input:focus {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(0, 0, 0, 0.88);
}

.hero-center {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 55px;
}

.content-card {
    width: min(900px, 95%);
    background: rgba(10, 10, 10, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: 30px;
    backdrop-filter: blur(7px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
    text-align: center;
}

h1 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.85);
}

h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.35rem;
}

.subtitle {
    margin-top: 0;
    margin-bottom: 30px;
    color: #dddddd;
    font-size: 1.05rem;
}

.download-section,
.upload-section {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.download-info {
    min-width: 0;
}

.download-name {
    font-weight: bold;
    font-size: 1.02rem;
    word-break: break-word;
}

.download-meta {
    margin-top: 4px;
    font-size: 0.92rem;
    color: #d0d0d0;
}

.download-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

button,
.button,
.small-button {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #b32626;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.18s ease;
    line-height: 1.2;
}

button:hover,
.button:hover,
.small-button:hover {
    background: #d13232;
    transform: translateY(-1px);
}

button:active,
.button:active,
.small-button:active {
    transform: translateY(0);
}

.small-button.secondary {
    background: rgba(70, 70, 70, 0.88);
}

.small-button.secondary:hover {
    background: rgba(95, 95, 95, 0.95);
}

.inline-form {
    margin: 0;
}

.delete-form {
    margin: 0;
}

.delete-button {
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    background: rgba(120, 20, 20, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.delete-button:hover {
    background: rgba(190, 35, 35, 0.97);
}

.upload-hint {
    color: #dddddd;
    margin-bottom: 14px;
}

.dropzone {
    width: 100%;
    min-height: 180px;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
    text-align: center;
    padding: 20px;
    transition: 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.dropzone span {
    font-size: 1.1rem;
    font-weight: bold;
}

.dropzone small {
    color: #d4d4d4;
}

.upload-button {
    margin-top: 16px;
}

.message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: left;
}

.message.success {
    background: rgba(28, 87, 44, 0.88);
    border: 1px solid rgba(87, 187, 112, 0.8);
}

.message.error {
    background: rgba(105, 25, 25, 0.9);
    border: 1px solid rgba(204, 70, 70, 0.85);
}

.empty-text {
    color: #dddddd;
}

@media (max-width: 780px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .topbar-login,
    .login-form {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .login-form input,
    .login-form button,
    .small-button {
        width: 100%;
    }

    .hero-center {
        align-items: flex-start;
        padding-top: 20px;
    }

    .content-card {
        padding: 20px;
    }

    .download-item {
        flex-direction: column;
        align-items: stretch;
    }

    .download-actions {
        width: 100%;
    }

    .download-actions .button {
        flex: 1;
        text-align: center;
    }

    .delete-button {
        flex: 0 0 42px;
    }
}

.message {
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    overflow: hidden;
}

.message-hide {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.upload-progress-wrap {
    margin-top: 16px;
}

.upload-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #eeeeee;
}

.upload-progress-bar {
    width: 100%;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #b32626, #ff4d4d);
    transition: width 0.15s ease;
}

button:disabled,
.button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 780px) {
    .upload-progress-meta {
        flex-direction: column;
        gap: 4px;
    }
}

/* Dynamischer Hintergrund:
   - unscharfer Hintergrund füllt immer den Bildschirm
   - scharfes Bild liegt darüber und wird auf Ultrawide vollständig angezeigt
*/

body {
    background-image: none !important;
    background-color: #000000;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('/assets/7days-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(18px) brightness(0.55);
    transform: scale(1.08);
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('/assets/7days-bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

/* Ab sehr breiten Monitoren, z. B. Ultrawide, wird das Bild vollständig angezeigt */
@media (min-aspect-ratio: 2/1) {
    body::after {
        background-size: contain;
        background-position: center top;
    }
}

.background-overlay {
    z-index: 2;
    pointer-events: none;
}

.topbar,
.hero-center {
    z-index: 3;
}

/* Hintergrund immer auf volle Bildschirmgröße strecken.
   Vorteil: nichts wird abgeschnitten, keine Ränder.
   Nachteil: auf Ultrawide wird das Bild leicht horizontal verzerrt. */

body {
    background-image: none !important;
    background-color: #000000;
}

body::before {
    display: none !important;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('/assets/7days-bg.jpg');
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.background-overlay {
    z-index: 2;
}

.topbar,
.hero-center {
    z-index: 3;
}
