/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body.dark-theme {
    --text-color: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-color: #111827;
    --bg-secondary: #1f2937;
    --border-color: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* Navigation */
.navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: yellow;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--border-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: rgb(93, 141, 246);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 0.5rem;
}

.hero-search input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.hero-search button {
    padding: 1rem 2rem;
    background: rgb(255, 201, 107);
    color: whitesmoke;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Introduction Section */
.intro-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.intro-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-color);
}

.intro-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

.intro-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Ad Container */
.ad-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-color);
}

.section-controls {
    display: flex;
    gap: 1rem;
}

.section-controls input,
.section-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-color);
    color: var(--text-color);
}

.refresh-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.refresh-btn:hover {
    background: var(--secondary-color);
}

/* Category Chips */
.category-chips {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-chip {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.category-chip:hover,
.category-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.news-info {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.buy-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.buy-btn:hover {
    background: var(--secondary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 2rem;
    padding: 0;
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.video-modal-content {
    max-width: 1100px;
}

.comment-modal-content {
    max-width: 600px;
}

.modal-close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 2rem;
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: #000;
    border-radius: var(--radius);
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.video-description {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.video-description h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.video-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-line;
}

/* Comments */
.comment-form {
    margin-bottom: 2rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.comment-form button:hover {
    background: var(--secondary-color);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.comment-text {
    color: var(--text-color);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* News Modal Content */
#modalNewsImage img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.news-content {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1.5rem 0;
}

.read-more-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.read-more-link:hover {
    background: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Legal Pages */
.legal-page {
    min-height: 100vh;
    padding: 2rem 0;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-color);
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.legal-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.legal-content h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.legal-content p,
.legal-content li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-search {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-controls {
        width: 100%;
        flex-direction: column;
    }

    .section-controls input,
    .section-controls select {
        width: 100%;
    }

    .video-grid,
    .news-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .intro-content h2,
    .section-header h2 {
        font-size: 1.5rem;
    }

    .video-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}
