
/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.sidebar-header p {
    color: #718096;
    font-size: 0.9rem;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-right-color: #667eea;
}

.sidebar-menu a.logout:hover {
    background: rgba(245, 101, 101, 0.1);
    color: #f56565;
    border-right-color: #f56565;
}

.sidebar-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.admin-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-main.full-width {
    width: 100%;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s ease;
}

.flash-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.flash-error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

.close-flash {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-flash:hover {
    opacity: 1;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2d3748;
    margin-bottom: 10px;
}

.login-header p {
    color: #718096;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4a5568;
}

.login-info code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Dashboard */
.dashboard-header h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.events { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-icon.live { background: linear-gradient(135deg, #f56565, #c53030); }
.stat-icon.users { background: linear-gradient(135deg, #48bb78, #38a169); }
.stat-icon.api { background: linear-gradient(135deg, #ed8936, #dd6b20); }

.stat-info h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-info p {
    color: #718096;
    font-size: 0.9rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.recent-activity,
.quick-actions {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.recent-activity h2,
.quick-actions h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.activity-list {
    space-y: 15px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info strong {
    color: #2d3748;
    display: block;
}

.activity-info p {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 2px;
}

.activity-time {
    color: #a0aec0;
    font-size: 0.8rem;
}

.action-buttons {
    display: grid;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn i {
    margin-right: 10px;
}

.action-btn.add {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.action-btn.manage {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-btn.settings {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.action-btn.view {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

/* Tables */
.events-table-container,
.users-table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow-x: auto;
}

.events-table,
.users-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table th,
.users-table th {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.events-table td,
.users-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #4a5568;
}

.live-row {
    background: rgba(245, 101, 101, 0.05);
}

.live-badge {
    background: #f56565;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 8px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-scheduled { background: rgba(102, 126, 234, 0.1); color: #667eea; }
.status-in-play { background: rgba(245, 101, 101, 0.1); color: #f56565; }
.status-finished { background: rgba(72, 187, 120, 0.1); color: #48bb78; }
.status-postponed { background: rgba(237, 137, 54, 0.1); color: #ed8936; }
.status-cancelled { background: rgba(160, 174, 192, 0.1); color: #a0aec0; }
.status-active { background: rgba(72, 187, 120, 0.1); color: #48bb78; }

.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-administrator {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.role-moderator {
    background: rgba(237, 137, 54, 0.1);
    color: #ed8936;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: rgba(160, 174, 192, 0.2);
    color: #4a5568;
    border: 1px solid rgba(160, 174, 192, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #c53030);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: white;
    font-size: 2rem;
}

.form-page .page-header h1 {
    color: #2d3748;
}

.event-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.checkbox-label input {
    margin-right: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.no-events {
    text-align: center;
    color: #718096;
    font-style: italic;
}

.actions {
    display: flex;
    gap: 8px;
}

/* Settings Page */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.settings-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.settings-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.api-status {
    margin-bottom: 15px;
}

.api-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.api-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.api-status-badge.active {
    background: rgba(72, 187, 120, 0.1);
    color: #48bb78;
}

.api-status-badge.inactive {
    background: rgba(245, 101, 101, 0.1);
    color: #f56565;
}

.api-note {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 10px;
}

.config-items {
    space-y: 15px;
}

.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.config-item input,
.config-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.security-options {
    space-y: 10px;
}

.security-options .checkbox-label {
    margin-top: 10px;
    font-size: 0.9rem;
}

.settings-actions {
    margin-top: 30px;
    text-align: center;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.analytics-card h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.traffic-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat .label {
    color: #718096;
    font-size: 0.9rem;
}

.popular-sports,
.activity-timeline {
    space-y: 10px;
}

.sport-stat,
.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.source-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.source-name {
    width: 80px;
    font-size: 0.9rem;
    color: #4a5568;
}

.source-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 0 15px;
    position: relative;
}

.source-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.source-percent {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: #718096;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .sidebar-menu li {
        margin: 0 5px;
        min-width: 120px;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .settings-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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