:root {
    --primary: #8800ff;
    /* Purple */
    --primary-glow: rgba(136, 0, 255, 0.4);
    --secondary: #00d2ff;
    /* Neon Blue */
    --accent: #bc00ff;
    --bg-dark: #050508;
    --card-bg: #111116;
    --text: #ffffff;
    --text-dim: #a0a0b0;
    --success: #00ffcc;
    --error: #ff0088;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
}

.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: var(--text);
}

.btn.glass {
    background: rgba(136, 0, 255, 0.1);
    border: 1px solid rgba(136, 0, 255, 0.3);
    color: var(--text);
}

.btn.glass:hover {
    background: rgba(136, 0, 255, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn.glass.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.input-group {
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grids */
.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.team-card {
    padding: 1rem;
    background: var(--card-bg);
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.group-card {
    padding: 1.5rem;
}

.group-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.match-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Timer */
.timer-container {
    text-align: center;
    font-size: 4rem;
    font-family: monospace;
    color: var(--secondary);
    margin: 2rem 0;
    text-shadow: 0 0 20px var(--secondary);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-dim);
    padding: 0.5rem;
}

td {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bracket / Tournament Tree */
.bracket-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    overflow-x: auto;
    padding: 2rem 0;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.bracket-round h4 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bracket-match {
    position: relative;
    padding: 1.2rem;
    min-width: 300px;
    border-left: 6px solid var(--primary);
    background: rgba(20, 10, 40, 0.6);
    border-radius: 12px;
}

.bracket-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.bracket-team-name {
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-score-input {
    width: 65px;
    height: 45px;
    background: #1a1a24 !important;
    border: 2px solid var(--primary);
    color: white !important;
    text-align: center;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: 800;
}

.bracket-match::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    width: 1.5rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.bracket-round:last-child .bracket-match::after {
    display: none;
}

.running-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.running-match-card {
    padding: 1.5rem;
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.running-match-card .teams {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.running-match-card .field-name {
    color: var(--secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.help-card {
    border: 1px dashed var(--secondary);
    padding: 1.5rem;
    margin-top: 2rem;
}

.help-card h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.help-card code {
    background: rgba(0, 210, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--secondary);
}

/* Podium Styles */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 4rem 0;
    height: 300px;
    perspective: 1000px;
}

.podium-step {
    width: 200px;
    background: linear-gradient(135deg, var(--card-bg), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 1.5rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideUp 1s ease-out backwards;
}

.podium-step .rank {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.podium-step .team-name {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    padding: 0 1rem;
}

.podium-1 {
    height: 250px;
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    z-index: 3;
    animation-delay: 0.2s;
}

.podium-1 .rank {
    color: #ffd700;
    opacity: 1;
}

.podium-2 {
    height: 180px;
    border-color: #c0c0c0;
    animation-delay: 0s;
}

.podium-2 .rank {
    color: #c0c0c0;
    opacity: 1;
}

.podium-3 {
    height: 140px;
    border-color: #cd7f32;
    animation-delay: 0.4s;
}

.podium-3 .rank {
    color: #cd7f32;
    opacity: 1;
}

.podium-4 {
    height: 80px;
    width: 150px;
    border-color: var(--text-dim);
    border-radius: 12px;
    margin-top: 2rem;
    padding-top: 0.5rem;
    animation-delay: 0.6s;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.crown {
    position: absolute;
    top: -40px;
    font-size: 3rem;
    filter: drop-shadow(0 0 10px gold);
    animation: float 2s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* cycling-screen for Beamer */
.cycling-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}