/* The World of Books - CSS Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation Styles */
.navbar {
    background-color: #2c3e50;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ecf0f1;
    gap: 0.5rem;
}

.nav-logo i {
    color: #e74c3c;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #e74c3c;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e74c3c;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ecf0f1;
    margin: 3px 0;
    transition: 0.3s;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.btn-secondary:hover {
    background-color: #e74c3c;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background-color: #2c3e50;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.stat p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Featured Books Section */
.featured-books {
    padding: 80px 0;
    background-color: white;
}

.featured-books h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.book-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.book-cover {
    text-align: center;
    margin-bottom: 1rem;
}

.placeholder-cover {
    width: 120px;
    height: 180px;
    margin: 0 auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.book-1 { background: linear-gradient(45deg, #ff6b6b, #ee5a24); }
.book-2 { background: linear-gradient(45deg, #4834d4, #686de0); }
.book-3 { background: linear-gradient(45deg, #00d2d3, #54a0ff); }

.book-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.book-info .author {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-style: italic;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.rating i {
    color: #ffd700;
    font-size: 0.9rem;
}

.rating span {
    margin-left: 0.5rem;
    color: #7f8c8d;
    font-weight: 600;
}

.book-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.book-actions .btn {
    flex: 1;
    min-width: 120px;
}

.reviews-actions {
    text-align: center;
    margin-top: 2rem;
}

.reviews-actions .btn {
    margin: 0 0.5rem;
}

/* Star Rating System */
.star-rating {
    display: flex;
    gap: 0.2rem;
    margin: 0.5rem 0;
}

.star-rating i {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating i:hover,
.star-rating i.active {
    color: #ffd700;
}

.star-rating i.fas {
    color: #ffd700;
}

/* Authentication Styles */
.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: 1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-menu {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ecf0f1;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: rgba(236, 240, 241, 0.1);
}

.user-profile i {
    font-size: 1.5rem;
    color: #e74c3c;
}

.username {
    font-weight: 500;
    white-space: nowrap;
}

.auth-modal {
    max-width: 450px;
}

.auth-modal .modal-header {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.auth-modal .modal-header h3 {
    color: white;
    margin: 0;
}

.auth-modal .close {
    color: white;
}

.auth-modal .close:hover {
    color: #ffd700;
}

.btn-full {
    width: 100%;
    margin-bottom: 1rem;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    display: block;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Multi-select styling */
select[multiple] {
    height: auto;
    min-height: 80px;
}

select[multiple] option {
    padding: 0.3rem;
}

select[multiple] option:checked {
    background: #667eea;
    color: white;
}

/* User Status Indicator */
.user-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.user-status.offline {
    background: #95a5a6;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background: #e74c3c;
    width: 33%;
}

.password-strength-bar.medium {
    background: #f39c12;
    width: 66%;
}

.password-strength-bar.strong {
    background: #2ecc71;
    width: 100%;
}

/* Avatar Upload */
.avatar-upload {
    text-align: center;
    margin-bottom: 1rem;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 3px solid #ddd;
    overflow: hidden;
}

.avatar-preview i {
    font-size: 2rem;
    color: #999;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.upload-btn:hover {
    border-color: #e74c3c;
    background: #fff5f5;
}

/* Welcome Message */
.welcome-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.welcome-message h4 {
    margin: 0 0 0.5rem 0;
    color: white;
}

.welcome-message p {
    margin: 0;
    opacity: 0.9;
}

/* Discussions Section */
.discussions {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.discussions h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.discussions-list {
    margin-bottom: 2rem;
}

.discussion-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.discussion-item:hover {
    transform: translateX(5px);
}

.discussion-avatar i {
    font-size: 2.5rem;
    color: #7f8c8d;
}

.discussion-content {
    flex: 1;
}

.discussion-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.discussion-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.discussion-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.discussion-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.discussion-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Reviews Section */
.reviews {
    padding: 80px 0;
    background-color: white;
}

.reviews h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #e74c3c;
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-3px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.reviewer-info i {
    font-size: 1.5rem;
    color: #7f8c8d;
}

.review-rating i {
    color: #ffd700;
    font-size: 0.9rem;
}

.review-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.review-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-style: italic;
}

.review-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Community Section */
.community {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.community h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature p {
    color: #666;
    line-height: 1.5;
}

.newsletter-signup {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.newsletter-signup h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.newsletter-signup p {
    color: #666;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.footer-logo i {
    color: #e74c3c;
    font-size: 1.8rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #e74c3c;
}

.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: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ecf0f1;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
        margin-left: 0;
        width: 100%;
    }

    .auth-buttons .btn {
        width: 200px;
        max-width: 90%;
    }

    .user-menu {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .user-profile {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .discussion-item {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .community-features {
        grid-template-columns: 1fr;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card,
.discussion-item,
.review-card,
.feature {
    animation: fadeInUp 0.6s ease forwards;
}

/* Discussions Page Styles */
.discussions-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 80px;
}

.discussions-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.discussions-header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.discussion-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.search-box input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.discussion-categories {
    padding: 60px 0;
    background: white;
}

.discussion-categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover,
.category-card.active {
    border-color: #e74c3c;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.1);
    transform: translateY(-3px);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-icon i {
    font-size: 1.5rem;
    color: white;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.category-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.active-discussions {
    padding: 60px 0;
    background: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0;
}

.sort-options select {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.sort-options select:focus {
    outline: none;
    border-color: #e74c3c;
}

.discussion-item.featured {
    position: relative;
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, #fff9e6, #ffffff);
}

.discussion-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #ffd700;
    color: #2c3e50;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.discussion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.discussion-stats .clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.discussion-stats .clickable:hover {
    transform: scale(1.1);
}

.load-more {
    text-align: center;
    margin-top: 2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Design for Discussions */
@media screen and (max-width: 768px) {
    .discussions-header h1 {
        font-size: 2rem;
    }
    
    .discussion-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }