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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.8;
    color: #2a2a2a;
    background: #faf8f6;
    background-attachment: fixed;
    padding-top: 90px;
    min-height: 100vh;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 40px 60px;
}

/* Header Bar */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 248, 246, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.logo {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-button {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.6);
}

.tab-button:hover {
    background: rgba(106, 137, 204, 0.08);
    color: #4a69bd;
    border-color: rgba(106, 137, 204, 0.3);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(106, 137, 204, 0.3);
}

.section {
    display: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 60px;
    border: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    color: #2a2a2a;
    margin-bottom: 50px;
    font-size: 3em;
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0;
    letter-spacing: -1px;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.controls select {
    padding: 14px 20px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 40px;
    font-size: 15px;
    min-width: 250px;
    transition: all 0.3s ease;
    background: white;
    color: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.controls select:focus {
    outline: none;
    border-color: rgba(106, 137, 204, 0.5);
    box-shadow: 0 0 20px rgba(106, 137, 204, 0.2);
}

.controls select:disabled {
    background: #f5f5f5;
    color: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    min-width: 400px;
}

.dropdown-trigger {
    padding: 16px 24px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 40px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.dropdown-trigger:hover {
    border-color: rgba(106, 137, 204, 0.5);
    box-shadow: 0 8px 25px rgba(106, 137, 204, 0.15);
}

.dropdown-trigger.active {
    border-color: rgba(106, 137, 204, 0.5);
    border-radius: 40px 40px 0 0;
    background: #f8f9fa;
}

.dropdown-text {
    color: #2a2a2a;
    font-weight: 500;
    font-size: 15px;
}

.dropdown-arrow {
    color: rgba(0, 0, 0, 0.5);
    font-size: 13px;
    transition: transform 0.3s ease;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(106, 137, 204, 0.3);
    border-top: none;
    border-radius: 0 0 40px 40px;
    max-height: 400px;
    overflow: hidden;
    display: none;
    z-index: 100;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.dropdown-menu.active {
    display: block;
}

.dropdown-search {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #2a2a2a;
}

.dropdown-search::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.dropdown-search:focus {
    border-bottom-color: rgba(106, 137, 204, 0.5);
    background: #f8f9fa;
}

.dropdown-options {
    max-height: 340px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #f8f9fa;
}

.dropdown-option.selected {
    background: rgba(106, 137, 204, 0.1);
    border-left: 4px solid #6a89cc;
}

.option-title {
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 6px;
    font-size: 15px;
}

.option-details {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
}

.option-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.event-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 40px;
    padding: 40px;
    background: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.event-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.event-card:hover .event-card-bg {
    opacity: 0.12;
    transform: scale(1.05);
}

.event-card-content {
    position: relative;
    z-index: 1;
}

.event-card:hover {
    border-color: rgba(106, 137, 204, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(106, 137, 204, 0.25);
}

.event-card h3 {
    color: #2a2a2a;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.event-card p {
    margin-bottom: 12px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 1.05em;
    line-height: 1.8;
}

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

.player-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 40px;
    padding: 35px;
    background: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.player-card:hover {
    border-color: rgba(106, 137, 204, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(106, 137, 204, 0.2);
    background: #f8f9fa;
}

.player-card h4 {
    color: #2a2a2a;
    margin-bottom: 16px;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.player-card p {
    margin-bottom: 12px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 1.05em;
}

.player-card a {
    color: #6a89cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.player-card a:hover {
    color: #4a69bd;
    text-decoration: underline;
}

/* Event Info */
.event-info {
    background: white;
    border-radius: 40px;
    padding: 35px;
    margin-bottom: 40px;
    border-left: 5px solid #6a89cc;
    border: 1px solid rgba(106, 137, 204, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.event-info h3 {
    color: #2a2a2a;
    margin-bottom: 18px;
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.event-info p {
    margin-bottom: 10px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 1.05em;
}

/* Matches Grid */
.matches-grid h4 {
    color: #2a2a2a;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.matches-list {
    display: grid;
    gap: 15px;
}

.match-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.match-card:hover {
    box-shadow: 0 15px 40px rgba(106, 137, 204, 0.15);
    border-color: rgba(106, 137, 204, 0.3);
}

.match-card.completed {
    background: #f0f9f4;
    border-color: rgba(40, 167, 69, 0.3);
}

.table-number {
    font-weight: bold;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
    font-size: 15px;
}

.players {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.player {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 15px;
    border-radius: 25px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.player.winner-highlight {
    background: #d4edda;
    color: #155724;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.player.draw-highlight {
    background: #fff3cd;
    color: #856404;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(133, 100, 4, 0.3);
}

.vs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: rgba(0, 0, 0, 0.5);
    font-size: 17px;
    background: white;
    padding: 10px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.player .name {
    font-weight: 600;
    font-size: 15px;
    color: #2a2a2a;
}

.player .record {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
    margin-top: 6px;
}

/* Search Section */
.search-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-group label {
    font-weight: 600;
    color: #2a2a2a;
    min-width: 140px;
    font-size: 16px;
}

.search-group input {
    padding: 14px 24px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 40px;
    font-size: 15px;
    min-width: 300px;
    transition: all 0.3s ease;
    background: white;
    color: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.search-group input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.search-group input:focus {
    outline: none;
    border-color: rgba(106, 137, 204, 0.5);
    box-shadow: 0 0 25px rgba(106, 137, 204, 0.2);
}

.search-group button {
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(106, 137, 204, 0.3);
}

.search-group button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(106, 137, 204, 0.4);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.card-result, .player-result {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 40px;
    padding: 30px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.player-result {
    cursor: pointer;
}

.card-result:hover, .player-result:hover {
    border-color: rgba(106, 137, 204, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(106, 137, 204, 0.2);
    background: #f8f9fa;
}

.card-result h4, .player-result h4 {
    color: #2a2a2a;
    margin-bottom: 16px;
    font-size: 1.3em;
    font-weight: 700;
}

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

.stat-card {
    background: white;
    color: #2a2a2a;
    padding: 45px;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(106, 137, 204, 0.2);
    border-color: rgba(106, 137, 204, 0.3);
}

.stat-card h3 {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card p {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.65);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.popular-cards h3 {
    color: #2a2a2a;
    margin-bottom: 35px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.popular-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 40px;
    padding: 30px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.popular-card:hover {
    border-color: rgba(106, 137, 204, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(106, 137, 204, 0.2);
    background: #f8f9fa;
}

.popular-card h4 {
    color: #2a2a2a;
    margin-bottom: 16px;
    font-size: 1.3em;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 50px;
    border-radius: 45px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.close {
    color: rgba(0, 0, 0, 0.5);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #6a89cc;
    transform: rotate(90deg);
}

.decklist-modal {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    padding: 30px;
    background: #f8f9fa;
    margin-top: 30px;
}

.card-entry {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.card-entry:hover {
    padding-left: 10px;
}

.card-entry:last-child {
    border-bottom: none;
}

.quantity {
    font-weight: bold;
    color: #6a89cc;
    min-width: 40px;
    margin-right: 20px;
    font-size: 15px;
}

.card-name {
    color: rgba(0, 0, 0, 0.75);
    font-size: 15px;
}

.loading {
    text-align: center;
    padding: 60px;
    color: rgba(0, 0, 0, 0.5);
    font-style: italic;
    font-size: 1.1em;
}

.error {
    color: #dc3545;
    background: #fee;
    padding: 25px;
    border-radius: 40px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.3);
    font-size: 1.05em;
}

/* Player Detail Section */
.player-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.back-button {
    background: white;
    color: #2a2a2a;
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 14px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.back-button:hover {
    background: #f8f9fa;
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.tournaments-grid {
    display: grid;
    gap: 30px;
}

.tournament-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 45px;
    padding: 40px;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tournament-box:hover {
    border-color: rgba(106, 137, 204, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 25px 70px rgba(106, 137, 204, 0.25);
    background: #f8f9fa;
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tournament-header h3 {
    color: #2a2a2a;
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.deck-archetype {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.pokemon-sprite {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.tournament-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 0.95em;
    color: rgba(0, 0, 0, 0.65);
}

.tournament-meta .location {
    font-weight: 600;
    color: #6a89cc;
}

.tournament-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
    align-items: start;
}

.tournament-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 30px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat:hover {
    background: white;
    border-color: rgba(106, 137, 204, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.stat label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat span {
    font-weight: 700;
    font-size: 1.2em;
    color: #6a89cc;
}

.stat .record {
    font-size: 1.3em;
    color: #28a745;
}

.tournament-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(106, 137, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(106, 137, 204, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #2a2a2a;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.matches-section {
    border-top: 2px solid #e9ecef;
    padding-top: 20px;
}

.matches-section h4 {
    color: #2a2a2a;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.matches-list-compact {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.match-compact {
    display: grid;
    grid-template-columns: 70px 1fr 90px;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 25px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.match-compact:hover {
    box-shadow: 0 8px 20px rgba(106, 137, 204, 0.15);
    border-color: rgba(106, 137, 204, 0.3);
    background: #f8f9fa;
}

.match-compact .round {
    font-weight: 700;
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    text-align: center;
}

.match-compact .opponent {
    font-weight: 500;
    color: #2a2a2a;
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-compact .result {
    font-weight: 700;
    font-size: 0.85em;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.result.win {
    background: #d4edda;
    color: #155724;
}

.result.loss {
    background: #f8d7da;
    color: #721c24;
}

.result.draw {
    background: #fff3cd;
    color: #856404;
}

.result.incomplete {
    background: #e2e3e5;
    color: #495057;
}

.player-name-link {
    color: #6a89cc;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.player-name-link:hover {
    color: #4a69bd;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .container {
        padding: 10px;
    }

    .header-content {
        height: 60px;
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }

    .logo {
        font-size: 1.4em;
    }

    nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .section {
        padding: 20px;
    }
    
    .events-grid, .players-grid {
        grid-template-columns: 1fr;
    }
    
    .match-card {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .players {
        flex-direction: column;
        gap: 10px;
    }
    
    .vs {
        position: static;
        transform: none;
        margin: 5px 0;
    }
    
    .player {
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
    }

    .controls select {
        min-width: auto;
        width: 100%;
    }

    .custom-dropdown {
        min-width: auto;
        width: 100%;
    }

    .option-details {
        flex-direction: column;
        gap: 4px;
    }
    
    .search-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group input {
        min-width: auto;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 20px;
    }
    
    .tournament-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tournament-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .tournament-meta {
        align-items: center;
    }
    
    .tournament-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .match-compact {
        grid-template-columns: 50px 1fr 60px;
        gap: 10px;
    }
    
    .match-compact .opponent {
        font-size: 0.8em;
    }
    
    .match-compact .result {
        font-size: 0.75em;
        padding: 3px 6px;
    }
    
    .player-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }
}