/* ===== GLOBAL ===== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #222222;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Wenn Burger-Menü offen ist → Seite dahinter NICHT scrollen */
body.menu-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
    left: 0;
    right: 0;
}

/* ===== LOGIN ===== */
.center {
    min-height: 100vh;
    display: grid;
    place-items: center;
    color: white;
}
.center form {
    background: #111;
    padding: 2rem;
    border: 1px solid #333;
    border-radius: 8px;
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.side-bar {
    width: 80px;
    background-color: #111;
    flex-shrink: 0;
}

.side-bar.left {
    border-right: 1px solid #444;
}

.side-bar.right {
    border-left: 1px solid #444;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER (245px Höhe) ===== */
header.main-header {
    width: 100%;
    height: 245px;
    max-height: 245px;

    overflow: visible;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 1rem 2rem;
    box-sizing: border-box;
    position: relative;

    background-image: linear-gradient(
        rgba(0,0,0,0.55),
        rgba(0,0,0,0.55)
    ), url("background.jpg");
    background-size: cover;
    background-position: center;

    color: white;
    margin: 0 0 2rem 0;
}

/* Logo */
header.main-header .header-title img.head_img {
    max-height: 70px;
    width: auto;
}

/* ===== NAVIGATION unten mittig (Desktop) ===== */
.header-nav {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;

    max-width: 1100px;
    margin: 0 auto;
}

/* Stil 2: leicht transparente graue Buttons */
.header-nav button {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;

    padding: 0.35rem 0.9rem;
    border-radius: 6px;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    transition: background 0.2s, border-color 0.2s, transform 0.15s, color 0.2s;
}

.header-nav button:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}
.header-nav button.active,
.dropdown-menu button.active {
    color: #ffcd2c !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 205, 44, 0.7) !important;
}

/* ===== HAMBURGER (Mobile) ===== */
header.main-header .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;

    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10000;
}

header.main-header .hamburger div {
    width: 30px;
    height: 4px;
    background: white;
}

/* ===================================================== */
/* ===== FULLSCREEN DROPDOWN (Mobile Burger Menü) ====== */
/* ===================================================== */

header.main-header .dropdown-menu {
    display: none;
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 120%;

    background: rgba(5, 5, 5, 0.93);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    z-index: 9999;

    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    gap: 1rem;
    padding: 60px 0 40px 0;
    margin: 0;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;

    animation: fadeIn 0.4s ease forwards;
}

/* Burger-Menü Buttons kompakter */
header.main-header .dropdown-menu button {
    width: 80%;
    max-width: 340px;

    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);

    font-size: 1.35rem;
    padding: 0.75rem 1.4rem;

    border-radius: 8px;
    cursor: pointer;
    text-align: center;

    transition: background 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
}

header.main-header .dropdown-menu button:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

header.main-header .dropdown-menu button.active {
    color: #ffcd2c;
    background: rgba(255,205,44,0.25);
    border-color: rgba(255,205,44,0.65);
}

/* Fade-In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 2rem 2rem 2rem;
    box-sizing: border-box;
    align-items: center;
}

/* ===== SUBHEADER ===== */
.header_help {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin-bottom: 1rem;
}

.header-title_help {
    margin: 0;
    font-size: 2rem;
    color: #ffcd2c;
}

/* ===== CARDS (Standard) ===== */
.cards-wrapper {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.card {
    background-color: #1c1c1c;
    border: 1px solid #333;
    border-radius: 10px;
    width: 300px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    box-shadow: 0 0 10px rgba(255, 149, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.03);
}

.card-title {
    color: #ffcd2c;
    margin-bottom: 1rem;
}

.card-text {
    color: #ccc;
    margin-bottom: 1rem;
}

.card-button {
    display: inline-block;
    background: #ffcd2c;
    color: #121212;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.card-button:hover {
    opacity: 0.85;
}

/* ========================================== */
/*              KEYBINDS (FIX)                */
/* ========================================== */
.keybind-card {
    text-align: center;
}

.keybind-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: fit-content;
}

.keybind-list li {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    font-size: 1.3rem;
    margin: 6px 0;
    color: white;
}

.keybind-list .key {
    font-weight: bold;
    min-width: 60px;
    text-align: right;
}

.keybind-list .desc {
    text-align: left;
}

/* ===== CLIPS ===== */
.large-media-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

section.card.media-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

section.card.media-card video.media-video {
    width: 100%;
    height: 40vh;
    max-height: 40vh;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    background: black;
}

