@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Orbitron:wght@700;900&display=swap');

/* Base Reset and Typography */
:root {
    --bg-dark: #0a0e17;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent: #4ade80;
    --danger: #f87171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ---------------- Scoreboard Specific ---------------- */
.scoreboard-body {
    background: linear-gradient(rgba(10, 14, 23, 0.4), rgba(6, 10, 16, 0.8)), url('../fondo_para_enbelleser.png') no-repeat center center / cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scoreboard-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.info-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.period {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 7rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.added-time {
    font-size: 2.5rem;
    color: var(--accent);
    margin-left: 15px;
    text-shadow: 0 0 10px var(--accent);
}

.blink {
    animation: blinker 1s linear infinite;
    position: relative;
    top: -10px;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.score-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15vh;
}

.team-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.team-color {
    width: 80px;
    height: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px currentColor;
}

.team-logo {
    width: 260px;
    height: 260px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

#team2-logo {
    transform: scale(1.2);
}

.team-name {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.score-box {
    background: transparent;
    padding: 10px;
    border: none;
    box-shadow: none;
}

.score-box span {
    font-family: 'Orbitron', sans-serif;
    font-size: 13rem;
    font-weight: 900;
    line-height: 1;
    color: white;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(0deg, rgba(74, 222, 128, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Premium Broadcast Goal Animation */
.goal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(16, 25, 40, 0.4) 0%, rgba(6, 10, 16, 0.95) 100%);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.goal-overlay.active {
    opacity: 1;
}

.goal-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 8vw;
    font-weight: 900;
    color: transparent;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #c4d2e7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 0.5vw;
    white-space: nowrap;
    text-align: center;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 20px 40px rgba(255, 255, 255, 0.15));
}

.goal-overlay.active .goal-text {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: premiumGlow 3s ease-in-out infinite alternate;
}

@keyframes premiumGlow {
    0% {
        filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.1));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 15px 50px rgba(255, 255, 255, 0.4));
        transform: scale(1.02);
    }
}

/* ---------------- ADMIN SPREAD OUT ---------------- */
.admin-body {
    background: linear-gradient(rgba(10, 14, 23, 0.4), rgba(6, 10, 16, 0.9)), url('../imagen_fondo_panel_admin.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    padding: 3vh 3vw;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-main-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    margin-bottom: 2vh;
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

.admin-super-spread {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5vh;
}

.admin-time-zone {
    width: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
}

.timer-mega-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px 0;
    width: 400px;
    text-align: center;
    border-radius: 20px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timer-actions-spread {
    display: flex;
    gap: 40px;
    justify-content: center;
    width: 100%;
}

.btn-giant-play,
.btn-giant-reset {
    font-size: 1.2rem;
    padding: 15px 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.btn-giant-play {
    background: rgba(16, 185, 129, 0.8);
}

.btn-giant-reset {
    background: rgba(255, 255, 255, 0.1);
}

.btn-giant-play:hover {
    background: rgba(16, 185, 129, 1);
    border-color: white;
}

.btn-giant-reset:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.period-actions-spread {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
}

.btn-period-huge {
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: 0.3s;
}

.added-time-actions-spread {
    display: flex;
    gap: 20px;
    align-items: center;
}

.added-time-label {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-add-huge {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.btn-add-del {
    background: rgba(255, 255, 255, 0.05);
}

/* TEAMS */
.admin-teams-spread {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 5vw;
}

.team-controller {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.team-controller input[type="text"] {
    width: 100%;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    background: transparent;
    color: white;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.team-controller input[type="color"] {
    width: 100%;
    height: 30px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.score-mega-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    color: white;
}

.btn-goal-mega {
    width: 100%;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
}

.btn-goal-mega:hover {
    background: rgba(255, 255, 255, 0.3);
}

.visitor-glow {
    background: rgba(255, 255, 255, 0.15);
}

.btn-undo-huge {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    cursor: pointer;
}

.btn-undo-huge:hover {
    background: rgba(0, 0, 0, 0.6);
}

.btn-open-screen-huge {
    margin-top: 5vh;
    width: 100%;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}