body {
    font-family: 'Georgia', serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Hero Section */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23667eea" width="1200" height="600"/><g fill="white" opacity="0.1"><circle cx="200" cy="150" r="80"/><polygon points="400,100 500,300 300,300"/><rect x="700" y="200" width="150" height="150" transform="rotate(45 775 275)"/><circle cx="1000" cy="400" r="60"/><path d="M100,500 Q200,400 300,500 T500,500"/></g><text x="600" y="200" font-family="serif" font-size="120" fill="white" opacity="0.3" text-anchor="middle">π</text><text x="300" y="400" font-family="serif" font-size="80" fill="white" opacity="0.2" text-anchor="middle">∑</text><text x="900" y="150" font-family="serif" font-size="100" fill="white" opacity="0.2" text-anchor="middle">∞</text></svg>') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    padding: 0 2rem;
}

.hero-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.logo-image {
    height: 120px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes logo white if it's dark */
}

.hero-text {
    text-align: center;
}

.hero-text h1 {
    font-size: 4em;
    margin-bottom: 0.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-text p {
    font-size: 1.5em;
    margin: 0 0 1.5em 0;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-search-btn {
    display: inline-block;
    padding: 0.8em 1.5em;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Search Form Section */
.search-form-section {
    padding: 3em 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-input-group {
    display: flex;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-input-group input[type="text"] {
    flex: 1;
    padding: 1em 1.5em;
    border: none;
    font-size: 1.1em;
    outline: none;
    background: white;
}

.search-input-group input[type="text"]::placeholder {
    color: #6c757d;
}

.search-btn {
    padding: 1em 2.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.search-btn::after {
    content: '🔍';
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-btn:hover::after {
    transform: scale(1.1);
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.search-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Search Results */
.search-info {
    text-align: center;
    margin-bottom: 2em;
}

.search-info h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 0.5em;
}

.topic-highlight, .search-highlight {
    color: #3498db;
    font-weight: bold;
}

.search-results {
    margin-top: 2em;
}

.no-results {
    text-align: center;
    padding: 3em 1em;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-top: 2em;
}

.no-results p {
    font-size: 1.2em;
    color: #6c757d;
    margin-bottom: 1em;
}

.topics-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 2em;
    color: #2c3e50;
}

.topic-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    margin-bottom: 2em;
}

.topic-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2em;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.topic-card h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.topic-card p {
    margin: 0;
    opacity: 0.9;
}

/* Recent Posts Section */
.recent-posts {
    padding: 4em 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.recent-posts h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 2em;
    color: #2c3e50;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

.post-card {
    background: white;
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #3498db;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-card h3 {
    margin-top: 0;
    margin-bottom: 1em;
    color: #2c3e50;
}

.post-card h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.post-card h3 a:hover {
    color: #3498db;
}

.topic-tag {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.post-date {
    color: #7f8c8d;
    font-style: italic;
    margin: 0;
}

/* Search Page Styles */
.search-header {
    background-color: #2c3e50;
    color: white;
    padding: 2em 0;
    text-align: center;
}

.search-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.search-header .logo-image {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-text {
    text-align: left;
}

.header-text h1 a {
    color: white;
    text-decoration: none;
}

.search-main {
    padding: 3em 0;
}

.search-info {
    text-align: center;
    margin-bottom: 3em;
}

.topic-highlight {
    color: #e74c3c;
    font-weight: bold;
}

.search-highlight {
    color: #3498db;
    font-weight: bold;
}

.no-results {
    text-align: center;
    padding: 3em;
}

.back-link {
    display: inline-block;
    margin-top: 1em;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

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

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2em 0;
}

footer p {
    margin: 0.5em 0;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Login Page Footer */
.login-page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(44, 62, 80, 0.9);
    color: white;
    text-align: center;
    padding: 1em;
    font-size: 0.9em;
}

.login-page-footer a {
    color: #3498db;
    text-decoration: none;
}

.login-page-footer a:hover {
    text-decoration: underline;
}

/* Original styles for other pages */
header {
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    text-align: center;
    padding: 2em 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: bold;
}

header p {
    margin: 0.5em 0 0 0;
    font-style: italic;
    color: #7f8c8d;
}

main {
    max-width: 900px;
    margin: 2em auto;
    padding: 2em;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

article {
    margin-bottom: 2em;
    padding-bottom: 2em;
    border-bottom: 1px solid #ecf0f1;
    transition: transform 0.2s;
}

article:hover {
    transform: translateY(-2px);
}

article h3 {
    margin-top: 0;
    color: #3498db;
}

article h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

article h3 a:hover {
    color: #2980b9;
}

.topic {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1em;
    color: #34495e;
}

.post-content h2, .post-content h3, .post-content h4 {
    color: #2c3e50;
    margin-top: 1.5em;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content ul, .post-content ol {
    margin-left: 2em;
}

form {
    margin-bottom: 2em;
    background-color: #f8f9fa;
    padding: 2em;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #495057;
}

input[type="text"], textarea {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 1em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[type="submit"] {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    margin-bottom: 1em;
    padding: 1em;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
    transition: background-color 0.3s;
}

ul li:hover {
    background-color: #e9ecef;
}

ul li a {
    margin-left: 1em;
    text-decoration: none;
    color: #e74c3c;
    font-weight: bold;
}

ul li a:hover {
    text-decoration: underline;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 3em;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h1 {
    color: #2c3e50;
    margin-bottom: 0.5em;
    font-size: 2em;
}

.login-form p {
    color: #7f8c8d;
    margin-bottom: 2em;
}

.form-group {
    margin-bottom: 1.5em;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.login-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 0.75em 2em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
    border: 1px solid #f5c6cb;
}

.login-footer {
    margin-top: 2em;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
}

.admin-nav span {
    color: #7f8c8d;
    font-style: italic;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    padding: 0.5em 1em;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Success and Error Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
    border: 1px solid #f5c6cb;
}

.back-link {
    margin-top: 2em;
    text-align: center;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero-logo {
        position: static;
        margin-bottom: 1rem;
    }

    .hero-logo .logo-image {
        height: 90px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5em;
    }

    .hero-text p {
        font-size: 1.2em;
    }

    .topics-section, .recent-posts {
        padding: 2em 0;
    }

    .topic-cards, .posts-grid {
        grid-template-columns: 1fr;
    }

    main {
        margin: 1em;
        padding: 1em;
    }

    header h1 {
        font-size: 2em;
    }

    form {
        padding: 1em;
    }

    /* Mobile search form */
    .search-input-group {
        flex-direction: column;
        border-radius: 10px;
    }

    .search-input-group input[type="text"] {
        border-radius: 10px 10px 0 0;
    }

    .search-btn {
        border-radius: 0 0 10px 10px;
    }
}