/* ===== FULLSCREEN DOCS ===== */
.fullscreen-page .main-content {
    padding: 0 !important;
    align-items: stretch !important;
}

.fullscreen-object {
    width: 90% !important;
    margin-left: 5%;
    margin-right: 5%;
    height: calc((100vh - 225px) * 0.90) !important;
    border: none;
    display: block;
    box-sizing: border-box;
}

/* ===== RAFFLE PAGE EXTRA STYLES ===== */

/* Systemmeldungen mit mehr Abstand nach unten */
.system-messages-wrapper {
    margin-bottom: 3rem;
}
.system-messages-card {
    max-width: 700px;
}

/* Breiten für bestimmte Cards */
.card-narrow {
    max-width: 700px;
}
.card-wide {
    width: 100%;
    max-width: 900px;
    text-align: left;
}

/* Unstyled list + scrollable */
.list-unstyled {
    list-style: none;
    padding-left: 0;
}
.scrollable-list {
    max-height: 160px;
    overflow: auto;
}

/* Spaltenlayout in der Detailansicht */
.raffle-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #ffcd2c;
}
.raffle-column {
    flex: 1 1 250px;
    color: #ffcd2c;
}

/* Creator-Steuerung oben rechts (Login/Logout/Create Code) */
.creator-controls {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.creator-controls .card-button {
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
}

/* Form-Styles (dunkel) */
form .form-group {
    margin-bottom: 0.6rem;
}
form label {
    font-size: 0.95rem;
    color: #ddd;
    display: block;
    margin-bottom: 0.25rem;
}
input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    box-sizing: border-box;
    background: #111;
    border: 1px solid #444;
    color: #f5f5f5;
    border-radius: 5px;
    padding: 0.4rem 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
}
textarea {
    resize: vertical;
}

/* Modals für Login & Creator-Code */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}
.modal-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
}
.modal-card form {
    text-align: center;
}
.modal-card .form-group {
    text-align: left;
}
.modal-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}
/* ===== SYSTEM-MESSAGE MODAL ===== */
#systemMessageModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#systemMessageModal .modal-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
}

#systemMessageModal .modal-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

/* Accordion-Listen für Verlosungen */
.raffle-section-title {
    color: #ffcd2c;
    margin: 1rem 0 0.5rem 0;
    width: 100%;
    text-align: center;
}

.raffle-list {
    width: 100%;
    max-width: 900px;
}

.raffle-list-item {
    background-color: #1c1c1c;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    padding: 0.8rem 1rem;
    box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

.raffle-list-header {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}
.raffle-list-header-text {
    font-weight: bold;
}
.raffle-list-header-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}
.raffle-list-header::after {
    content: "▼";
    margin-left: 0.6rem;
    font-size: 0.8rem;
    opacity: 0.9;
}
.raffle-list-header.is-open::after {
    content: "▲";
}

.raffle-list-body {
    display: none;
    margin-top: 0.6rem;
    border-top: 1px solid #444;
    padding-top: 0.6rem;
}
/* ======================= WINNER ROULETTE MODAL ======================= */

#winnerRouletteModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.roulette-card {
    background: #1b1b1b;
    border: 1px solid #555;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    border-radius: 10px;
    width: 420px;
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.roulette-scroll-box {
    height: 150px;
    overflow: hidden;
    border: 1px solid #333;
    margin-top: 1.2rem;
    border-radius: 6px;
    background: #111;
    position: relative;
}

.roulette-inner {
    position: absolute;
    width: 100%;
}

.roulette-item {
    padding: 0.8rem;
    font-size: 1.3rem;
    color: #ffcd2c;
    text-shadow: 0 0 5px rgba(255,205,44,0.5);
}

#winnerFinal {
    margin-top: 1.5rem;
}

#winnerName {
    font-size: 1.6rem;
    margin-top: 0.4rem;
    color: #ffcd2c;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .header-nav { display: none; }
    header.main-header .hamburger { display: flex; }

    .layout { flex-direction: column; }
    .side-bar { display: none; }

    .main-content { padding: 0 1rem 1rem 1rem; }

    section.card.media-card {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    section.card.media-card video.media-video {
        height: 40vh;
        max-height: 50vh;
    }

    .fullscreen-object {
        width: 100% !important;
        margin: 0 !important;
        height: calc((100vh - 225px) * 0.85) !important;
    }

    .keybind-list li {
        gap: 25px;
        font-size: 1.15rem;
    }

    .card-wide {
        max-width: 100%;
    }

    .raffle-list {
        max-width: 100%;
    }
}
