/* CSS Variables for theming */
:root {
    --background-color: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-text-color: #666;
}

html.dark {
    --background-color: #1e1e1e;
    --text-color: #e0e0e0;
    --border-color: #333;
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-text-color: #aaa;
}

/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode */
html.dark body {
    background-color: #121212;
    color: #e0e0e0;
}

/* Light Mode */
html:not(.dark) body {
    background-color: #f5f5f5;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}
html:not(.dark) header {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}


header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.toolbar button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    width: 24px;
    height: 24px;
}

.toolbar .material-symbols-outlined {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light mode: show dark_mode icon, hide light_mode icon */
html:not(.dark) .icon-light {
    opacity: 0;
    transform: scale(0);
}
html:not(.dark) .icon-dark {
    opacity: 1;
    transform: scale(1);
}

/* Dark mode: show light_mode icon, hide dark_mode icon */
html.dark .icon-dark {
    opacity: 0;
    transform: scale(0);
}
html.dark .icon-light {
    opacity: 1;
    transform: scale(1);
}

main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.error-message, .no-matches {
    color: #ff5555;
    text-align: center;
    padding: 2rem;
}

.no-matches {
    color: inherit;
}

/* Match Card Styles */
.match-card {
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

html.dark .match-card {
    background-color: #1e1e1e;
}

html:not(.dark) .match-card {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.match-details {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.match-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.team-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.team-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.match-info {
    text-align: center;
    min-width: 120px;
}

.match-date, .match-time, .match-status {
    font-weight: bold;
}

.match-date {
    font-size: 1.2rem;
}

.match-time {
    font-size: 1.2rem;
    font-weight: bold;
}

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

.match-score {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.match-status.live {
    color: #e94545; /* A reddish color for live status */
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #e94545;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

.match-status.finished {
    font-weight: bold;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(233, 69, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(233, 69, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(233, 69, 69, 0);
    }
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

html.dark footer {
    border-top: 1px solid #333;
}

html:not(.dark) footer {
    border-top: 1px solid #ddd;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Modal Styles --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.4s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 24px;
    line-height: 1.6;
}

.modal-body p {
    margin: 0 0 1rem;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

.modal-ok-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.modal-ok-btn:hover {
    background-color: var(--primary-hover-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.legal-page {
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.legal-page h1 {
    margin-bottom: 1rem;
}

.legal-page h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 2rem;
}

.legal-page h3 {
    margin-top: 1.5rem;
} 