
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-image: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.5) 100%),
        url('https://images.unsplash.com/photo-1540747913346-19e32dc3e97e?q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    background: linear-gradient(to right, #dc2626, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.refresh-container {
    margin-bottom: 15px;
}

.refresh-btn {
    padding: 10px 24px;
    border: 2px solid #dc2626;
    border-radius: 25px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.refresh-btn:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
}

.refresh-btn span {
    display: inline-block;
    font-size: 18px;
    margin-right: 5px;
}

.filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #2563eb;
    border-radius: 25px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
}

.filter-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.5);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: white;
}

.loading.hide {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(220, 38, 38, 0.2);
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    font-size: 16px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid #dc2626;
    border-radius: 15px;
    margin: 20px;
}

.matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.match-card {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.85), rgba(13, 13, 13, 0.85));
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #dc2626, #2563eb);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.3);
}

.match-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.status-live {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    border: 2px solid #dc2626;
    animation: pulse 2s infinite;
}

.status-upcoming {
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
    border: 2px solid #2563eb;
}

.status-finished {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 2px solid #444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.8);
    }
}

.match-info {
    margin-bottom: 20px;
}

.match-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-type {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.teams {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.team:hover {
    background: rgba(255, 255, 255, 0.05);
}

.team.winning {
    border-left-color: #dc2626;
}

.team-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
}

.team-score {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
    min-width: 120px;
    text-align: right;
}

.match-details {
    font-size: 13px;
    color: #888;
    margin: 15px 0;
    line-height: 1.6;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid #2563eb;
}

.view-scorecard-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc2626 0%, #2563eb 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.view-scorecard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.view-scorecard-btn:hover::before {
    left: 100%;
}

.view-scorecard-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.5);
}

.view-scorecard-btn:active {
    transform: scale(0.98);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(13, 13, 13, 0.98));
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(220, 38, 38, 0.3);
    backdrop-filter: blur(15px);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #dc2626, #2563eb);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.scorecard-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.scorecard-section h3 {
    font-size: 16px;
    color: #dc2626;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.3);
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.scorecard-table th,
.scorecard-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scorecard-table th {
    background: rgba(37, 99, 235, 0.1);
    font-weight: 600;
    color: #2563eb;
    font-size: 13px;
    text-transform: uppercase;
}

.scorecard-table td {
    font-size: 14px;
    color: #ccc;
}

.scorecard-table tr:last-child td {
    border-bottom: none;
}

.scorecard-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #dc2626, #2563eb);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .matches-container {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .scorecard-table th,
    .scorecard-table td {
        padding: 8px 5px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .match-card {
        padding: 15px;
    }

    .team-name {
        font-size: 14px;
    }

    .team-score {
        font-size: 16px;
        min-width: 100px;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .refresh-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ===== Navbar ===== */
.navbar {
    width: 100%;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    color: #60a5fa;
    margin: 0;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-right a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-right a:hover {
    color: #60a5fa;
}

.nav-refresh {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
}

.hamburger {
    display: none;
    font-size: 26px;
    cursor: pointer;
    color: white;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .nav-right {
        position: absolute;
        top: 60px;
        right: 0;
        background: #0f172a;
        flex-direction: column;
        width: 200px;
        padding: 20px;
        display: none;
        border-left: 1px solid rgba(255,255,255,0.1);
    }

    .nav-right.show {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}


.site-footer {
    margin-top: 80px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand h2 {
    color: #60a5fa;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-copy p {
    font-size: 13px;
    color: #94a3b8;
}
