:root {
    --primary: #1a472a;
    --secondary: #2e8b57;
    --accent: #f1c40f;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --danger: #dc3545;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--primary);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent);
}

.live-badge {
    background: var(--danger);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    animation: pulse 2s infinite;
}

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

.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    outline: none;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-welcome {
    margin-right: 15px;
    color: white;
    font-weight: 500;
}

.favorites-btn {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

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

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

.admin-btn {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 10px;
}

.admin-btn:hover {
    background: #e6b800;
}

.logout-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 10px;
}

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

.login-btn-header {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

.login-btn-header:hover {
    background: var(--primary);
}

.last-update {
    font-size: 14px;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    display: flex;
    margin-top: 20px;
    gap: 20px;
    min-height: calc(100vh - 100px);
}

/* Filters Sidebar */
.filters-sidebar {
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: 85vh;
    position: sticky;
    top: 20px;
}

.filters-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filters-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 0 0 8px 8px;
}

.filter-section {
    margin-bottom: 25px;
}

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

.filter-header h3 {
    font-size: 16px;
    color: var(--primary);
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 0;
    flex: 1;
}

.select-all-btn {
    background: none;
    border: 1px solid var(--gray);
    color: var(--gray);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.select-all-btn:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-options {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px;
}

.filter-options.more-options {
    max-height: 200px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.filter-option input {
    margin: 0;
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Stars Filter */
.stars-filter {
    display: flex;
    gap: 5px;
}

.star {
    color: #ddd;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.star.active {
    color: var(--accent);
}

.star:hover {
    color: var(--accent);
}

/* Buttons */
.apply-btn, .reset-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 8px;
}

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

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

.reset-btn {
    background-color: #e9ecef;
    color: var(--dark);
}

.reset-btn:hover {
    background-color: #dee2e6;
}

/* Events Container */
.events-container {
    flex: 1;
    min-height: 600px;
}

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

.events-count {
    color: var(--gray);
    font-size: 14px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--secondary);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-card.favorite {
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.event-card.favorite .event-header {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe680 100%);
}

.event-header {
    background-color: var(--primary);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.event-time {
    font-size: 14px;
    font-weight: 500;
}

.event-time.today {
    color: var(--accent);
    font-weight: bold;
}

.event-time.tomorrow {
    color: var(--secondary);
    font-weight: bold;
}

.event-time.local-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

.event-league {
    font-size: 12px;
    opacity: 0.8;
    text-align: right;
}

.event-body {
    padding: 15px;
    flex: 1;
}

.event-teams {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.3;
}

.event-selection {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.selection-name {
    font-weight: 500;
}

.event-odds {
    font-weight: bold;
    color: var(--secondary);
    font-size: 18px;
}

.event-tips {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 10px;
}

.event-percentage {
    font-weight: bold;
    color: var(--success);
}

.value-rating {
    display: flex;
    gap: 2px;
    margin: 10px 0;
}

.value-star {
    color: #ddd;
    font-size: 14px;
}

.value-star.active {
    color: var(--accent);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.event-sport, .event-market {
    padding: 4px 8px;
    background: var(--light);
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray);
    display: inline-block;
    width: fit-content;
}

.event-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.add-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

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

.remove-btn {
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background-color: #c82333;
}

/* States */
.loading, .no-events {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    grid-column: 1 / -1;
}

.no-favorites {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.no-favorites-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-content.large {
    max-width: 600px;
}

.modal-header {
    background-color: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-btn, .register-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
}

.login-btn:hover, .register-btn:hover {
    background-color: var(--primary);
}

.form-footer {
    text-align: center;
    color: var(--gray);
}

.link-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    text-decoration: underline;
}

.link-btn:hover {
    color: var(--primary);
}

/* Admin Styles */
.admin-actions {
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

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

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

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
    margin-bottom: 5px;
}

.user-info span {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 2px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    margin-top: 5px;
}

.role-badge.admin {
    background-color: var(--accent);
    color: var(--dark);
}

.role-badge.user {
    background-color: var(--secondary);
    color: white;
}

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 10px;
}

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

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

.user-actions {
    display: flex;
    gap: 5px;
}

.btn-edit, .btn-delete {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-edit:hover {
    color: var(--secondary);
}

.btn-delete:hover {
    color: var(--danger);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.info {
    background: var(--info);
}

.notification.warning {
    background: var(--warning);
    color: var(--dark);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar custom */
.filter-options::-webkit-scrollbar {
    width: 6px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.filters-content::-webkit-scrollbar {
    width: 8px;
}

.filters-content::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.filters-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.filters-content::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.users-list::-webkit-scrollbar {
    width: 6px;
}

.users-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.users-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .filters-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-bar {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filters-content {
        max-height: none;
        overflow-y: visible;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .user-welcome {
        display: none;
    }
}