/* ===================================
   BASE STYLES
=================================== */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1e1f24;
    color: #e6e6e6;
}

.container {
    max-width: 900px;
    margin: 60px auto;
    padding: 20px;
}

.card {
    background: #2a2c33;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #3a3d46;
}

h1, h2, h3 {
    font-weight: 500;
}

/* ===================================
   NAVIGATION
=================================== */

.nav {
    margin-bottom: 20px;
}

.nav a {
    color: #a0a4ad;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
}

.nav a:hover {
    color: #ffffff;
}

/* ===================================
   FORMS
=================================== */

label {
    margin-right: 15px;
    color: #a0a4ad;
}

input, select {
    background: #1e1f24;
    border: 1px solid #3a3d46;
    color: #e6e6e6;
    padding: 8px;
    border-radius: 6px;
    margin-right: 10px;
}

/* ===================================
   BUTTONS
=================================== */

button {
    background: #4c566a;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: #5e677d;
}

.button-secondary {
    background: #3a3d46;
}

.button-secondary:hover {
    background: #4a4d56;
}

.button-danger {
    background: #5a3a3a;
}

.button-danger:hover {
    background: #6d4545;
}

/* ===================================
   TABLES
=================================== */

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 25px;
}

th, td {
    padding: 10px;
    text-align: center;
}

th {
    background: #252730;
    color: #a0a4ad;
}

tr:nth-child(even) {
    background: #24262d;
}

tr:hover {
    background: #30323a;
}

#status {
    margin-top: 15px;
    color: #a0a4ad;
}

/* ===================================
   BRACKET LAYOUT
=================================== */

.bracket {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
}

.round {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.match {
    background: #2a2c33;
    min-width: 120px;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    position: relative;
}

.match::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 20px;
    height: 2px;
    background: #444;
}

.round.final .match::after {
    display: none;
}

.round.left .match {
    margin-left: 0;
}

.round.right .match {
    margin-right: 0;
}

.match.winner {
    background: #4caf50;
    color: #fff;
    font-weight: bold;
}

.match.loser {
    background: #3a3d46;
    color: #888;
}

