/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #3498db;
}

.nav-links a#logout-btn {
    color: #e74c3c;
    background-color: transparent;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a#logout-btn:hover {
    background-color: #e74c3c;
    color: white;
}

/* Main content */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Journals section */
.journals-section h2,
.articles-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.journals-grid,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.journal-card,
.article-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.journal-card:hover,
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.journal-card h4,
.article-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.journal-card .journal-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.journal-card .journal-content {
    color: #555;
    line-height: 1.5;
}

/* Article specific styles */
.article-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-journal {
    background-color: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-content {
    color: #555;
    line-height: 1.5;
}

/* Controls for search and filter */
.controls-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-container {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-container .btn-secondary {
    border-radius: 0 4px 4px 0;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-container label {
    font-weight: 500;
    color: #2c3e50;
}

.filter-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

/* Loading and error states */
.loading-indicator {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    background: #fadbd8;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-date {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1rem;
}

.modal-description,
.modal-article-content {
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* Admin Dashboard */
.admin-dashboard h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.admin-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-container,
.management-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-container h3,
.management-container h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

.journals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journal-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.journal-item-content {
    flex: 1;
}

.journal-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

/* Admin-specific styles */
.tab-navigation {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #2c3e50;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.bulk-actions input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.item-checkbox {
    width: auto;
    margin-right: 1rem;
}

.journal-item,
.article-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.journal-item:hover,
.article-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.journal-item-content,
.article-item-content {
    flex: 1;
}

.journal-description,
.article-content-preview {
    color: #555;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.journal-date,
.article-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.article-author {
    color: #3498db;
    font-weight: 500;
    margin: 0.5rem 0;
}

.journal-item-actions,
.article-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-delete:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Editor Board Styles */
.editor-board-section {
    padding: 2rem 0;
}

.editor-board-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.editor-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.editor-board-member-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.editor-board-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.member-info {
    margin-bottom: 1.5rem;
}

.member-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.member-university {
    font-size: 1.1rem;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 1rem;
}

.member-position {
    font-size: 1rem;
    color: #e67e22;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.member-bio {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.member-actions {
    display: flex;
    justify-content: center;
}

.btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-resume:hover {
    background-color: #229954;
}

.pdf-icon {
    font-size: 1.1rem;
}

/* Admin Editor Board Styles */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.member-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.member-item-content {
    flex: 1;
}

.member-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.member-position {
    color: #e67e22;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.member-university {
    color: #3498db;
    font-weight: 500;
    margin: 0.5rem 0;
}

.member-bio-preview {
    color: #555;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.member-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.resume-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #e8f5e8;
    color: #27ae60;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.member-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Enhanced 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);
    overflow: auto;
}

.modal:not(.hidden) {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    position: relative;
    animation: modalFadeIn 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-date {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1rem;
}

.modal-description,
.modal-article-content {
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* Enhanced Admin Form Styles */
.form-container h3,
.management-container h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section {
    text-align: left;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section strong {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        margin-left: 0;
    }
    
    .nav-links li {
        margin: 0 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .admin-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Admin panel responsive styles */
    .tab-navigation {
        flex-direction: column;
        border-bottom: none;
        gap: 0.5rem;
    }
    
    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
        padding: 0.75rem 1rem;
    }
    
    .tab-btn.active {
        border-left-color: #3498db;
        background-color: #f8f9fa;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .journal-item,
    .article-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .journal-item-actions,
    .article-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* New responsive styles for journals and articles */
    .controls-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .journals-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .pagination-container {
        flex-wrap: wrap;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .journals-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .btn-secondary {
        border-radius: 4px;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-dashboard h2 {
        font-size: 1.75rem;
    }
    
    .form-container h3,
    .management-container h3 {
        font-size: 1.25rem;
    }
    
    .journal-item,
    .article-item {
        padding: 0.75rem;
    }
    
    .btn-edit,
    .btn-delete {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Editor Board responsive styles */
    .editor-board-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .editor-board-member-card {
        padding: 1.5rem;
    }
    
    .member-name {
        font-size: 1.3rem;
    }
    
    .member-university {
        font-size: 1rem;
    }
    
    .member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .member-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .btn-resume {
        width: 100%;
        justify-content: center;
    }
}