* { box-sizing: border-box; }
body { font-family: sans-serif; margin: 0; background: #f0f2f5; color: #333; }

header { background: white; padding: 15px; border-bottom: 2px solid #ddd; position: relative; z-index: 10; }
.logo-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { max-height: 60px; }

.container { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 10; }
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.main-content { flex: 2; min-width: 320px; }
.sidebar { flex: 1; min-width: 300px; }

#fireworks { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }

.flex-form { display: flex; flex-direction: column; gap: 15px; }
.input-group { display: flex; flex-direction: column; gap: 5px; }
input[type="number"], input[type="text"] { padding: 12px; border: 1px solid #ccc; border-radius: 6px; width: 100%; font-size: 16px; }

.match-card { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; }
.score-input { width: 50px; text-align: center; font-weight: bold; border: 1px solid #ccc; border-radius: 4px; padding: 5px; }

.btn { background: #27ae60; color: white; border: none; padding: 15px; border-radius: 6px; cursor: pointer; margin-top: 15px; font-weight: bold; width: 100%; }
.btn.next { background: #2980b9; }
.btn.end-btn { background: #e67e22; }
.btn-new { display: block; text-align: center; background: #2c3e50; color: white; padding: 15px; border-radius: 6px; text-decoration: none; font-weight: bold; }

.error-box { background: #fee2e2; color: #b91c1c; padding: 10px; border-radius: 6px; margin-bottom: 15px; display: none; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; }

.final-header { text-align: center; padding: 20px 0; }
.reset-link { display: block; text-align: center; margin-top: 20px; color: #888; text-decoration: none; font-size: 0.8em; }

@media (max-width: 768px) {
    .container { flex-direction: column; }
    .match-card { flex-direction: column; text-align: center; gap: 10px; }
}