/* Responsive CSS Framework */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Header and Navigation */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: #34495e;
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Flash Messages */
.flash-messages {
    margin: 20px 0;
}

.flash-message {
    padding: 12px 20px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: 500;
}

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

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
}

/* Dashboard Cards */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: #3498db;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.card .number {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group .error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #2c3e50;
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f5f5f5;
}

tr:last-child td {
    border-bottom: none;
}

/* Compact Table Styling for Players, Clubs, and Rankings */
.table-container.compact table {
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.table-container.compact th,
.table-container.compact td {
    padding: 8px 10px;
    line-height: 1.3;
}

.table-container.compact th {
    font-size: 0.85rem;
    font-weight: 600;
}

.table-container.compact .player-name {
    font-size: 0.9rem;
    line-height: 1.2;
}

.table-container.compact .player-name strong {
    font-size: 0.95rem;
}

.table-container.compact .player-name small {
    font-size: 0.8rem;
}

/* Compact Rankings Table Specific */
.rankings-table.compact {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.rankings-table.compact th,
.rankings-table.compact td {
    padding: 8px 10px;
    line-height: 1.3;
}

.rankings-table.compact .rank-number {
    font-size: 1.2rem;
    width: 40px;
    padding: 8px 6px !important;
}

.rankings-table.compact .points {
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 50px;
    padding: 8px 6px !important;
}

.rankings-table.compact .player-name {
    font-size: 0.85rem;
    line-height: 1.2;
    padding: 8px 8px !important;
}

.rankings-table.compact .player-name strong {
    font-size: 0.9rem;
}

.rankings-table.compact .player-name small {
    font-size: 0.75rem;
}

.rankings-table.compact .win-rate {
    font-size: 0.85rem;
    min-width: 60px;
    padding: 8px 6px !important;
}

.rankings-table.compact td:nth-child(4) {
    /* Matches column */
    font-size: 0.85rem;
    min-width: 50px;
    padding: 8px 6px !important;
    text-align: center;
}

/* Club Grid and Card Styling */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.club-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.club-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.club-header {
    margin-bottom: 1rem;
}

.club-header h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.club-location {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.club-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    margin: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

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

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.club-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-action:hover {
    transform: translateY(-1px);
}

/* Compact Club Cards */
.clubs-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.clubs-grid.compact .club-card {
    padding: 1rem;
}

.clubs-grid.compact .club-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.clubs-grid.compact .club-location {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.clubs-grid.compact .club-stats {
    padding: 0.75rem 0;
    margin: 0.75rem 0;
}

.clubs-grid.compact .stat-number {
    font-size: 1.5rem;
}

.clubs-grid.compact .stat-label {
    font-size: 0.8rem;
}

.clubs-grid.compact .club-actions {
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.clubs-grid.compact .btn-action {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Compact Table Button Styling */
.table-container.compact .btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.table-container.compact .btn-group {
    gap: 0.25rem;
}

/* Match Type Labels */
.match-type {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.match-type.singles {
    background: #3498db;
    color: white;
}

.match-type.doubles {
    background: #27ae60;
    color: white;
}

.match-type.mixed {
    background: #e74c3c;
    color: white;
}

/* Winner indicator */
.winner {
    color: #27ae60;
    font-weight: bold;
}

.loser {
    color: #e74c3c;
}

.tie {
    color: #f39c12;
    font-weight: bold;
}

.even {
    color: #f39c12;
    font-weight: bold;
}

/* Rankings */
.rankings-table {
    margin: 2rem 0;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    text-align: center;
    width: 50px;
}

.points {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.2rem;
}

.win-rate {
    color: #7f8c8d;
}

.player-name, .club-name {
    font-weight: 600;
    color: #2c3e50;
}

/* Skill Rating Stars */
.skill-rating {
    color: #f39c12;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Mobile Font Optimizations */
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        line-height: 1.3;
        font-size: 14px;
    }

    .match-item {
        font-size: 13px;
        line-height: 1.2;
    }

    /* Rankings Table Mobile Optimizations */
    .rankings-table {
        font-size: 0.85rem;
    }

    .rankings-table .rank-number {
        font-size: 1.1rem;
        width: 35px;
        padding: 6px 4px !important;
    }

    .rankings-table .points {
        font-size: 1rem;
        min-width: 45px;
        padding: 6px 4px !important;
    }

    .rankings-table td:nth-child(4) {
        /* Matches column */
        min-width: 50px;
        padding: 6px 4px !important;
        text-align: center;
        font-size: 0.9rem;
    }

    .rankings-table .win-rate {
        font-size: 0.8rem;
        min-width: 55px;
        padding: 6px 4px !important;
        text-align: center;
    }

    .rankings-table .player-name {
        font-size: 0.85rem;
        line-height: 1.2;
        padding: 6px 8px !important;
    }

    .rankings-table .player-name strong {
        font-size: 0.9rem;
    }

    .rankings-table .player-name small {
        font-size: 0.75rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

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

    .menu-toggle {
        display: flex;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card .number {
        font-size: 2.5rem;
    }

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

    .btn {
        width: 100%;
        text-align: center;
    }

    .table-container {
        font-size: 0.9rem;
    }

    th, td {
        padding: 8px 10px;
    }

    .hide-mobile {
        display: none;
    }

    /* Compact Tables Mobile Optimizations */
    .table-container.compact table {
        font-size: 0.8rem;
    }

    .table-container.compact th,
    .table-container.compact td {
        padding: 6px 8px;
        line-height: 1.2;
    }

    .table-container.compact .player-name,
    .table-container.compact .club-name {
        font-size: 0.8rem;
    }

    .table-container.compact .player-name strong,
    .table-container.compact .club-name strong {
        font-size: 0.85rem;
    }

    .table-container.compact .player-name small,
    .table-container.compact .club-name small {
        font-size: 0.75rem;
    }

    /* Compact Rankings Table Mobile */
    .rankings-table.compact {
        font-size: 0.75rem;
    }

    .rankings-table.compact th,
    .rankings-table.compact td {
        padding: 6px 8px;
        line-height: 1.2;
    }

    .rankings-table.compact .rank-number {
        font-size: 1rem;
        width: 35px;
        padding: 6px 4px !important;
    }

    .rankings-table.compact .points {
        font-size: 0.85rem;
        min-width: 45px;
        padding: 6px 4px !important;
    }

    .rankings-table.compact .player-name {
        font-size: 0.75rem;
        line-height: 1.1;
        padding: 6px 6px !important;
    }

    .rankings-table.compact .player-name strong {
        font-size: 0.8rem;
    }

    .rankings-table.compact .player-name small {
        font-size: 0.7rem;
    }

    .rankings-table.compact .win-rate {
        font-size: 0.75rem;
        min-width: 50px;
        padding: 6px 4px !important;
    }

    .rankings-table.compact td:nth-child(4) {
        /* Matches column */
        font-size: 0.75rem;
        min-width: 45px;
        padding: 6px 4px !important;
    }

    /* Compact Club Cards Mobile */
    .clubs-grid.compact {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .clubs-grid.compact .club-card {
        padding: 0.75rem;
    }

    .clubs-grid.compact .club-header h3 {
        font-size: 1.1rem;
    }

    .clubs-grid.compact .club-location {
        font-size: 0.8rem;
    }

    .clubs-grid.compact .stat-number {
        font-size: 1.3rem;
    }

    .clubs-grid.compact .stat-label {
        font-size: 0.75rem;
    }

    .clubs-grid.compact .btn-action {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    section {
        padding: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card .number {
        font-size: 2rem;
    }

    .table-container {
        font-size: 0.8rem;
    }

    th, td {
        padding: 6px 8px;
    }

    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Rankings Table Extra Small Mobile Optimizations */
    .rankings-table {
        font-size: 0.75rem;
    }

    .rankings-table .rank-number {
        font-size: 1rem;
        width: 30px;
        padding: 4px 2px !important;
    }

    .rankings-table .points {
        font-size: 0.9rem;
        min-width: 40px;
        padding: 4px 2px !important;
    }

    .rankings-table td:nth-child(4) {
        /* Matches column */
        min-width: 40px;
        padding: 4px 2px !important;
        font-size: 0.8rem;
    }

    .rankings-table .win-rate {
        font-size: 0.7rem;
        min-width: 45px;
        padding: 4px 2px !important;
    }

    .rankings-table .player-name {
        font-size: 0.75rem;
        line-height: 1.1;
        padding: 4px 6px !important;
    }

    .rankings-table .player-name strong {
        font-size: 0.8rem;
    }

    .rankings-table .player-name small {
        font-size: 0.7rem;
    }

    /* Reduce padding for table headers on small screens */
    .rankings-table th {
        padding: 6px 4px !important;
        font-size: 0.8rem;
    }

    .rankings-table th:nth-child(1) {
        /* Rank header */
        width: 30px;
        min-width: 30px;
    }

    .rankings-table th:nth-child(3) {
        /* Points header */
        width: 40px;
        min-width: 40px;
    }

    .rankings-table th:nth-child(4) {
        /* Matches header */
        width: 40px;
        min-width: 40px;
    }

    .rankings-table th:nth-child(5) {
        /* Win Rate header */
        width: 45px;
        min-width: 45px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none;
}

.show {
    display: block;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Form Validation */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #e74c3c;
}

.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
    border-color: #27ae60;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
}

.pagination a:hover {
    background: #3498db;
    color: white;
}

.pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Date Range Selector */
.date-range-selector {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.date-range-selector .form-group {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0;
}

/* Quick Date Ranges */
.quick-date-ranges {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
    border-left: 4px solid #3498db;
}

.quick-date-ranges h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.quick-date-ranges .btn-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .date-range-selector .form-group {
        display: block;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .quick-date-ranges .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .quick-date-ranges .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Filter Form */
.filter-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem 0;
    border: 1px solid #dee2e6;
}

.filter-form .form-group {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0;
    vertical-align: top;
}

@media (max-width: 768px) {
    .filter-form .form-group {
        display: block;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Match List */
.match-item {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.match-item:hover {
    transform: translateY(-2px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.match-teams.compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.team {
    text-align: center;
}

.team-separator {
    font-size: 1.5rem;
    color: #7f8c8d;
    margin: 0 1rem;
}

.match-separator {
    color: #f39c12;
    font-size: 0.9em;
    margin: 0 0.5rem;
    display: inline-flex;
    align-items: center;
}

/* Match Actions - Icon Buttons */
.match-actions {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 1rem;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-icon.btn-edit {
    background-color: #3498db;
    border-color: #2980b9;
    color: white;
}

.btn-icon.btn-edit:hover {
    background-color: #2980b9;
    border-color: #21618c;
}

.btn-icon.btn-delete {
    background-color: #e74c3c;
    border-color: #c0392b;
    color: white;
}

.btn-icon.btn-delete:hover {
    background-color: #c0392b;
    border-color: #a93226;
}

.btn-icon form {
    margin: 0;
    padding: 0;
    display: inline;
}

.btn-icon button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Note: Dropdown styles are now in components/dropdowns.css to avoid duplication */

.login-btn {
    background: #3498db;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.login-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Profile Page Styles */
.profile-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 2rem auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.profile-info h2 {
    margin: 0;
    color: #2c3e50;
}

.profile-info .role {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f4f4f4;
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item label {
    font-weight: 600;
    color: #666;
}

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

@media (max-width: 768px) {
    .match-teams {
        flex-direction: column;
        gap: 1rem;
    }

    .match-teams.compact {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        margin: 0.15rem 0;
        flex-wrap: wrap;
        line-height: 1.1;
        font-size: 13px;
    }

    .match-teams.compact span {
        font-size: 13px;
        line-height: 1.1;
    }

    .match-separator {
        font-size: 11px;
        margin: 0 0.3rem;
    }

    .team-separator {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

    .match-actions {
        margin-left: 0.3rem;
        margin-top: 0;
    }

    .btn-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .match-type {
        padding: 2px 5px;
        font-size: 10px;
        border-radius: 2px;
        margin-right: 0.3rem;
    }

    .match-header .text-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .match-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .match-header {
        gap: 0.15rem;
        margin-bottom: 0.25rem;
    }

    .match-header > div:first-child {
        font-size: 12px;
        margin-bottom: 0.15rem;
        line-height: 1.2;
    }

    .match-header .text-right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        font-size: 12px;
        line-height: 1.2;
    }

    .match-header .text-right strong {
        font-size: 13px;
        font-weight: 600;
    }

    .match-item {
        padding: 0.75rem 0.5rem;
        margin: 0.4rem 0;
        line-height: 1.2;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .dropdown-menu {
        right: 0;
        left: 0;
    }

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

/* Medium screen optimizations (tablets) */
@media (max-width: 1024px) and (min-width: 769px) {
    .rankings-table {
        font-size: 0.9rem;
    }

    .rankings-table .rank-number {
        font-size: 1.3rem;
        width: 45px;
    }

    .rankings-table .points {
        font-size: 1.1rem;
        min-width: 55px;
    }

    .rankings-table td:nth-child(4) {
        /* Matches column */
        min-width: 60px;
        text-align: center;
    }

    .rankings-table .win-rate {
        font-size: 0.9rem;
        min-width: 65px;
        text-align: center;
    }
}