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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.navbar {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}

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

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    opacity: 0.7;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.ended { background: #ef4444; }
.dot.live { background: #22c55e; }
.dot.upcoming { background: #eab308; }

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

.event-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.event-card.ended {
    border-color: #ef4444;
    opacity: 0.7;
}

.event-card.live {
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.event-card.upcoming {
    border-color: #eab308;
}

.live-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #22c55e;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.event-name {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label {
    font-weight: 600;
    opacity: 0.8;
}

.website-link {
    color: #60a5fa;
    text-decoration: none;
}

.website-link:hover {
    text-decoration: underline;
}

.website-detail {
    margin-top: 0.5rem;
}

.website-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

.website-btn .arrow {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.website-btn:hover .arrow {
    transform: translateX(3px);
}

.description p {
    margin-top: 0.25rem;
    opacity: 0.8;
    line-height: 1.5;
}

.no-events {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; }
.alert-success { background: rgba(34, 197, 94, 0.2); border: 1px solid #22c55e; }

.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60a5fa;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-apply {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-edit { background: #eab308; color: #000; }
.btn-delete { background: #ef4444; }

.auth-link {
    text-align: center;
    margin-top: 1rem;
    opacity: 0.8;
}

.auth-link a {
    color: #60a5fa;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.events-table-container {
    overflow-x: auto;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.events-table th,
.events-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.events-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.events-table a {
    color: #60a5fa;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.form-container h2 {
    margin-bottom: 1.5rem;
}

.event-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }
}

.event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.file-input {
    padding: 0.5rem;
}

.form-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.coords-hint {
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.current-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-preview {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.table-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.map-container {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.filters {
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-group select option {
    background: #1a1a2e;
    color: #fff;
}

.multi-select-dropdown {
    position: relative;
}

.multi-select-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: space-between;
}

.multi-select-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-arrow {
    font-size: 0.7rem;
}

.multi-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 4px;
    min-width: 180px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.multi-select-dropdown.open .multi-select-options {
    display: block;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.category-tag {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

.category-tag-small {
    display: inline-block;
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-right: 3px;
}

.event-categories {
    margin-bottom: 0.75rem;
}

.categories-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.categories-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.add-category-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-category-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.btn-delete-small {
    color: #ef4444;
    font-weight: bold;
}

.btn-delete-small:hover {
    background: rgba(239, 68, 68, 0.2);
}

.no-items {
    opacity: 0.7;
    font-size: 0.9rem;
}

.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover, .radio-label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-label input[type="checkbox"], .radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.month-section {
    margin-bottom: 2.5rem;
}

.month-header {
    font-size: 1.75rem;
    color: #fff;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-header::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(to bottom, #3b82f6, #60a5fa);
    border-radius: 2px;
}

.category-more-btn {
    background: rgba(107, 114, 128, 0.5);
    color: #fff;
    border: none;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.category-more-btn:hover {
    background: rgba(107, 114, 128, 0.8);
}

.categories-expanded {
    margin-top: 6px;
}

.categories-expanded .category-tag {
    margin-bottom: 4px;
}

.backup-section {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.backup-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.5rem;
}

.import-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.import-form input[type="file"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    color: #fff;
}

.footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}
