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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f28 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-bottom: 3px solid #00c853;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    overflow: hidden;
}

.header-content {
    padding: 30px 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.header-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #e0e0e0;
    background: rgba(0, 200, 83, 0.16);
    font-weight: 600;
    transition: background-color 0.25s, color 0.25s, transform 0.25s;
}

.nav-link:hover {
    background: #00c853;
    color: #0f1419;
    transform: translateY(-1px);
}

.logo {
    height: 40px;
}

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 420px;
}

.auth-buttons:empty {
    display: none;
}

.btn-nav, .btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.25s, transform 0.25s;
}

.btn-nav {
    background: rgba(0, 200, 83, 0.18);
    color: #e0e0e0;
}

.btn-nav:hover {
    background: #00c853;
    color: #0f1419;
    transform: translateY(-1px);
}

.btn-logout {
    background: #d32f2f;
    color: white;
}

.btn-logout:hover {
    background: #ef5350;
    transform: translateY(-1px);
}

.account-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.account-card {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border: 1px solid #3a4450;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.account-card h1 {
    color: #00c853;
    margin-bottom: 18px;
    font-size: 28px;
}

.account-info {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-label {
    color: #8ba1b0;
}

.info-value {
    color: #e0e0e0;
    font-weight: 700;
}

.role-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.role-badge.admin {
    background: rgba(255, 215, 0, 0.18);
    color: #fff9c4;
}

.role-badge.user {
    background: rgba(0, 200, 83, 0.16);
    color: #b9f6ca;
}

.admin-section {
    margin-top: 10px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.15);
}

.admin-section h2 {
    color: #00e676;
    margin-bottom: 10px;
}

.admin-section ul {
    list-style: inside;
    color: #c7f0d8;
}


.header h1 {
    font-size: 2.5em;
    color: #00c853;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #b0bec5;
    font-size: 1.1em;
    font-weight: 300;
}

/* Filters */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-refresh {
    background: #00c853;
    color: #0f1419;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh:hover {
    background: #00e676;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.5);
}

.btn-refresh:active {
    transform: translateY(0);
}

.btn-refresh .material-icons {
    font-size: 20px;
}

.date-info {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    padding: 12px 24px;
    border-radius: 8px;
    border-left: 3px solid #00c853;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: #00c853;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-bottom: 30px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #00c853;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #2a3540;
    border-top: 4px solid #00c853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #00c853;
    font-size: 1.2em;
    font-weight: 600;
}

/* Leagues Container */
.leagues-container {
    display: grid;
    gap: 30px;
}

.league-section {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-top: 4px solid #00c853;
}

.league-header {
    background: linear-gradient(90deg, #00c853 0%, #00a040 100%);
    color: #0f1419;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.1em;
}

.league-flag {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.league-matches {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-collapse: collapse;
}

/* Matches Container */
.matches-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.match-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.match-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #3a4450;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    justify-content: flex-start;
    width: 100%;
}

.match-card:hover {
    transform: none;
    box-shadow: none;
    background: rgba(0, 200, 83, 0.05);
}

.match-header {
    display: none;
}

.match-content {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 600px;
    justify-content: space-between;
}

.match-meta-left {
    flex: 0 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 88px;
}

.match-row-centered {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.match-date {
    display: none;
}

.team-away {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
    justify-content: flex-start;
    justify-self: start;
    width: 100%;
    min-width: 0;
    text-align: left;
}

.team-home {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
    justify-content: flex-end;
    justify-self: end;
    width: 100%;
    min-width: 0;
    text-align: right;
}

.team-logo {
    width: 35px;
    height: 35px;
    margin: 0;
    background: #1a1f28;
    border-radius: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a4450;
    overflow: hidden;
    flex-shrink: 0;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.team-name {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.85em;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.team-home .team-name {
    text-align: right;
}

.team-away .team-name {
    text-align: left;
}

.match-score {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 15px;
    border-left: 1px solid #3a4450;
    border-right: 1px solid #3a4450;
    justify-self: center;
}

.score {
    font-size: 1.2em;
    font-weight: 700;
    color: #00c853;
}

.score.empty {
    color: #8ba1b0;
}

.match-time {
    text-align: left;
    color: #00c853;
    font-size: 0.8em;
    margin-top: 0;
    font-weight: 600;
    line-height: 1.2;
    min-width: 60px;
}

.match-stadium {
    display: none;
}

.detail-card {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a4450;
    margin-bottom: 30px;
}

.debate-auth {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a4450;
}

.debate-auth.logged-in {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-block {
    margin-bottom: 20px;
}

.auth-block:last-child {
    margin-bottom: 0;
}

.auth-block h3 {
    color: #00c853;
    margin-bottom: 10px;
}

.auth-block input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #3a4450;
    border-radius: 6px;
    background: #252d38;
    color: #e0e0e0;
    font-size: 14px;
}

.auth-block input:focus {
    outline: none;
    border-color: #00c853;
}

.debate-panel {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a4450;
}

.debate-panel h2 {
    color: #00c853;
    margin-bottom: 10px;
}

.debate-description {
    color: #8ba1b0;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #3a4450;
    border-radius: 6px;
    background: #252d38;
    color: #e0e0e0;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #00c853;
}

.comment-form textarea:disabled {
    background: #1a1f28;
    color: #666;
    cursor: not-allowed;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    background: #252d38;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #3a4450;
}

.comment-user {
    font-weight: bold;
    color: #00c853;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #8ba1b0;
    margin-bottom: 8px;
}

.comment-text {
    color: #e0e0e0;
    line-height: 1.4;
}

.comment-empty {
    text-align: center;
    color: #8ba1b0;
    padding: 40px 20px;
    font-style: italic;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3a4450;
}

.pagination-btn {
    background: #00c853;
    color: #0f1419;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #00a844;
}

.pagination-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    color: #8ba1b0;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* Auth Styles */
.auth-buttons {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.auth-nav {
    display: flex;
    gap: 10px;
}

.btn-nav {
    background: #00c853;
    color: #0f1419;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.btn-nav:hover {
    background: #00a844;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #e0e0e0;
}

.user-greeting {
    font-weight: 500;
}

.btn-logout {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background: #b71c1c;
}

/* Login Page Styles */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.auth-container {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a4450;
    width: 100%;
    max-width: 400px;
}

.auth-container h1 {
    text-align: center;
    color: #00c853;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #3a4450;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 20px;
    color: #8ba1b0;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: #00c853;
    border-bottom-color: #00c853;
}

.auth-tab:hover {
    color: #00c853;
}

.auth-form {
    transition: opacity 0.3s;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e0e0e0;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #3a4450;
    border-radius: 6px;
    background: #252d38;
    color: #e0e0e0;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #00c853;
}

.btn-primary {
    width: 100%;
    background: #00c853;
    color: #0f1419;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #00a844;
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
}

.auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.auth-message.success {
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
    border: 1px solid #00c853;
}

.auth-message.error {
    background: rgba(211, 47, 47, 0.1);
    color: #f44336;
    border: 1px solid #f44336;
}

.detail-header-row,
.detail-info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.detail-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #fff;
    color: #0f1419;
    border-radius: 4px;
    gap: 10px;
    font-size: 1.05em;
}

.detail-status.finished {
    background: #3f3f3f;
    color: white;
}

.detail-status.live {
    background: #00c853;
    color: white;
    animation: pulse 1.5s infinite;
}

.detail-match-id {
    color: #8ba1b0;
    font-size: 0.9em;
    word-break: break-all;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.team-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.team-detail-right {
    align-items: center;
}

.team-logo-large {
    width: 90px;
    height: 90px;
    background: #1a1f28;
    border-radius: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a4450;
    overflow: hidden;
}

.team-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name-large {
    color: #e0e0e0;
    font-weight: 700;
    text-align: center;
}

.detail-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.score-large {
    color: #00c853;
    font-size: 2.4em;
    font-weight: 700;
}

.detail-stage {
    color: #8ba1b0;
    font-size: 0.95em;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tv-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #3a4450;
}

.tv-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 1.05em;
}

.tv-header .material-icons {
    color: #00c853;
}

.tv-dropdown {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #252d38 0%, #1f272f 100%);
    border: 1px solid #3a4450;
    color: #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tv-dropdown:hover {
    border-color: #00c853;
}

.tv-dropdown:focus {
    outline: none;
    border-color: #00c853;
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.3);
}

.tv-dropdown option {
    background: #252d38;
    color: #e0e0e0;
}

.tv-player {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3a4450;
}

.tv-player iframe {
    display: block;
    width: 100%;
    border: none;
}

.match-status {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    color: #0f1419;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
    align-self: flex-start;
    text-align: left;
}

.match-status.finished {
    background: #3f3f3f;
    color: white;
}

.match-status.live {
    background: #00c853;
    color: white;
    animation: pulse 1.5s infinite;
}

.finished {
    color: white;
}

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

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    box-shadow: 0 8px 32px rgba(198, 40, 40, 0.3);
    border: 1px solid #e53935;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1f28 0%, #252d38 100%);
    color: #b0bec5;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-top: auto;
    border-top: 2px solid #00c853;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .match-card {
        padding: 12px 15px;
    }

    .team-name {
        font-size: 0.8em;
    }

    .match-score {
        padding: 0 10px;
        min-width: 50px;
    }

    .score {
        font-size: 1.2em;
    }

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

    .btn-refresh {
        width: 100%;
        justify-content: center;
    }

    .date-info {
        width: 100%;
        text-align: center;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .detail-header-row,
    .detail-info-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tv-dropdown {
        max-width: 100%;
    }

    .tv-player iframe {
        height: 350px !important;
    }
}

@media (max-width: 480px) {
    .match-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .match-meta-left {
        min-width: 64px;
        gap: 4px;
    }

    .match-row-centered {
        gap: 8px;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .match-content {
        gap: 12px;
        flex-wrap: wrap;
    }

    .match-time {
        font-size: 0.7em;
    }

    .match-status {
        font-size: 0.65em;
        padding: 3px 8px;
    }

    .team-logo {
        width: 30px;
        height: 30px;
    }

    .team-name {
        font-size: 0.75em;
    }

    .match-score {
        padding: 0 8px;
        min-width: 45px;
        border-left: 1px solid #3a4450;
        border-right: 1px solid #3a4450;
    }

    .score {
        font-size: 1em;
    }
}