:root {
    --yedidag-dark: #1a2340;
    --yedidag-red: #c42026;
    --bg-light: #f4f7f9;
    --white: #ffffff;
    --gray-text: #64748b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    color: var(--yedidag-dark);
}

.countdown-section {
    background: linear-gradient(rgba(26, 35, 64, 0.9), rgba(26, 35, 64, 0.9));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 20px;
    text-align: center;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.countdown-title {
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 20px;
    display: block;
    opacity: 0.8;
}

#next-match-timer {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
}

.time-unit .number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.time-unit .label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
    color: var(--yedidag-red);
    letter-spacing: 1.5px;
}

.next-match-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: inline-block;
    padding: 20px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-match-badge {
    background: var(--yedidag-red);
    color: white;
    display: inline-block;
    padding: 4px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.next-match-vs {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.next-match-meta {
    font-size: 1rem;
    opacity: 0.7;
}

.main-content {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--yedidag-dark);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    right: 15px;
    color: var(--gray-text);
    pointer-events: none;
}

#rakip-search:not(:placeholder-shown) {
    border-color: var(--yedidag-red);
    background-color: #fffafb;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray-text);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.3;
}

.custom-dropdown {
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid var(--yedidag-dark);
    background-color: white;
    font-size: 1rem;
    font-weight: 600;
    color: var(--yedidag-dark);
    cursor: pointer;
    outline: none;
    width: 280px;
    max-width: 100%;
    box-sizing: border-box;
}

.custom-dropdown:focus {
    border-color: var(--yedidag-red);
}

.custom-dropdown,
#rakip-search {
    width: 100%;
    box-sizing: border-box;
}

optgroup {
    font-style: normal;
    font-weight: bold;
    color: var(--yedidag-red);
}

option {
    color: var(--yedidag-dark);
    font-weight: normal;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.3;
}

.section-title {
    font-size: 1.5rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin: 40px 0 20px;
}

.match-card {
    background: white;
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 12px;
    flex-direction: row;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 6px solid var(--yedidag-red);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.match-card:hover {
    transform: translateY(-3px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.date-section {
    min-width: 70px;
    text-align: center;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.score-box {
    margin: 0;
    transition: transform 0.2s;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
    min-width: 50px;
    text-align: center;
    letter-spacing: 20%;
}

.no-score {
    background-color: #64748b !important;
    color: white;
    box-shadow: none;
}


.match-card:has(.no-score) {
    opacity: 0.9;
}

.salon-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.salon-link:hover {
    color: var(--yedidag-red);
    text-decoration: underline;
}

.win {
    background-color: #28a745 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.loss {
    background-color: #dc3545 !important;
}

.archive-section {
    opacity: 0.8;
}

.archive-section .match-card {
    border-left-color: var(--gray-text);
}

.archive-hero {
    background: linear-gradient(rgba(26, 35, 64, 0.95), rgba(26, 35, 64, 0.95));
    color: white;
    padding: 50px 20px;
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #28a745;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--gray-text);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value.loss-val {
    color: #dc3545;
}

.asama-badge {
    background-color: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.match-result-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 120px;
    gap: 8px;
}

.match-note {
    font-size: 0.75rem;
    color: var(--yedidag-red);
    background: rgba(196, 32, 38, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    border: 1px solid rgba(196, 32, 38, 0.1);
    width: fit-content;
}

.match-note i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.asama-badge:contains('Final') {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #f59e0b !important;
}

.btn-redirect {
    display: inline-block;
    background-color: var(--yedidag-red);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 32, 38, 0.2);
    border: none;
}

.btn-redirect:hover {
    background-color: var(--yedidag-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 64, 0.3);
    color: white;
}

.btn-redirect i {
    margin-right: 8px;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--gray-text);
}


@media (max-width: 600px) {
    .main-content {
        padding: 10px;
    }

    .match-card {
        flex-direction: column;
        text-align: center;
        padding: 12px 10px;
        gap: 5px;
        align-items: center;
    }

    .match-card div[style*="flex-direction: column"] {
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }

    .match-card h3 {
        font-size: 1rem;
        margin: 5px 3px !important;
    }

    .match-card small {
        font-size: 0.8rem;
    }

    .date-section {
        min-width: 45px !important;
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 10px;
        padding-right: 10px !important;
    }

    .match-result-wrapper {
        min-width: 0 !important;
        align-items: center !important;
        border-top: 1px solid #eee;
    }

    .score-box {
        margin-top: 10px;
        font-size: 1.2rem;
    }

    #next-match-timer {
        gap: 10px;
        flex-wrap: wrap;
    }

    .next-match-info {
        padding: 15px 25px;
        width: 85%;
    }

    .time-unit {
        min-width: 65px;
    }

    .time-unit .number {
        font-size: 2.5rem;
    }

    .time-unit .label {
        font-size: 0.65rem;
        margin-top: 5px;
    }

    .next-match-vs {
        font-size: 1.3rem;
    }

    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-dropdown {
        width: 100%;
    }

    .countdown-section {
        padding: 30px 10px;
    }

    .stats-container {
        display: flex;
        grid-template-columns: 1fr;
    }
}