/* Root Variables */
:root {
    /* Light Theme Colors */
    --primary-color: #2ecc71;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    
    /* Status Colors */
    --status-live: #e74c3c;
    --status-finished: #95a5a6;
    --status-scheduled: #3498db;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo i {
    font-size: 2rem;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-menu a {
    color: white;
    font-weight: 500;
    transition: var(--transition);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-toggle {
    display: none;
}

/* Main Content */
.main {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 200px);
}

/* Page Title */
.page-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

/* Card */
.card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: var(--spacing-lg);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Match Card */
.match-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-md);
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.match-league {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.match-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-live {
    background-color: var(--status-live);
    color: white;
    animation: pulse 2s infinite;
}

.status-finished {
    background-color: var(--status-finished);
    color: white;
}

.status-scheduled {
    background-color: var(--status-scheduled);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.match-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.team-name {
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.match-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-info {
    display: none;
}

.match-venue {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.standings-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.standings-table th,
.standings-table td {
    padding: var(--spacing-md);
    text-align: left;
}

.standings-table th {
    font-weight: 600;
    font-size: 0.9rem;
}

.standings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.standings-table tbody tr:hover {
    background-color: rgba(46, 204, 113, 0.1);
}

.standings-table tbody tr:last-child {
    border-bottom: none;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.team-logo-small {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.rank {
    font-weight: bold;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

.btn-primary:hover {
    background-color: #27ae60;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    color: var(--accent-color);
}

.error i {
    font-size: 3rem;
}

/* No Data */
.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    color: var(--text-secondary);
}

.no-data i {
    font-size: 3rem;
}

/* Footer */
.footer {
    background: var(--card-background);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

/* Register Button */
.btn-register {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-register:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: white;
}

.btn-register i {
    font-size: 16px;
}

.register-text {
    display: inline;
}

/* Register Banner */
.register-banner {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 40px 0;
    margin-top: 60px;
}

.register-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.register-banner-text h3 {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.register-banner-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

.btn-register-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: white;
    color: #ff6b35;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-register-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    color: #ff6b35;
}

.btn-register-large i {
    font-size: 20px;
}

/* Floating Register Button */
.floating-register-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    z-index: 998;
    animation: pulse 2s infinite;
}

.floating-register-btn:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
    color: white;
}

.floating-register-btn i {
    font-size: 20px;
}

.floating-register-text {
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 53, 0.7);
    }
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

#scrollToTop.show {
    display: flex;
}

#scrollToTop:hover {
    background-color: #27ae60;
    transform: translateY(-5px);
}

/* Responsive Design */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .match-card {
        padding: var(--spacing-md);
    }
    
    .team-logo {
        width: 55px;
        height: 55px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

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

    .menu-toggle {
        display: block;
    }

    .page-title {
        font-size: 1.5rem;
    }

    /* Match Card Responsive */
    .match-card {
        padding: var(--spacing-md);
    }
    
    .match-body {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .team {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .team-logo {
        width: 50px;
        height: 50px;
    }
    
    .team-name {
        text-align: left;
        font-size: 1.1rem;
        flex: 1;
    }
    
    .match-score {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: var(--spacing-md) 0;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        margin: var(--spacing-sm) 0;
    }
    
    .score {
        font-size: 2.5rem;
        display: flex;
        gap: var(--spacing-md);
    }
    
    .match-time {
        font-size: 1rem;
    }
    
    .match-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .match-league {
        font-size: 0.85rem;
    }
    
    .match-status {
        align-self: flex-start;
    }
    
    .match-info {
        display: block;
        width: 100%;
        padding-top: var(--spacing-sm);
        border-top: 1px solid var(--border-color);
        margin-top: var(--spacing-sm);
    }
    
    .match-venue {
        font-size: 0.85rem;
    }

    .standings-table {
        font-size: 0.85rem;
    }

    .standings-table th,
    .standings-table td {
        padding: var(--spacing-sm);
    }
}

    /* Register Button Responsive */
    .register-text {
        display: none;
    }
    
    .btn-register {
        padding: 10px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .register-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .register-banner-text h3 {
        font-size: 22px;
        justify-content: center;
    }
    
    .register-banner-text p {
        font-size: 14px;
    }
    
    .btn-register-large {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    /* Floating Register Button - Mobile */
    .floating-register-btn {
        bottom: 80px;
        right: 15px;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .floating-register-btn i {
        font-size: 18px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }
    
    .match-card {
        padding: var(--spacing-sm);
    }
    
    .team-logo {
        width: 40px;
        height: 40px;
    }
    
    .team-name {
        font-size: 0.95rem;
    }
    
    .score {
        font-size: 2rem;
    }
    
    .match-time {
        font-size: 0.9rem;
    }
    
    .match-league {
        font-size: 0.8rem;
    }
    
    .match-status {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .register-banner {
        padding: 30px 0;
    }
    
    .register-banner-text h3 {
        font-size: 20px;
    }
    
    .register-banner-text p {
        font-size: 13px;
    }
    
    .btn-register-large {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    /* Floating Register Button - Small Mobile */
    .floating-register-btn {
        bottom: 70px;
        right: 10px;
        padding: 10px 16px;
        font-size: 14px;
        gap: 8px;
    }
    
    .floating-register-btn i {
        font-size: 16px;
    }
    
    .floating-register-text {
        display: none;
    }
    
    .floating-register-btn {
        border-radius: 50%;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
    }
}
