/* Coreega Tennis Club - Logo-inspired Styles */

:root {
    --green-dark: #1B4332;
    --green-medium: #2D6A4F;
    --green-light: #40916C;
    --gold: #D4AF37;
    --cream: #F5F5DC;
    --cream-dark: #E8DCC4;
    --white: #FFFFFF;
    --black: #1a1a1a;
    --gray-light: #F8F9FA;
    --gray-medium: #6C757D;
}

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-image: url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--black);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.25);
    z-index: -1;
    pointer-events: none;
}

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

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
}

.logo svg {
    display: block;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
    touch-action: manipulation;
    position: relative;
    z-index: 1001;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'Arial', sans-serif;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--gold);
}

.login-link, .logout-link {
    padding: 0.5rem 1rem;
    background-color: var(--gold);
    border-radius: 5px;
    color: var(--green-dark);
}

.login-link:hover, .logout-link:hover {
    background-color: var(--cream-dark);
    color: var(--green-dark) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-style: italic;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 4px solid var(--green-dark);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--green-dark);
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    color: var(--green-dark);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--gold);
    padding-bottom: 0.5rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Info Box */
.info-box {
    color: var(--green-dark);
}

.info-box h3 {
    color: var(--green-dark);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
}

.badge-gold {
    background-color: var(--gold);
    color: var(--gray-dark);
}

.badge-primary {
    background-color: var(--green-medium);
    color: var(--white);
}

.badge-success {
    background-color: var(--green-dark);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--gray-medium);
    color: var(--white);
}

.badge-large {
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.btn-primary {
    background-color: var(--green-dark);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--green-medium);
}

.btn-outline {
    background-color: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
}

.btn-outline:hover {
    background-color: var(--green-dark);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--gray-dark);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: var(--gold);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.action-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--black);
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.player-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--gray-dark);
    transition: transform 0.3s, box-shadow 0.3s;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.player-photo {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--gray-light);
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
}

.placeholder-icon {
    font-size: 5rem;
    color: var(--cream);
}

.player-info {
    padding: 1.5rem;
}

.player-info h3 {
    margin-bottom: 0.5rem;
    color: var(--green-dark);
}

.nickname {
    font-style: italic;
    color: var(--green-medium);
    margin-bottom: 1rem;
}

.player-stats-quick {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.stat-item {
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.player-win-rate {
    text-align: center;
    font-family: 'Arial', sans-serif;
    color: var(--gold);
    font-weight: bold;
}

/* Player Profile */
.player-profile {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.profile-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-photo-large {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
}

.profile-info h1 {
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.nickname-large {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--green-medium);
    margin-bottom: 1rem;
}

.bio {
    margin: 1rem 0;
    line-height: 1.8;
}

.stats-section {
    margin: 2rem 0;
}

.stats-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.stat-box {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--gold);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--green-dark);
}

/* Tournaments */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tournament-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--gray-dark);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.tournament-header {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.tournament-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.tournament-body {
    padding: 1.5rem;
}

.tournament-body p {
    margin: 0.5rem 0;
}

.tournament-winner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.winner-photo-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-light);
}

.winner-photo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Forms */
.form-container {
    max-width: 700px;
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--green-dark);
}

.toggle-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--black);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--green-dark);
}

