

/* CSS Variables for Theme */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main content with fixed header */
main.container {
    padding-top: 160px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.header-time {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 1rem;
    color: white;
}

.solar-time {
    font-size: 1rem;
    font-weight: 500;
    color: white;
}

.lunar-time {
    font-size: 0.85rem;
    opacity: 0.9;
    color: white;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search Section */
.search-section {
    background-color: white;
    padding: 1.2rem 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 998;
}

.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    width: 100%;
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.search-suggestions {
    position: absolute;
    width: 100%;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.category-btn.active, .category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Cards Grid */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 15px;
    object-fit: cover;
    background-color: #f8f9fa;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    background-color: #f1f3f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.card-description {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    justify-content: space-between;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.btn-favorite {
    background-color: transparent;
    color: #adb5bd;
    font-size: 1.2rem;
    padding: 5px 10px;
}

.btn-favorite.active {
    color: var(--danger-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark-bg);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: white;
    text-decoration: none;
}

.icp-info {
    margin-top: 0.5rem;
}

.icp-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp-info a:hover {
    color: #4a6cf7;
    text-decoration: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .header-time {
        display: none;
    }

    .category-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .category-nav::-webkit-scrollbar {
        height: 5px;
    }

    .category-nav::-webkit-scrollbar-thumb {
        background-color: #adb5bd;
        border-radius: 10px;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }
}
.admin-link {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
}

.admin-link:hover {
    text-decoration: underline;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-header {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: white;
    font-weight: 500;
}

/* Modal Styles */
.auth-modal,
.message-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: #333;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #6c757d;
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* Form Styles */
.auth-form,
.message-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* Message Board Styles */
.message-modal .modal-content {
    max-width: 600px;
}

.message-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.message-item {
    padding: 12px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #6c757d;
}

.message-content {
    color: #333;
    line-height: 1.5;
}

.message-list::-webkit-scrollbar {
    width: 6px;
}

.message-list::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 3px;
}

.message-list::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}
}
