/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation styles */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #3498db;
}

.nav-search {
    display: flex;
}

.nav-search input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

.nav-search button {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.nav-user {
    position: relative;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

/* Dropdown styles */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #ecf0f1;
}

.hidden {
    display: none !important;
}

/* Main content */
#main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.page {
    padding: 1rem 0;
}

/* Stats section */
.stats-section {
    margin-top: 2rem;
}

.stats-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters input, .filters select, .filters button {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filters button {
    background-color: #3498db;
    color: white;
    cursor: pointer;
}

/* List items */
.list-item {
    background-color: white;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.list-item h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.list-item p {
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

/* Article content */
#article-content {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.captcha-container img {
    height: 40px;
}

.captcha-container button {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Search results */
#search-results-list .list-item {
    cursor: default;
}

#search-results-list .list-item h3 {
    cursor: pointer;
}

/* Highlighted content */
mark {
    background-color: #f1c40f;
    padding: 0.1rem 0.2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        margin: 0;
    }
    
    .nav-item {
        margin: 0 0.5rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }
}