.form-control,
.form-control-sm {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.form-control:focus,
.form-control-sm:focus {
    outline: none;
    border-color: var(--green-dark);
}

.form-control-sm {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-medium);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label-block {
    display: block;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 5px;
    cursor: pointer;
}

.checkbox-label-block input[type="checkbox"] {
    margin-right: 0.5rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: block;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 5px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Player Selection */
.player-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.player-checkbox {
    display: block;
    cursor: pointer;
}

.player-checkbox input[type="checkbox"] {
    display: none;
}

.player-checkbox-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 5px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.player-checkbox input[type="checkbox"]:checked + .player-checkbox-content {
    background: var(--green-dark);
    color: var(--white);
    border-color: var(--gold);
}

.player-checkbox-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.player-checkbox-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Tournament Detail */
.tournament-detail {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tournament-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--gold);
}

.tournament-detail-header h1 {
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.tournament-description {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 5px;
    font-style: italic;
}

/* Bracket Display */
.bracket-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.bracket {
    display: flex;
    gap: 2rem;
    min-width: min-content;
}

.bracket-round {
    flex: 1;
    min-width: 250px;
}

.round-name {
    text-align: center;
    color: var(--green-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.round-matches {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.bracket-match {
    background: var(--gray-light);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--green-dark);
    position: relative;
}

.bracket-match.completed {
    border-left-color: var(--gold);
}

/* Visual Tournament Bracket Styles */
.bracket-visual {
    display: flex;
    gap: 4rem;
    min-width: max-content;
    padding: 2rem 1rem;
    align-items: center;
}

.bracket-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

.round-title {
    text-align: center;
    color: var(--green-dark);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
    border-radius: 8px;
    border: 2px solid var(--gold);
}

.bracket-match-wrapper {
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.bracket-match {
    background: var(--white);
    border: 2px solid var(--green-dark);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.bracket-match.completed {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.bracket-match.disabled {
    cursor: default;
    opacity: 0.6;
}

.bracket-match:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bracket-trophy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.trophy-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.trophy-winner {
    text-align: center;
    font-weight: bold;
    color: var(--green-dark);
    font-size: 1.2rem;
}

.match-player {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-light);
    border-bottom: 1px solid var(--cream-dark);
}

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

.match-player.winner {
    background: var(--green-dark);
    color: var(--white);
    font-weight: bold;
}

.player-name {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.winner-checkmark {
    color: var(--white);
    font-weight: bold;
    font-size: 1rem;
}

.player-sets {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bracket-set {
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.player-score {
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

.match-divider {
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin: 0.25rem 0;
}

.match-btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* Round Robin Standings */
.standings-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.standings-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.standings-table th {
    background: var(--green-dark);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-family: 'Arial', sans-serif;
}

.standings-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.champion-row {
    background: var(--gold);
    font-weight: bold;
}

/* Matches List */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-item-rr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 8px;
    gap: 1rem;
}

.rr-match-result {
    flex: 1;
    background: white;
    border-radius: 6px;
    padding: 8px;
}

.rr-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin: 4px 0;
    background: var(--gray-light);
    border-radius: 4px;
}

.rr-player-row.winner-row {
    background: #f0f8f0;
}

.rr-player-name {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.rr-sets {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rr-set {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 18px;
    text-align: center;
}

.match-players-rr {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.vs {
    color: var(--gray-medium);
    font-weight: bold;
}

.winner {
    color: var(--green-dark);
    font-weight: bold;
}

.loser {
    color: var(--gray-medium);
}

.match-score-rr {
    font-weight: bold;
    color: var(--green-dark);
}

/* Score Entry */
.match-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--gray-light);
    border-radius: 10px;
    text-align: center;
}

.match-preview-player h2 {
    color: var(--green-dark);
}

.match-preview-vs {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold);
}

.score-entry {
    margin: 2rem 0;
}

.set-score-row {
    display: grid;
    grid-template-columns: 100px 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.score-input {
    max-width: 100px;
    text-align: center;
    font-weight: bold;
}

.score-divider {
    font-weight: bold;
    color: var(--gray-medium);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin-bottom: 0.5rem;
}

.year-heading {
    color: var(--green-dark);
    font-size: 2.5rem;
    margin: 2rem 0 1rem;
}

.gallery-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item-small {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-item-small img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-item-small p {
    padding: 0.5rem;
    background: var(--white);
    font-size: 0.85rem;
    text-align: center;
}

/* Filters */
.filters {
    margin: 2rem 0;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--green-dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.3s;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--white);
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.empty-state .text-muted {
    color: var(--white);
}

/* Utility Classes */
.text-muted {
    color: var(--gray-medium);
}

.text-center {
    text-align: center;
}

.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.col {
    flex: 1;
}

/* Active Tournaments Grid */
.tournaments-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tournament-card-active {
    transition: transform 0.2s, box-shadow 0.2s;
}

.tournament-card-active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

/* Footer */
footer {
    background: var(--green-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Footer logout button - visible on dark background */
.footer-logout {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
    border: 2px solid var(--white);
    font-size: 14px;
}

.footer-logout:hover {
    background-color: var(--white);
    color: var(--green-dark) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--green-dark);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        display: none;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        min-height: 44px;
        line-height: 1.5;
    }

    .hero-title {
        font-size: 2rem;
    }

    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo-large {
        margin: 0 auto;
    }

    .match-preview {
        grid-template-columns: 1fr;
    }

    .match-preview-vs {
        justify-content: center;
    }

    .set-score-row {
        grid-template-columns: 80px 1fr auto 1fr;
        gap: 0.5rem;
    }

    .bracket {
        gap: 1rem;
    }

    .bracket-round {
        min-width: 200px;
    }
}

/* Tournament Progress Notice */
.progress-notice {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4d1 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid var(--gold);
    text-align: center;
}

.progress-notice p {
    margin: 0.5rem 0;
}

.progress-notice strong {
    color: var(--green-dark);
    font-size: 1.2rem;
}

/* Standard Match Score Display */
.standard-match-scores {
    margin: 10px 0;
    background: var(--gray-light);
    border-radius: 6px;
    padding: 8px;
}

.player-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin: 4px 0;
    background: white;
    border-radius: 4px;
}

.player-score-row.winner-row {
    background: #f0f8f0;
}

.player-name-inline {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.winner-check-inline {
    color: var(--green-dark);
    font-weight: bold;
    font-size: 16px;
}

.sets-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.set-num {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 18px;
    text-align: center;
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .players-grid,
    .tournaments-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}
