/* SCHRIFTARTEN */
@font-face {
    font-family: 'Britannica';
    src: url('britanica-expanded-extra-bold.ttf') format('truetype');
}

@font-face {
    font-family: 'FranklinLight';
    src: url('franklin-gothic-urw-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

/* BASIS LAYOUT */
body {
    background: white;
    margin: 0;
    padding: 0;
    text-align: center;
    color: white;
    font-family: 'FranklinLight', Arial, sans-serif;
    letter-spacing: 0.7px;
}

.main-area {
    background: #5c44e4;
    padding: 40px 20px 40px 20px;
}

h1 {
    font-family: 'Britannica', Arial, sans-serif;
    font-size: 33px;
    margin: 0;
    letter-spacing: 2px;
}

h2.subtitle {
    font-family: 'FranklinLight', Arial, sans-serif;
    margin-top: 10px;
    font-size: 18px;
}

/* GRID & CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1300px;
    margin: 40px auto 0 auto;
}

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    color: black;
}

.card-header {
    background: #3414fc;
    padding: 14px 10px;
    color: white;
    font-size: 18px;
    font-family: 'FranklinLight', Arial, sans-serif;
    text-transform: uppercase;
}

.card-body {
    padding: 20px;
    font-family: 'FranklinLight', Arial, sans-serif;
}

.card-body-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.card-body a {
    display: inline-block;
    padding: 10px 18px;
    background: #3414fc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
}

/* LIVE & SPIELE BOXEN */
.live-box {
    background: #3414fc;
    color: white;
    padding: 12px;
    text-align: center;
    font-family: 'FranklinLight';
    font-size: 18px;
    margin-top: 10px;
    border-radius: 10px;
}

#liveSpiel {
    position: sticky;
    z-index: 999;
    background: #3414fc;
}

#liveSpiel.full-width {
    width: auto;
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
}

.games-wrapper {
    background: white;
    color: black;
    padding: 12px;
    margin: 12px auto;
    border-radius: 12px;
    max-width: 420px;
}

.games-header {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.game-line {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.game-line:last-child {
    border-bottom: none;
}

.show-more {
    margin: 6px 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #3414fc;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* ADMIN & PASSWORT */
#adminPasswordBox {
    display: none;
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    font-family: 'FranklinLight';
    text-align: center;
}

.admin-box {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    border: 2px solid #3414fc;
    width: 220px;
    margin: 0 auto;
}

.admin-title {
    font-weight: bold;
    color: #3414fc;
    margin-bottom: 8px;
    font-size: 16px;
}

#adminPasswordBox input {
    padding: 8px;
    width: 160px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#adminPanel {
    display: none;
    margin-top: 20px;
    padding: 10px;
    background: #3414fc;
    color: white;
    border-radius: 10px;
    font-family: 'FranklinLight';
}

.admin-button {
    padding: 6px 10px;
    margin: 4px;
    border: none;
    border-radius: 6px;
    background: white;
    color: #3414fc;
    font-weight: bold;
    cursor: pointer;
}

.ball-icon {
    width: 28px;
    height: 28px;
    margin-left: 10px;
    cursor: pointer;
    animation: ballMove 2s infinite ease-in-out;
    display: inline-block;
    font-size: 24px;
}

@keyframes ballMove {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* POPUPS */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.35);
    z-index: 9990;
}

.popup-fuba {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 500px;
    height: 85vh;
    background: white;
    border-radius: 16px;
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    font-family: 'FranklinLight', Arial, sans-serif;
    z-index: 9999;
    animation: popupFade 0.4s ease-out;
}

.popup-header {
    background: #3414fc;
    color: white;
    padding: 12px 16px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-timer {
    background: white;
    color: #3414fc;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
}

.popup-body {
    padding: 20px;
    font-size: 16px;
    color: #333;
    text-align: center;
}

@keyframes popupFade {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* COUNTDOWN BOX */
.countdown-box {
    width: 100%;
    background: #3414fc;
    color: white;
    padding: 12px 0;
    text-align: center;
    font-family: 'FranklinLight', Arial, sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* BESUCHERZÄHLER & FOOTER */
.visitor-box {
    margin: 40px auto 0 auto;
    padding: 15px 25px;
    background: white;
    border: 3px solid #3414fc;
    border-radius: 12px;
    width: fit-content;
    text-align: center;
    font-family: 'FranklinLight', Arial, sans-serif;
    font-size: 18px;
    color: black;
}

.visitor-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: black;
}

.footer {
    padding: 8px 10px;
    background: white;
    color: black;
    font-family: 'FranklinLight', Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    border-top: 2px solid #3414fc;
}

.footer a { color: black; text-decoration: underline; }
.footer-title { font-size: 16px; font-weight: bold; margin-bottom: 4px; }
.footer-copy { margin-top: 4px; font-size: 13px; opacity: 0.85; }
.copy-symbol { font-family: Arial, sans-serif; }

.result-line {
    font-weight: bold;
    color: #3414fc;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
    font-size: 14px;
}

#adminPanel input {
    padding: 5px;
    border-radius: 4px;
    border: none;
    text-align: center;
    font-weight: bold;
}

/* Styling für das Ergebnis direkt in der Zeile */
.game-res {
    font-weight: 800;
    color: #3414fc; /* Dein lila/blau */
    margin-left: 10px;
    background: rgba(52, 20, 252, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Der Reset Button im Admin Bereich */
#resetResultsBtn:hover {
    background: #a71d2a !important;
}

/* Die optimierte Live-Box */
.live-box {
    background: #3414fc;
    color: white;
    padding: 10px;
    text-align: center;
    font-family: 'FranklinLight', Arial, sans-serif;
    margin: 15px auto;
    border-radius: 12px;
    position: relative; /* Wichtig für die Positionierung des Effekts */
    overflow: hidden;   /* Schneidet den Lichteffekt am Rand ab */
    box-shadow: 0 4px 15px rgba(52, 20, 252, 0.3);
}

/* Der wandernde Lichtschweif am Rand */
.live-box::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent 20%
    );
    animation: rotate-border 4s linear infinite;
    pointer-events: none;
}

/* Animation für den Lichtschweif */
@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Der rote pulsierende Punkt */
.live-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ff0044;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 0 8px #ff0044;
    animation: pulse-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-dot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}


/* Das Innere der Box (deckt das Licht in der Mitte ab) */
.live-content-wrapper {
    background: #3414fc; /* Dein Original-Blau */
    border-radius: 12px;
    padding: 6px;
    position: relative;
    z-index: 2;
}