* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

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

/* Header & Navigation */
header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #3498db;
}

.navbar {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #2980b9;
}

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

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    position: relative;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Auth Buttons */
#auth-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login, .btn-signup {
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    border: 2px solid white;
}

.btn-login:hover {
    background: white;
    color: #2c3e50;
    opacity: 1;
}

.btn-signup {
    background: #3498db;
    border: 2px solid #3498db;
}

.btn-signup:hover {
    background: #2980b9;
    border-color: #2980b9;
    opacity: 1;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-info .user-welcome {
    color: white;
    font-size: 14px;
}

#user-info .btn-logout {
    padding: 6px 16px;
    background: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Categories Section */
.categories {
    background: white;
    padding: 40px 20px;
}

.categories h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #2c3e50;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.category-btn:hover, .category-btn.active {
    background: #667eea;
    color: white;
}

/* Blog Section */
.blog-section {
    padding: 60px 20px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.post-card-category {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 20px 20px 10px 20px;
    border-radius: 20px;
}

.post-card h3 {
    padding: 0 20px;
    margin-bottom: 15px;
    font-size: 22px;
    line-height: 1.3;
}

.post-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.post-card h3 a:hover {
    color: #667eea;
}

.post-card p {
    padding: 0 20px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    padding: 10px 20px 20px 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Post Detail Page */
.post-detail {
    padding: 60px 20px;
}

.post-content {
    background: white;
    border-radius: 12px;
    padding: 60px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.post-content h1 {
    font-size: 42px;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-meta {
    color: #666;
    font-size: 15px;
}

.post-meta span {
    margin: 0 8px;
}

.post-body {
    margin-top: 40px;
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.post-body p {
    margin-bottom: 20px;
}

/* Related Posts */
.related-posts {
    padding: 60px 20px;
    background: white;
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #2c3e50;
}

/* About Section */
.about-section {
    background: white;
    padding: 60px 20px;
    margin: 40px 0;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 36px;
    color: #2c3e50;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    text-align: center;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 20px;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
    font-size: 14px;
}

/* Legal Pages */
.legal-page {
    padding: 60px 20px;
    background: white;
    margin: 40px 0;
}

.legal-page h1 {
    font-size: 42px;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 40px;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 28px;
    color: #2c3e50;
    margin: 40px 0 20px;
}

.legal-content h3 {
    font-size: 22px;
    color: #34495e;
    margin: 30px 0 15px;
}

.legal-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.legal-content ul {
    margin: 20px 0 20px 40px;
    line-height: 1.8;
}

.legal-content ul li {
    margin-bottom: 10px;
    color: #555;
}

.legal-content a {
    color: #667eea;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* About Page Specific Styles */
.about-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.about-hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
}

.about-content {
    background: white;
    padding: 60px 20px;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 32px;
    color: #2c3e50;
    margin: 40px 0 20px;
}

.about-text h3 {
    font-size: 24px;
    color: #34495e;
    margin: 30px 0 15px;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-item p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.principles-list {
    margin: 20px 0 20px 20px;
}

.principles-list li {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-top: 60px;
}

.cta-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* Contact Page */
.contact-page {
    padding: 60px 20px;
}

.contact-page h1 {
    font-size: 42px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
}

.page-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto 60px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.contact-form-section h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-form button:hover {
    background: #5568d3;
}

.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-info-section h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.contact-info-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.contact-info-item h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-info-item p {
    color: #666;
    line-height: 1.6;
}

.contact-info-item a {
    color: #667eea;
    text-decoration: none;
}

.contact-info-item a:hover {
    text-decoration: underline;
}

.response-time {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.response-time h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.response-time p {
    color: #666;
    line-height: 1.6;
}

.faq-section {
    max-width: 900px;
    margin: 80px auto 0;
}

.faq-section h2 {
    font-size: 32px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
}

.faq-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.faq-item h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.faq-item p {
    color: #666;
    line-height: 1.7;
}

/* Error Page (404) */
.error-page {
    padding: 100px 20px;
    text-align: center;
    min-height: 60vh;
}

.error-content {
    max-width: 700px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
    line-height: 1;
}

.error-page h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.error-suggestions {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: left;
}

.error-suggestions h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.error-suggestions ul {
    list-style: none;
    padding-left: 0;
}

.error-suggestions li {
    padding: 10px 0;
    color: #555;
    border-bottom: 1px solid #e1e8ed;
}

.error-suggestions li:last-child {
    border-bottom: none;
}

.error-suggestions a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.error-suggestions a:hover {
    text-decoration: underline;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination button {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button:hover, .pagination button.active {
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.error {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1, .about-hero h1, .contact-page h1, .legal-page h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .nav-menu {
        gap: 15px;
        font-size: 14px;
    }

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

    .post-content {
        padding: 30px 20px;
    }

    .post-content h1 {
        font-size: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    .error-code {
        font-size: 80px;
    }

    .error-page h2 {
        font-size: 24px;
    }

    .legal-content h2 {
        font-size: 24px;
    }

    .legal-content h3 {
        font-size: 20px;
    }
}
