/* ============================================
   پرشین نیوز وان - استایل اصلی
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

:root {
    --bg: #0a0a2e;
    --surface: rgba(26, 26, 78, 0.8);
    --neon-blue: #00d4ff;
    --neon-purple: #b44dff;
    --neon-pink: #ff2d95;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* هدر */
.header {
    background: rgba(10, 10, 46, 0.9);
    backdrop-filter: blur(20px);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(45deg, #00ffc8, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--neon-blue); }

/* خبر فوری */
.breaking-news {
    background: linear-gradient(90deg, #ff0000, var(--neon-pink));
    padding: 14px 20px;
    display: none;
    align-items: center;
    gap: 15px;
    animation: pulse 1.5s infinite;
    position: relative;
    z-index: 1000;
}

.breaking-news.active { display: flex; }

.breaking-badge {
    background: white;
    color: red;
    padding: 5px 18px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

.breaking-text { font-weight: 700; font-size: 14px; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* دسته‌بندی */
.categories {
    background: rgba(21, 21, 64, 0.9);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    margin: 25px 0;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 212, 255, 0.15);
    position: sticky;
    top: 80px;
    z-index: 99;
}

.categories .container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cat-btn {
    padding: 10px 24px;
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: var(--text);
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
}

.cat-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.cat-btn.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border-color: transparent;
}

/* کارت اخبار */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.news-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeUp 0.6s ease-out;
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
}

.news-image-wrapper {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-image-wrapper img { transform: scale(1.1); }

.breaking-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(45deg, #ff0000, var(--neon-pink));
    color: white;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.5);
}

.news-content { padding: 20px; }

.news-category {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.news-title {
    font-size: 19px;
    font-weight: 900;
    margin: 10px 0;
    line-height: 1.5;
    color: var(--text);
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin: 10px 0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* لودر */
.loader {
    display: none;
    text-align: center;
    padding: 50px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid transparent;
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* دکمه بارگذاری */
.load-more {
    display: block;
    margin: 40px auto;
    padding: 14px 45px;
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    border-radius: 30px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more:hover {
    background: var(--neon-blue);
    color: var(--bg);
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.5);
}

/* فوتر */
.footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .logo { font-size: 20px; }
    .header .container { flex-direction: column; }
    .categories { top: 0; position: relative; }
}