/* فونت و ریست عمومی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;700;900&display=swap');

:root {
    --primary-color: #00ff88; /* رنگ اصلی: سبز نئونی */
    --secondary-color: #333;
    --text-color: #f0f0f0;
    --background-color: #121212; /* پس‌زمینه دارک */
    --card-bg: #1e1e1e;
    --footer-bg: #0d0d0d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

.highlight {
    color: var(--primary-color);
}

/* ==================
   هدر و ناوبری
   ================== */

header {
    background-color: var(--background-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-right: 30px;
}

.nav-links a {
    font-weight: 400;
    padding: 5px 0;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.admin-link {
    color: var(--primary-color);
    font-weight: 700;
}

.admin-link:after {
    background: var(--text-color);
}

/* منوی همبرگری (مخفی در دسکتاپ) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ==================
   بخش Hero
   ================== */

.hero {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.9)), 
                url('background.jpg') center center/cover; /* تصویر پس‌زمینه خود را اینجا قرار دهید */
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #ccc;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #00e673; /* کمی تیره‌تر */
    transform: translateY(-2px);
}


/* ==================
   بخش‌های عمومی
   ================== */

.section {
    padding: 80px 0;
}

.dark-bg {
    background-color: var(--card-bg);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: var(--text-color);
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    border-radius: 2px;
}

/* ==================
   بخش اخبار (News)
   ================== */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
}

.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.news-content p {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 15px;
}

.news-date {
    display: block;
    font-size: 0.8rem;
    color: #777;
    text-align: left;
}

/* ==================
   بخش تریلرها (Trailers)
   ================== */

.trailer-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.trailer-card {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.trailer-video {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
}

.trailer-video iframe, .trailer-video video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.trailer-card h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.trailer-card p {
    color: #aaa;
    font-size: 0.9rem;
}

/* ==================
   بخش پروژه‌ها (Projects)
   ================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-right: 5px solid var(--primary-color);
}

.project-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-card p {
    color: #ccc;
    margin-bottom: 20px;
}

.status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.coming-soon {
    background-color: #ffcc00;
    color: #333;
}

.in-progress {
    background-color: #007bff;
    color: white;
}

.completed {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* ==================
   بخش تبلیغات (Ads)
   ================== */

.ad-banner {
    width: 100%;
    margin: 40px 0;
    text-align: center;
    background-color: var(--card-bg);
    padding: 10px;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

/* ==================
   فوتر
   ================== */

footer {
    background-color: var(--footer-bg);
    color: #888;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--secondary-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #888;
}

.social-links a:hover {
    color: var(--primary-color);
}


/* ==================
   صفحه جزئیات خبر (news-detail.html)
   ================== */

.news-detail-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.news-detail-container h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: right;
}

.detail-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.news-detail-container p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 40px;
    text-align: justify;
}

/* بخش نظرات */
.comments-section {
    padding-top: 30px;
    border-top: 1px solid var(--secondary-color);
}

.comments-section h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.comment-form input[type="text"], .comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    resize: vertical;
}

.comment-form .btn {
    width: 100%;
    padding: 15px;
}

.comment-list {
    margin-top: 20px;
}

.comment-item {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-right: 4px solid var(--primary-color);
}

.comment-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.comment-text {
    color: #ccc;
    margin-bottom: 5px;
}

.comment-date {
    display: block;
    text-align: left;
    font-size: 0.8rem;
    color: #777;
}

.no-comments {
    text-align: center;
    color: #777;
    padding: 20px;
    border: 1px dashed #333;
    border-radius: 5px;
}

/* ==================
   پنل مدیریت (admin.html)
   ================== */

.login-gate, .admin-container {
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 85vh;
}

.login-gate {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.admin-hidden {
    display: none !important;
}

/* تب‌ها */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--secondary-color);
}

.admin-tabs button {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
    border-bottom: 2px solid transparent;
    margin-left: 10px;
}

.admin-tabs button:hover {
    color: var(--primary-color);
}

.admin-tabs button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

.admin-tab-content {
    display: none;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.admin-tab-content.active {
    display: block;
}

.admin-section {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 5px;
}

.admin-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px dashed #333;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: 700;
}

.form-group input[type="text"], 
.form-group input[type="url"],
.form-group input[type="file"], 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
}

/* لیست آیتم‌های مدیریتی */
.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-item span {
    color: #ccc;
}

.delete-btn, .approve-btn, .logout-btn {
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin-right: 5px;
    font-weight: 700;
}

.delete-btn {
    background-color: #ff4444;
    color: white;
}

.approve-btn {
    background-color: #007bff;
    color: white;
}

.logout-btn {
    background-color: #ffcc00;
    color: #121212;
    float: left;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* استایل کامنت‌های مدیریت */
.admin-comment-item {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-right: 4px solid;
}

.admin-comment-item.pending {
    background-color: #2a2a2a;
    border-color: #ffcc00;
}

.admin-comment-item.approved {
    background-color: #1a1a1a;
    border-color: var(--primary-color);
}

.admin-comment-item p {
    margin-bottom: 10px;
    color: #ccc;
}

/* ==================
   ریسپانسیو (Responsive)
   ================== */

@media (max-width: 768px) {
    header .container {
        padding: 10px 20px;
    }
    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        background-color: var(--footer-bg);
        height: 100vh;
        width: 60%;
        display: flex;
        flex-direction: column;
        padding: 30px;
        transition: right 0.5s ease-in-out;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }

    footer .container {
        flex-direction: column;
    }

    footer p {
        margin-bottom: 15px;
    }

    .news-detail-container {
        margin: 40px auto;
    }

    .detail-image {
        height: 250px;
    }
}