/* Enhanced CSS for Dimensional Relativity Website */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* HEADER STYLES */
.main-header {
    background: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo-section h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.logo-section .icon {
    margin-right: 0.5rem;
}

.main-navigation {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* AUTH SECTION STYLES */
.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.author-menu {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.author-link,
.admin-link {
    background: rgba(255, 255, 255, 0.1) !important;
    font-size: 0.9rem !important;
}

.author-link:hover,
.admin-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--light-bg);
}

.dropdown-item.logout:hover {
    background: #f8d7da;
    color: #721c24;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}

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

.btn-login:hover {
    background: white;
    color: var(--dark-bg);
}

.btn-register {
    background: var(--secondary-color);
    color: white;
}

.btn-register:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-profile {
    background: transparent;
    color: white;
    border: 1px solid #bdc3c7;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.btn-profile:hover {
    background: #bdc3c7;
    color: var(--dark-bg);
}

.btn-logout {
    background: var(--accent-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

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

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.metric-display {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
    border-left: 4px solid var(--secondary-color);
}

.metric-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.equation {
    font-size: 1.5rem;
    font-family: 'Times New Roman', serif;
    color: var(--dark-bg);
    font-weight: bold;
    letter-spacing: 1px;
}

.cta-section {
    margin-top: 3rem;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ABOUT SECTION */
.about-section {
    padding: 4rem 0;
    background: white;
}

.about-section h2 {
    font-size: 2.2rem;
    color: var(--dark-bg);
    margin-bottom: 2rem;
    text-align: center;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* CHAPTERS SECTION */
.chapters-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.chapters-section h2 {
    font-size: 2.2rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    text-align: center;
}

.book-subtitle {
    font-size: 1.2rem;
    color: var(--light-text);
    text-align: center;
    margin-bottom: 3rem;
    font-style: italic;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.chapter-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.chapter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.chapter-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.chapter-number {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-size: 1.1rem;
    color: var(--dark-bg);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.chapter-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--light-text);
    transition: var(--transition);
}

.chapter-link:hover .chapter-icon {
    color: var(--secondary-color);
    transform: translateX(3px);
}

/* BLOG PREVIEW SECTION */
.blog-preview-section {
    padding: 4rem 0;
    background: white;
}

.blog-preview-section h2 {
    font-size: 2.2rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    text-align: center;
}

.blog-preview-section > .container > p {
    text-align: center;
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.blog-card h3 {
    font-size: 1.3rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.blog-meta .date {
    color: var(--light-text);
}

.blog-meta .category {
    color: var(--secondary-color);
    font-weight: 500;
}

.blog-cta {
    text-align: center;
}

/* COMMUNITY SECTION */
.community-section {
    padding: 4rem 0;
    background: var(--dark-bg);
    color: white;
}

.community-section h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature p {
    color: #bdc3c7;
}

.community-cta {
    text-align: center;
}

.community-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #bdc3c7;
}

/* CONTACT SECTION */
.contact-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.contact-section h2 {
    font-size: 2.2rem;
    color: var(--dark-bg);
    margin-bottom: 3rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--light-text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
}

.contact-method i {
    color: var(--secondary-color);
    width: 20px;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 1.5rem;
    color: var(--dark-bg);
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* FOOTER */
.main-footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

.footer-bottom a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navigation {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .auth-section {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .community-features {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 10px;
    }
    
    .metric-display {
        padding: 1rem;
    }
    
    .equation {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* UTILITY CLASSES */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ANIMATION CLASSES */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}