body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center;
}

header {
    background-color: #2a9d8f;
    color: white;
    padding: 20px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    margin: 0;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h3 {
    margin: 10px 0 0 0;
    font-size: 1.2em;
    font-weight: normal;
    opacity: 0.9;
}

.header-icon {
    height: 1.5em;
    width: auto;
    border-radius: 50%;
}

.main-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px auto;
    max-width: 600px;
    padding: 0 20px;
}

.input-container {
    width: 100%;
    max-width: 400px;
    padding: 25px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.side-info {
    width: 100%;
    max-width: 450px;
    text-align: center;
    background-color: #fbfbfc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    font-size: 0.95em;
    color: #444;
    line-height: 1.6;
}

.side-info p {
    margin: 5px 0;
}

.side-info a {
    color: #2a9d8f;
    text-decoration: underline;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.banner-logo {
    height: 1.2em;
    width: auto;
    vertical-align: middle;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
}

button {
    background-color: #e76f51;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #d8573d;
}

.schedule-output {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#resultMessage {
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #f4a261;
    background-color: #fff8e1;
    border-radius: 8px;
    color: #856404;
}

.schedule-container table,
#stat-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.schedule-container th,
.schedule-container td,
#stat-container th,
#stat-container td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: center;
}

.schedule-container th,
#stat-container th {
    background-color: #2a9d8f;
    color: white;
}

/* View Toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px auto 10px;
}

.toggle-btn {
    background-color: white;
    color: #e76f51;
    padding: 10px 24px;
    border: 2px solid #e76f51;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    width: auto;
    margin-top: 0;
    transition: background-color 0.2s, color 0.2s;
}

.toggle-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.toggle-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.toggle-btn.active {
    background-color: #e76f51;
    color: white;
    border-color: #e76f51;
}

.toggle-btn:hover:not(.active) {
    background-color: #fef0ec;
}

/* Cards View */
.schedule-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px auto;
}

.round-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.round-card-header {
    background-color: #2a9d8f;
    color: white;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 1.05em;
}

.round-card-body {
    padding: 16px;
}

.court-match {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.court-match:last-child {
    border-bottom: none;
}

.court-match .court-label {
    font-size: 0.8em;
    font-weight: bold;
    color: #2a9d8f;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.court-match .match-text {
    font-size: 0.95em;
    color: #333;
}

.bye-label {
    padding: 8px 16px;
    font-size: 0.85em;
    color: #888;
    font-style: italic;
    background-color: #fafafa;
    border-top: 1px solid #eee;
}