/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

/* Login/Register Banner */
.login-banner {
    background: #ffeeba;
    color: #856404;
    padding: 1em 0.5em;
    text-align: center;
    font-weight: bold;
    font-size: 1.05rem;
    border-bottom: 1px solid #ffd966;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(255, 235, 186, 0.15);
    width: 100%;
    transition: background 0.3s, color 0.3s, border-bottom 0.3s;
    word-break: break-word;
}
.login-banner a {
    color: #007bff;
    text-decoration: underline;
    margin: 0 7px;
    font-weight: 600;
    transition: color 0.2s;
}
.login-banner a:hover {
    color: #0056b3;
}
@media (max-width: 600px) {
    .login-banner {
        font-size: 0.97rem;
        padding: 0.7em 0.3em;
        line-height: 1.4;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.4em;
    }
    .login-banner a {
        margin: 0 3px;
        font-size: 1em;
    }
}
body.dark-mode .login-banner {
    background: #2d2d2d;
    color: #ffeeba;
    border-bottom: 1px solid #444;
    box-shadow: 0 2px 8px rgba(44, 44, 44, 0.25);
}
body.dark-mode .login-banner a {
    color: #6cb8ff;
}
body.dark-mode .login-banner a:hover {
    color: #fff;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 30px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0a5dab;
}
.search-bar form {
    display: flex;
    align-items: center;
}
.search-bar input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 250px;
    font-size: 0.9rem;
}
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
nav a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
nav a:hover {
    background: #f0f8ff;
    color: #0a5dab;
}

/* Search Filters */
.search-filters {
    background: #f9f9f9;
    padding: 15px 30px;
    border-bottom: 1px solid #eee;
}
.search-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.search-filters input,
.search-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}
.search-btn {
    background: #0a5dab;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.search-btn:hover {
    background: #084b8a;
}

/* Categories */
.categories {
    padding: 30px 30px 10px 30px;
    background: #fff;
    border-bottom: 1px solid #eee;
    text-align: center;
}
.categories h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}
.categories p {
    color: #666;
    margin-bottom: 15px;
}
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.category {
    background: #f4f4f4;
    color: #0a5dab;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.category.active,
.category:hover {
    background: #0a5dab;
    color: #fff;
}

/* Events Section */
.events-section {
    padding: 30px;
    background: #f7faff;
}
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.tab {
    background: #e9ecef;
    color: #0a5dab;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.tab.active,
.tab:hover {
    background: #0a5dab;
    color: #fff;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.filters {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}
.filter {
    background: #f4f4f4;
    color: #0a5dab;
    padding: 6px 14px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.filter.active,
.filter:hover {
    background: #0a5dab;
    color: #fff;
}

/* Event Cards */
.event-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}
.event {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.event:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.event img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}
.event .info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.event .category {
    font-size: 0.9rem;
    color: #0a5dab;
    font-weight: bold;
}
.event h3 {
    font-size: 1.1rem;
    margin: 0;
}
.event h3 a {
    color: #222;
    text-decoration: none;
}
.event h3 a:hover {
    color: #0a5dab;
    text-decoration: underline;
}
.event .date,
.event .location,
.event .school {
    font-size: 0.95rem;
    color: #555;
}
.event .school {
    color: #0a5dab;
    font-weight: 500;
}
.countdown {
    font-size: 0.95rem;
    color: #d35400;
    font-weight: bold;
    margin-top: 5px;
}
.actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.likes {
    color: #e74c3c;
    font-weight: 500;
    font-size: 0.97rem;
}
.button-group {
    display: flex;
    gap: 8px;
}
.btn {
    background: #0a5dab;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.97rem;
    transition: background 0.2s;
}
.btn:hover {
    background: #084b8a;
}
.inline-form {
    display: inline;
}
.social-share {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}
.icon-btn {
    background: #f4f4f4;
    color: #0a5dab;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.icon-btn:hover {
    background: #0a5dab;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 900px) {
    .events-section {
        padding: 15px;
    }
    .categories {
        padding: 15px 15px 5px 15px;
    }
    .event-row {
        flex-direction: column;
        gap: 15px;
    }
}
@media (max-width: 600px) {
    .header,
    .categories,
    .events-section,
    .search-filters {
        padding-left: 7px;
        padding-right: 7px;
    }
    .event img {
        height: 120px;
    }
    .tab,
    .category,
    .filter {
        padding: 6px 10px;
        font-size: 0.95rem;
    }
}

/* Dark Mode */
body.dark-mode {
    background: #181c23;
    color: #e3e3e3;
}
body.dark-mode .header,
body.dark-mode .categories,
body.dark-mode .events-section,
body.dark-mode .search-filters,
body.dark-mode .event {
    background: #232733;
    color: #e3e3e3;
}
body.dark-mode .category,
body.dark-mode .tab,
body.dark-mode .filter,
body.dark-mode .icon-btn {
    background: #232733;
    color: #b3d1ff;
}
body.dark-mode .category.active,
body.dark-mode .tab.active,
body.dark-mode .filter.active,
body.dark-mode .icon-btn:hover {
    background: #0a5dab;
    color: #fff;
}
body.dark-mode .btn {
    background: #0a5dab;
    color: #fff;
}
body.dark-mode .btn:hover {
    background: #084b8a;
}
body.dark-mode .countdown {
    color: #ffb347;
}