/* ========================================== */
/* التصميم الأساسي - أبيض ناصع تماماً */
/* ========================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-appbar: #ffffff;
    --bg-bottom: #ffffff;
    --bg-comment: #f5f5f5;
    --text-primary: #1a1a2e;
    --text-secondary: #444;
    --text-muted: #999;
    --border-color: #e8e5e0;
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 0px 10px rgba(0,0,0,0.1);
    --shadow-bottom: 0 -4px 20px rgba(0,0,0,0.05);
    --accent: #2d2d2d;
    --accent-light: #ff6b5a;
    --accent-gold: #f39c12;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bottom-height: 70px;
    --highlight-bg: #fff3cd;
    --highlight-color: #856404;
    --max-width: 1100px;
    --related-colors: #e74c3c, #3498db, #2ecc71, #f39c12, #9b59b6, #1abc9c, #e67e22, #e91e63, #00bcd4, #4caf50, #ff5722, #795548;
}

[data-theme="dark"] {
    --bg-primary: #151515;
    --bg-secondary: #212121;
    --bg-card: #1a1a2e;
    --bg-appbar: #151515;
    --bg-bottom: #151515;
    --bg-comment: #1a1a2e;
    --text-primary: #f0f0f0;
    --text-secondary: #aaa;
    --text-muted: #666;
    --border-color: #413c38;
    --shadow: 0 2px 16px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.5);
    --shadow-bottom: 0 -4px 20px rgba(0,0,0,0.3);
    --highlight-bg: #2a1f00;
    --highlight-color: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

body {
    font-family: 'Cairo', 'Noto Sans Arabic', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    padding-bottom: calc(var(--bottom-height) + 30px);
    overflow-x: hidden;
    direction: rtl;
    line-height: 1.7;
}

/* ========================================== */
/* إصلاح خلفية شريط النظام للموبايل فقط */
/* ========================================== */


/* ========================================== */
/* تنسيق سطح المكتب - عرض واسع */
/* ========================================== */
@media (min-width: 1024px) {
    body {
        max-width: var(--max-width);
        margin: 0 auto;
        box-shadow: 0 0 40px rgb(0 0 0 / 86%);
        border-left: 0px solid var(--border-color);
        border-right: 0px solid var(--border-color);
    }
    .hero-image {
        height: 420px !important;
    }
    .hero-image .title-overlay h1 {
        font-size: 30px !important;
    }
    .article-body {
        font-size: 19px !important;
        padding: 0 5px;
    }
    .article-stats {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
    .mid-suggest-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }
    .mid-suggest-card img {
        height: 130px !important;
    }
    .share-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .comments-section {
        padding: 0px 8px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body {
        max-width: 700px;
        margin: 0 auto;
    }
    .hero-image {
        height: 380px !important;
    }
    .hero-image .title-overlay h1 {
        font-size: 28px !important;
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .mid-suggest-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========================================== */
/* هات لايت للنصوص المحددة */
/* ========================================== */
.highlight {
    background: var(--highlight-bg);
    color: var(--highlight-color);
    padding: 2px 6px;
    font-weight: 600;
}

/* ========================================== */
/* Banner متابعة - قابل للإغلاق */
/* ========================================== */
.follow-banner {
    background: #efefef;
    border-bottom: 0px solid #e8e5e0;
    padding: 0px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.follow-banner .close-btn {
    position: absolute;
    top: 4px;
    left: 200px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

/* للموبايل فقط */
@media (max-width: 768px) {
    .follow-banner .close-btn {
        left: 30px;
    }
}
.follow-banner .close-btn:active { transform: scale(0.9); }
.follow-banner .banner-text {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.follow-banner .banner-text i { color: #e84c3d; }
.follow-banner .banner-buttons {
    display: flex;
    gap: 1px;
    flex-wrap: wrap;
    color: #fff;
}
.follow-banner .banner-btn {
    padding: 5px 17px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}
.follow-banner .banner-btn:active { transform: scale(0.95); }
.follow-banner .btn-telegram {
    background: #0088cc;
    color: #fff;
}
.follow-banner .btn-whatsapp {
    background: #25D366;
    color: #fff;
}
.follow-banner .btn-telegram:hover { background: #0077b3; }
.follow-banner .btn-whatsapp:hover { background: #20b859; }
[data-theme="dark"] .follow-banner {
    background: #151515;
    border-color: #413c38;
}
[data-theme="dark"] .follow-banner .banner-text { color: #f0f0f0; }
[data-theme="dark"] .follow-banner .close-btn { color: #666; }

/* ========================================== */
/* رأس التطبيق */
/* ========================================== */
.app-bar {
    background: #dce2e7;
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #2d2d2d;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.app-bar .back-btn {
    background: none;
    border: none;
    color: #2b2a2a;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
}
.app-bar .back-btn:active { transform: scale(0.9); }
.app-bar .logo-link {
    text-decoration: none;
    font-size: 31px;
    font-weight: 900;
    display: inline-block;
    width: 180px;
    height: 50px;
    background: url('https://i.ibb.co/mVshGB83/afaq-arabia-logov70v3.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
}
.app-bar .actions {
    display: flex;
    gap: 16px;
    align-items: center;
}
.app-bar .actions i {
    font-size: 20px;
    color: #2b2a2a;
    transition: var(--transition);
    cursor: pointer;
}
.app-bar .actions i:active { transform: scale(0.9); }
.app-bar .actions .theme-toggle {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
}
.app-bar .actions .theme-toggle:active { transform: scale(0.9); }


/* ========================================== */
/* الوضع الليلي - إصلاحات الـ App Bar */
/* ========================================== */

[data-theme="dark"] .app-bar {
    background: #2b2b2b;
    border-bottom: 1px solid #413c38;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .app-bar .back-btn {
    color: #f0f0f0;
}

[data-theme="dark"] .app-bar .back-btn:hover {
    color: #ffffff;
}

[data-theme="dark"] .app-bar .logo-link {
    /* اللوجو نفسه - يفضل استخدام صورة مناسبة للداكن */
    /* filter: brightness(0) invert(1); */
    /* أو استخدم صورة مختلفة للداكن */
    /* background: url('logo-dark.png') no-repeat center center; */
    /* background-size: contain; */
}

[data-theme="dark"] .app-bar .actions i {
    color: #f0f0f0;
}

[data-theme="dark"] .app-bar .actions i:hover {
    color: #ffffff;
}

[data-theme="dark"] .app-bar .actions .theme-toggle {
    color: #f0f0f0;
}

[data-theme="dark"] .app-bar .actions .theme-toggle:hover {
    color: #ffffff;
}

[data-theme="dark"] .hamburger-icon span {
    background: #f0f0f0;
}

[data-theme="dark"] .menu-toggle.active .hamburger-icon span {
    background: #f0f0f0;
}
/* ========================================== */
/* صورة المقال مع خلفية شفافة تحتها */
/* ========================================== */
.hero-image {
    width: 100%;
    height: 340px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 2s ease-out;
}
@keyframes zoomIn {
    0% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.hero-image .gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
}
.hero-image .title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    z-index: 2;
    background-color: #000000b5;
}
.hero-image .title-overlay h1 {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    line-height: 1.4;
    margin: 0;
}
.hero-image .title-overlay .meta-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 4px 14px;
    font-size: 12px;
    color: #fff;
    margin-top: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ========================================== */
/* محتوى المقال */
/* ========================================== */
.article-content {
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
    margin-top: -10px;
}
@media (min-width: 768px) {
    .article-content {
        padding: 0 5px;
    }
}

/* ========================================== */
/* إحصائيات المقال مع شريط التقدم */
/* ========================================== */
.article-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 16px 0 3px;
    padding: 0;
}

@media (max-width: 768px) {
    .article-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .article-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }
}

.stat-item {
    background: #f3f3f3;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--border-color, #e8e5e0);
    border-radius: 5px;
    box-shadow: 0 4px 9px rgb(0 0 0 / 6%);
    border-right: 2px solid #ff6b00;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--accent, #0984e3);
}

.stat-icon-wrapper {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f0f2f5);
    font-size: 18px;
    color: var(--accent, #0984e3);
    transition: all 0.3s ease;
}

.stat-item:nth-child(1) .stat-icon-wrapper {
    background: rgba(9, 132, 227, 0.1);
    color: #0984e3;
}

.stat-item:nth-child(2) .stat-icon-wrapper {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.stat-item:nth-child(3) .stat-icon-wrapper {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stat-item:nth-child(4) .stat-icon-wrapper {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
}

.stat-item:hover .stat-icon-wrapper {
    transform: scale(1.05);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #2d3436);
    font-family: 'Cairo', sans-serif;
    line-height: 1.3;
}

.stat-value.date-value {
    font-size: 12px;
    font-weight: 600;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary, #636e72);
    margin-top: 2px;
    margin-bottom: 8px;
    font-family: 'Cairo', sans-serif;
}

.stat-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary, #e9ecef);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.stat-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
    position: relative;
    animation: progressGlow 2s ease-in-out infinite;
}

.stat-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    }
}

@keyframes progressShine {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

.stat-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .stat-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .stat-icon-wrapper {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-value.date-value {
        font-size: 11px;
    }
    
    .stat-progress {
        height: 3px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        padding: 8px 10px;
        gap: 8px;
        border-radius: 10px;
    }
    
    .stat-icon-wrapper {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .stat-progress {
        height: 3px;
    }
}

[data-theme="dark"] .stat-item {
    background: #212121;
    border-color: #413c38;
}

[data-theme="dark"] .stat-icon-wrapper {
    background: #1a1a2e;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}
.article-meta .date {
    display: flex;
    align-items: center;
    gap: 6px;
}
.article-meta .date i {
    color: var(--accent);
    font-size: 14px;
}
.article-meta .time-ago {
    background: #ffffff;
    padding: 4px 14px;
    font-size: 12px;
    color: var(--accent);
    border: 1px solid #e8e5e0;
    font-weight: 600;
}
[data-theme="dark"] .article-meta .time-ago {
    background: #212121;
    border-color: #413c38;
}
.article-meta .read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================== */
/* شريط التقدم في القراءة */
/* ========================================== */
.progress-bar-container {
    position: sticky;
    top: 50px;
    z-index: 99;
    width: 100%;
    height: 3px;
    background: #2f2f2f;
}
[data-theme="dark"] .progress-bar-container {
    background: #413c38;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-gold));
    transition: width 0.1s linear;
}

/* ========================================== */
/* إعلان - متوافق مع جوجل */
/* ========================================== */
.in-article-ad {
    display: block;
    clear: both;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    margin: 25px 0;
    text-align: center;
    box-sizing: border-box;
}

.in-article-ad ins.adsbygoogle {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-height: 100px;
    margin: 32px auto;
}

/* ========================================== */
/* نص المقال - مع تحسين الفيديوهات والجداول */
/* ========================================== */
.article-body {
    font-size: 17.5px;
    line-height: 2.1;
    color: var(--text-primary);
}
.article-body p {
    margin: 5px;
    text-align: justify;
}
.article-body p:first-of-type {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    border-right: 4px solid var(--accent);
    padding: 14px 8px;
    background: #f8f8f8;
    margin-bottom: 25px;
}
[data-theme="dark"] .article-body p:first-of-type {
    background: #212121;
}
.article-body h2 {
    font-size: 23px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 18px 0;
    padding-right: 16px;
    border-right: 4px solid var(--accent);
    background-color: #cacaca2e;
}
.article-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 26px 0 14px 0;
    padding-right: 14px;
    border-right: 3px solid var(--accent-gold);
    background-color: #dcb0662b;
}
.article-body img {
    max-width: 100%;
    margin: 18px 0;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.article-body iframe {
    width: 100%;
    margin: 18px 0;
    aspect-ratio: 16/9;
    border: none;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.article-body video {
    width: 100%;
    margin: 18px 0;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.article-body blockquote {
    background: #f8f8f8;
    padding: 18px 22px;
    border-right: 4px solid var(--accent-gold);
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}
[data-theme="dark"] .article-body blockquote {
    background: #212121;
}
.article-body ul, .article-body ol {
    margin: 16px 0;
}
.article-body li {
    margin-bottom: 10px;
    list-style: none;
    position: relative;
}
.article-body li::before {
    position: absolute;
    right: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
}
.article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    font-weight: 600;
}
.article-body a:active { opacity: 0.7; }

.article-body table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.article-body th {
    background: var(--accent);
    color: #fff;
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
}
.article-body td {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
}
.article-body tr:nth-child(even) {
    background: #f8f8f8;
}
[data-theme="dark"] .article-body tr:nth-child(even) {
    background: #212121;
}
[data-theme="dark"] .article-body table {
    border-color: #413c38;
}
[data-theme="dark"] .article-body td {
    border-color: #413c38;
}

/* ========================================== */
/* أزرار المشاركة */
/* ========================================== */
.share-section {
    margin: 28px 0 20px;
    padding: 5px;
    background: #ffffff;
}
[data-theme="dark"] .share-section {
    background: #212121;
    border-color: #413c38;
}
.share-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.share-title i {
    color: var(--accent);
    margin-left: 8px;
}
.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 11px;
    min-height: 60px;
}
.share-btn:active { transform: scale(0.92); }
.share-btn i { font-size: 22px; }
.share-btn span { font-size: 10px; opacity: 0.9; }
.share-fb { background: #1877f2; }
.share-tw { background: #000; }
.share-wa { background: #25D366; }
.share-tg { background: #0088cc; }
.share-li { background: #0077b5; }
.share-pi { background: #E60023; }
.share-cp { background: #6c757d; }
.share-print { background: #17a2b8; }
[data-theme="dark"] .share-tw { background: #1a1a2e; border: 1px solid #444; }

/* ========================================== */
/* الكلمات الدلالية */
/* ========================================== */
.article-tags-section {
    padding: 20px 0;
    margin: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.tags-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.tags-header i {
    font-size: 20px;
    color: var(--accent);
}
.tags-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.tags-count {
    background: var(--accent);
    color: #fff;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 700;
}
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag-item {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}
.tag-item:active {
    transform: scale(0.95);
}
.tag-item .tag-hash {
    opacity: 0.7;
}
.category-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.category-badge i {
    color: var(--accent);
    font-size: 16px;
}
.category-label {
    font-size: 14px;
    color: var(--text-muted);
}
.category-name {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}
.category-name:active {
    transform: scale(0.95);
}
.tags-mobile-info {
    display: none;
}
@media (max-width: 480px) {
    .tags-mobile-info {
        display: block;
        text-align: center;
        margin-top: 12px;
        font-size: 12px;
        color: var(--text-muted);
    }
}

/* ========================================== */
/* "يمكنك قراءة أيضاً" - وسط المقال */
/* ========================================== */
.mid-article-suggestions {
    margin: 30px 0 20px;
    padding: 0px 3px;
    background: #fafafa;
}
[data-theme="dark"] .mid-article-suggestions {
    background: #212121;
    border-color: #413c38;
}
.mid-article-suggestions .suggest-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}
.mid-article-suggestions .suggest-title i {
    color: var(--accent-gold);
    font-size: 22px;
}
.mid-article-suggestions .suggest-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 6px;
}
.mid-suggest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mid-suggest-card {
    background: #ffffff;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: 0 6px 5px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .mid-suggest-card {
    background: #1a1a2e;
}
.mid-suggest-card:active { transform: scale(0.97); }
.mid-suggest-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.mid-suggest-card .info {
    padding: 10px 12px;
}
.mid-suggest-card .info h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}
.mid-suggest-card .info .time-sm {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}
.mid-suggest-card:nth-child(1) { border-color: #e74c3c; }
.mid-suggest-card:nth-child(2) { border-color: #3498db; }
.mid-suggest-card:nth-child(3) { border-color: #2ecc71; }
.mid-suggest-card:nth-child(4) { border-color: #f39c12; }
.mid-suggest-card:nth-child(5) { border-color: #9b59b6; }
.mid-suggest-card:nth-child(6) { border-color: #1abc9c; }
.mid-suggest-card:nth-child(7) { border-color: #e67e22; }
.mid-suggest-card:nth-child(8) { border-color: #e91e63; }

@media (min-width: 768px) {
    .mid-suggest-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .mid-suggest-card img {
        height: 130px;
    }
    .mid-suggest-card .info h4 {
        font-size: 15px;
    }
}

/* ========================================== */
/* مقالات ذات صلة */
/* ========================================== */
.related-section {
    margin: 30px 0 10px;
}
.related-section .section-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.related-section .section-title i { color: var(--accent); }

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.related-card {
    background: var(--bg-card);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}
.related-card:active { transform: scale(0.97); }
.related-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}
.related-card .info {
    padding: 12px 14px;
}
.related-card .info h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}
.related-card .info .date-sm {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}
@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .related-card img {
        height: 160px;
    }
}

/* ========================================== */
/* أحدث المقالات - سلايدر */
/* ========================================== */
.latest-section {
    margin: 10px 0 10px;
}
.latest-section .section-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    padding: 2px 6px 2px;
}
.latest-section .section-title i { color: var(--accent); }

.latest-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.latest-scroll::-webkit-scrollbar {
    height: 3px;
}
.latest-scroll::-webkit-scrollbar-track {
    background: var(--border-color);
}
.latest-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
}

.latest-card {
    min-width: 140px;
    max-width: 160px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-card);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}
.latest-card:active { transform: scale(0.95); }
.latest-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}
.latest-card .info {
    padding: 8px 10px;
}
.latest-card .info h4 {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}
.latest-card .info .time-sm {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}
@media (min-width: 768px) {
    .latest-card {
        min-width: 180px;
        max-width: 200px;
    }
    .latest-card img {
        height: 120px;
    }
}

/* ========================================== */
/* التعليقات - مع API */
/* ========================================== */
.comments-section {
    margin: 30px 0 10px;
    background: #ffffff;
    padding: 20px 3px;
}
[data-theme="dark"] .comments-section {
    background: #212121;
    border-color: #413c38;
}
.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}
.comments-header .title {
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comments-header .title i { color: var(--accent); }
.comments-header .count {
    background: var(--accent);
    color: #fff;
    padding: 2px 12px;
    font-size: 13px;
    font-weight: 700;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.comment-form .form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.comment-form input[type="text"] {
    flex: 1;
    padding: 13px 32px;
    border: 2px solid var(--border-color);
    font-size: 14px;
    background: #ffffff;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: var(--transition);
    min-width: 100px;
}
[data-theme="dark"] .comment-form input[type="text"] {
    background: #151515;
    border-color: #413c38;
}
.comment-form input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 76, 61, 0.15);
}
.comment-form input[type="text"]::placeholder {
    color: var(--text-muted);
}
.comment-form .submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 5px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}
.comment-form .submit-btn:active { transform: scale(0.95); }
.comment-form .name-input {
    width: 150px;
    min-width: 120px;
}

.comments-list {
    max-height: 600px;
    overflow-y: auto;
}
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease-out;
}
.comment-item:last-child { border-bottom: none; }
.comment-item .comment-user {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-item .comment-user i {
    font-size: 16px;
    background: #ffffff;
    padding: 4px;
}
[data-theme="dark"] .comment-item .comment-user i {
    background: #212121;
}
.comment-item .comment-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-right: 28px;
}
.comment-item .comment-time {
    font-size: 11px;
    color: var(--text-muted);
    padding-right: 28px;
    margin-top: 4px;
}
.comment-item .reply-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    padding-right: 28px;
    margin-top: 6px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}
.comment-item .reply-btn:active { opacity: 0.7; }

.comment-item .replies {
    padding-right: 30px;
    border-right: 2px solid var(--border-color);
    margin-top: 10px;
}
.comment-item .replies .comment-item {
    border-bottom: none;
    padding: 10px 0;
}
.comment-item .replies .comment-item:last-child { padding-bottom: 0; }

.no-comments {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}
.no-comments i {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    color: var(--border-color);
}

/* ========================================== */
/* الشريط السفلي الثابت */
/* ========================================== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-height);
    background: linear-gradient(180deg, #ededed, #d2d2d2);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 8px;
}
@media (min-width: 1024px) {
    .bottom-bar {
        display: none !important;
    }
    body {
        padding-bottom: 30px !important;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    /* اختياري: يمكن إخفاء الشريط على التابلت أيضاً */
}
[data-theme="dark"] .bottom-bar {
    background: #151515;
}
.bottom-bar .bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    transition: var(--transition);
    padding: 4px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}
.bottom-bar .bottom-item i {
    font-size: 22px;
    transition: var(--transition);
}
.bottom-bar .bottom-item span {
    font-size: 9px;
    font-weight: 600;
}
.bottom-bar .bottom-item.active {
    color: var(--accent);
}
.bottom-bar .bottom-item.active i {
    transform: translateY(-2px);
}
.bottom-bar .bottom-item:active { transform: scale(0.92); }

/* ========================================== */
/* زر العودة للأعلى */
/* ========================================== */
.scroll-top {
    position: fixed;
    bottom: calc(var(--bottom-height) + 20px);
    left: 16px;
    background: var(--accent);
    color: #fff;
    width: 50px;
    height: 50px;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(232, 76, 61, 0.35);
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    z-index: 50;
}
.scroll-top.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.scroll-top:active { transform: scale(0.9); }

/* ========================================== */
/* الفوتر */
/* ========================================== */
.footer {
    background: #ffffff;
    padding: 24px 16px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}
[data-theme="dark"] .footer {
    background: #151515;
}
.footer p {
    font-size: 13px;
    color: var(--text-muted);
}
.footer .social {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 14px;
}
.footer .social a {
    color: var(--text-muted);
    font-size: 20px;
    transition: var(--transition);
}
.footer .social a:active { color: var(--accent); }

/* ========================================== */
/* تأثيرات */
/* ========================================== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ========================================== */
/* Toast */
/* ========================================== */
.toast-message {
    position: fixed;
    bottom: calc(var(--bottom-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: var(--text-primary);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    max-width: 90%;
    text-align: center;
    animation: toastIn 0.3s ease-out;
}
[data-theme="dark"] .toast-message {
    background: #212121;
    border-color: #413c38;
}
@keyframes toastIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========================================== */
/* سكرول */
/* ========================================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #ffffff; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #151515; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 0px; }

/* ========================================== */
/* الوضع الداكن - إصلاحات */
/* ========================================== */
[data-theme="dark"] .mid-article-suggestions { border-color: #413c38; }
[data-theme="dark"] .mid-suggest-card { border-color: #413c38; }
[data-theme="dark"] .mid-suggest-card:nth-child(1) { border-color: #e74c3c; }
[data-theme="dark"] .mid-suggest-card:nth-child(2) { border-color: #3498db; }
[data-theme="dark"] .mid-suggest-card:nth-child(3) { border-color: #2ecc71; }
[data-theme="dark"] .mid-suggest-card:nth-child(4) { border-color: #f39c12; }
[data-theme="dark"] .mid-suggest-card:nth-child(5) { border-color: #9b59b6; }
[data-theme="dark"] .mid-suggest-card:nth-child(6) { border-color: #1abc9c; }
[data-theme="dark"] .mid-suggest-card:nth-child(7) { border-color: #e67e22; }
[data-theme="dark"] .mid-suggest-card:nth-child(8) { border-color: #e91e63; }
[data-theme="dark"] .hero-image .title-overlay h1 { color: #fff; }
[data-theme="dark"] .hero-image .gradient-overlay { 
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 40%, transparent 100%);
}

.no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* ========================================== */
/* تحسينات للشاشات الصغيرة */
/* ========================================== */
@media (max-width: 400px) {
    .hero-image { height: 280px; }
    .hero-image .title-overlay h1 { font-size: 20px; }
    .article-body { font-size: 16px; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .related-card img { height: 100px; }
    .article-stats { grid-template-columns: repeat(2, 1fr); }
    .share-grid { grid-template-columns: repeat(4, 1fr); }
    .share-btn { padding: 8px 4px; font-size: 10px; min-height: 50px; }
    .share-btn i { font-size: 18px; }
    .comment-form .form-row { flex-direction: column; }
    .comment-form .name-input { width: 100%; }
    .latest-card { min-width: 120px; max-width: 140px; }
    .mid-suggest-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .mid-suggest-card img { height: 80px; }
    .mid-suggest-card .info h4 { font-size: 12px; }
}

@media (max-width: 360px) {
    .share-grid { grid-template-columns: repeat(3, 1fr); }
    .mid-suggest-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 600px) and (max-width: 1023px) {
    body { max-width: 100%; margin: 0 auto; }
    .hero-image { height: 380px; }
}

.google-anno-sa {
    contain: layout style size !important;
    max-width: 100vw !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}
body:has(.google-anno-sa) {
    overflow-x: hidden !important;
    width: 100% !important;
}

ins.google-anno-sa, 
#google_ads_iframe_, 
[id^="google_ads_iframe_"] {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
}
body:has(ins.google-anno-sa) {
    width: 100% !important;
    overflow-x: hidden !important;
}

.mobile-grid {
    display: none;
}
@media (max-width: 768px) {
    .desktop-grid {
        display: none;
    }
    .mobile-grid {
        display: grid !important;
    }
}
@media (min-width: 769px) {
    .desktop-grid {
        display: grid !important;
    }
    .mobile-grid {
        display: none !important;
    }
}

/* ========================================== */
/* رسالة تشجيعية للتعليقات */
/* ========================================== */
.comments-encouragement {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed var(--accent);
    padding: 15px 5px;
    text-align: center;
    margin-bottom: 12px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
[data-theme="dark"] .comments-encouragement {
    background: linear-gradient(135deg, #1a1a2e, #212121);
    border-color: var(--accent);
}
.comments-encouragement .encouragement-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.comments-encouragement h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.comments-encouragement p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}
.comments-encouragement .encourage-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(232, 76, 61, 0.3);
}
.comments-encouragement .encourage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(232, 76, 61, 0.4);
}
.comments-encouragement .encourage-btn:active {
    transform: scale(0.95);
}

/* ========================================== */
/* بادج في الشريط السفلي */
/* ========================================== */
.bottom-item {
    position: relative;
}
.bottom-badge {
    position: absolute;
    top: -8px;
    right: 50%;
    transform: translateX(50%) scale(1);
    background: #e84c3d;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 10px;
    min-width: 20px;
    min-height: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 0 2px rgba(232, 76, 61, 0.4),
        0 0 20px rgba(232, 76, 61, 0.3);
    z-index: 10;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid #ffffff;
}
.badge-pulse-ring {
    position: absolute;
    top: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(232, 76, 61, 0.15);
    z-index: 5;
    pointer-events: none;
    animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
    0% {
        transform: translateX(50%) scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: translateX(50%) scale(1.6);
        opacity: 0.3;
    }
    100% {
        transform: translateX(50%) scale(0.8);
        opacity: 0.8;
    }
}
.bottom-badge.zero {
    background: #9e9e9e;
    box-shadow: 0 0 0 2px rgba(158, 158, 158, 0.3), 0 0 15px rgba(158, 158, 158, 0.15);
}
.bottom-badge.zero + .badge-pulse-ring {
    background: rgba(158, 158, 158, 0.1);
    animation: pulse-ring-zero 2.5s ease-in-out infinite;
}
@keyframes pulse-ring-zero {
    0%, 100% {
        transform: translateX(50%) scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: translateX(50%) scale(1.4);
        opacity: 0.15;
    }
}
.bottom-badge.pop {
    animation: pop-badge 0.5s ease-out;
}
@keyframes pop-badge {
    0% { transform: translateX(50%) scale(0); }
    50% { transform: translateX(50%) scale(1.3); }
    70% { transform: translateX(50%) scale(0.9); }
    100% { transform: translateX(50%) scale(1); }
}
.bottom-badge.shake {
    animation: shake-badge 0.6s ease-in-out;
}
@keyframes shake-badge {
    0%, 100% { transform: translateX(50%) rotate(0deg); }
    20% { transform: translateX(50%) rotate(-15deg) scale(1.1); }
    40% { transform: translateX(50%) rotate(15deg) scale(1.1); }
    60% { transform: translateX(50%) rotate(-10deg) scale(1.05); }
    80% { transform: translateX(50%) rotate(10deg) scale(1.05); }
}
.bottom-badge.gradient {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    box-shadow: 
        0 0 0 2px rgba(232, 76, 61, 0.3),
        0 0 25px rgba(232, 76, 61, 0.4);
}
.bottom-badge .sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    animation: sparkle-float 1.5s ease-in-out infinite;
}
.bottom-badge .sparkle:nth-child(1) {
    top: -4px;
    right: -4px;
    animation-delay: 0s;
}
.bottom-badge .sparkle:nth-child(2) {
    bottom: -4px;
    left: -4px;
    animation-delay: 0.5s;
}
.bottom-badge .sparkle:nth-child(3) {
    top: 50%;
    right: -8px;
    animation-delay: 1s;
    transform: translateY(-50%);
}
@keyframes sparkle-float {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}
@media (max-width: 480px) {
    .bottom-badge {
        font-size: 9px;
        padding: 1px 8px;
        min-width: 18px;
        min-height: 18px;
        top: -6px;
    }
    .badge-pulse-ring {
        width: 26px;
        height: 26px;
        top: -6px;
    }
}
[data-theme="dark"] .bottom-badge {
    border-color: #1a1a2e;
    box-shadow: 
        0 0 0 2px rgba(232, 76, 61, 0.6),
        0 0 30px rgba(232, 76, 61, 0.5);
}
[data-theme="dark"] .bottom-badge.zero {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(158, 158, 158, 0.4), 0 0 20px rgba(158, 158, 158, 0.2);
}
[data-theme="dark"] .badge-pulse-ring {
    background: rgba(232, 76, 61, 0.25);
}
[data-theme="dark"] .bottom-badge.zero + .badge-pulse-ring {
    background: rgba(158, 158, 158, 0.15);
}

/* ========================================== */
/* شروط التعليق - تصميم جذاب */
/* ========================================== */
.comments-rules {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
[data-theme="dark"] .comments-rules {
    background: #1a1a2e;
    border-color: #413c38;
}
.rules-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.rules-header:hover {
    background: var(--border-color);
}
[data-theme="dark"] .rules-header:hover {
    background: #2a2a3e;
}
.rules-header i:first-child {
    color: var(--accent);
    font-size: 18px;
}
.rules-header span {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.rules-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    padding: 4px 8px;
}
.rules-toggle:hover {
    color: var(--accent);
}
.rules-toggle.active i {
    transform: rotate(180deg);
}
.rules-body {
    padding: 11px 5px;
    display: block;
    transition: all 0.3s ease;
}
.rules-body.hidden {
    display: none;
}
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
@media (max-width: 600px) {
    .rules-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: 8px;
    border-right: 3px solid var(--accent);
    transition: var(--transition);
}
[data-theme="dark"] .rule-item {
    background: #212121;
}
.rule-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.rule-icon {
    font-size: 18px;
    color: var(--accent);
    margin-top: 2px;
    min-width: 24px;
}
.rule-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rule-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.rule-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.rules-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(232, 76, 61, 0.06);
    border-radius: 8px;
    border: 1px dashed rgba(232, 76, 61, 0.2);
}
[data-theme="dark"] .rules-footer {
    background: rgba(232, 76, 61, 0.08);
}
.rules-footer i {
    color: #2ecc71;
    font-size: 18px;
}
.rules-footer span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================== */
/* فورم التعليق - حجم كبير */
/* ========================================== */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.comment-form .form-row {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    width: 100%;
}
.input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    overflow: hidden;
}
.input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 76, 61, 0.08);
}
[data-theme="dark"] .input-group {
    background: #151515;
}
.input-group .input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
    z-index: 1;
}
.input-group:focus-within .input-icon {
    color: var(--accent);
}
.name-group {
    max-width: 300px;
}
@media (max-width: 480px) {
    .name-group {
        max-width: 100%;
    }
}
.name-group .form-input {
    padding: 14px 45px 14px 16px;
    font-size: 15px;
    height: 54px;
}
.text-group {
    align-items: flex-start;
    padding: 0;
    min-height: 120px;
}
.text-group .input-icon {
    top: 16px;
    right: 14px;
}
.text-group textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 16px 45px 16px 16px;
    font-size: 16px;
    line-height: 1.8;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Cairo', 'Noto Sans Arabic', sans-serif;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}
.text-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 15px;
}
.text-group .char-counter {
    position: absolute;
    bottom: 10px;
    left: 14px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
    transition: var(--transition);
    background: var(--bg-primary);
    padding: 2px 10px;
    border-radius: 12px;
}
[data-theme="dark"] .text-group .char-counter {
    background: #151515;
}
.text-group .char-counter.warning {
    color: #f39c12;
}
.text-group .char-counter.danger {
    color: #e74c3c;
}
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.form-actions .submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(232, 76, 61, 0.25);
}
.form-actions .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 76, 61, 0.35);
}
.form-actions .submit-btn:active {
    transform: scale(0.96);
}
.form-actions .submit-btn i {
    font-size: 18px;
}
.form-actions .reset-btn {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-actions .reset-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
    background: var(--border-color);
}
.form-actions .reset-btn:active {
    transform: scale(0.96);
}
.reply-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(232, 76, 61, 0.08);
    border-radius: 8px;
    border-right: 3px solid var(--accent);
    margin-bottom: 10px;
}
.reply-indicator.show {
    display: flex;
}
.reply-indicator i {
    color: var(--accent);
    font-size: 16px;
}
.reply-indicator span {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}
.reply-indicator .cancel-reply {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: var(--transition);
}
.reply-indicator .cancel-reply:hover {
    color: var(--accent);
}
@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }
    .form-actions .submit-btn,
    .form-actions .reset-btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
    .text-group textarea {
        min-height: 100px;
        font-size: 15px;
        padding: 14px 40px 14px 14px;
    }
    .name-group .form-input {
        height: 48px;
        font-size: 14px;
        padding: 12px 40px 12px 14px;
    }
    .rules-header {
        padding: 12px 14px;
        font-size: 14px;
    }
    .rule-item {
        padding: 8px 12px;
    }
    .rule-title {
        font-size: 12px;
    }
    .rule-desc {
        font-size: 11px;
    }
}
[data-theme="dark"] .input-group {
    border-color: #413c38;
}
[data-theme="dark"] .input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 76, 61, 0.15);
}
[data-theme="dark"] .form-actions .reset-btn {
    border-color: #413c38;
    color: var(--text-muted);
}
[data-theme="dark"] .form-actions .reset-btn:hover {
    background: #2a2a3e;
    border-color: #666;
}
.comments-section.highlight {
    box-shadow: 0 0 0 3px var(--accent), 0 0 40px rgba(232, 76, 61, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 20px 18px;
    background: var(--bg-primary);
}
[data-theme="dark"] .comments-section.highlight {
    box-shadow: 0 0 0 3px var(--accent), 0 0 40px rgba(232, 76, 61, 0.25);
}

/* ========================================== */
/* رسالة "كن أول من يعلق" فوق البادج */
/* ========================================== */
.comment-tooltip {
    position: absolute;
    bottom: 55px;
    right: 50%;
    transform: translateX(50%);
    z-index: 300;
    animation: tooltip-float 2.5s ease-in-out infinite, tooltip-appear 0.5s ease-out;
    pointer-events: none;
}
.comment-tooltip.has-comments .tooltip-content {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 
        0 8px 30px rgba(46, 204, 113, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.15);
}
.comment-tooltip.has-comments .tooltip-arrow {
    border-top-color: #27ae60;
}
.comment-tooltip.has-comments .tooltip-emoji {
    animation: emoji-dance 0.8s ease-in-out infinite;
}
@keyframes emoji-dance {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.2);
    }
    75% {
        transform: rotate(15deg) scale(1.2);
    }
}
.comment-tooltip.has-comments::before {
    background: rgba(46, 204, 113, 0.15);
}
.tooltip-text.typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typing-effect 1.5s steps(20, end);
}
@keyframes typing-effect {
    0% { width: 0; opacity: 0; }
    100% { width: 100%; opacity: 1; }
}
.tooltip-content {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 8px 30px rgba(232, 76, 61, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.tooltip-emoji {
    font-size: 18px;
    animation: emoji-bounce 1.5s ease-in-out infinite;
}
.tooltip-text {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}
.tooltip-arrow {
    position: absolute;
    bottom: -12px;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid #f39c12;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
@keyframes tooltip-float {
    0%, 100% {
        transform: translateX(50%) translateY(0px);
    }
    50% {
        transform: translateX(50%) translateY(-8px);
    }
}
@keyframes tooltip-appear {
    0% {
        opacity: 0;
        transform: translateX(50%) translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(50%) translateY(0px) scale(1);
    }
}
@keyframes emoji-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(-10deg);
    }
    75% {
        transform: scale(1.2) rotate(10deg);
    }
}
.comment-tooltip::before {
    content: '';
    position: absolute;
    bottom: 50px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 60px;
    background: rgba(232, 76, 61, 0.1);
    border-radius: 50%;
    animation: tooltip-pulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes tooltip-pulse {
    0%, 100% {
        transform: translateX(50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translateX(50%) scale(1.5);
        opacity: 0.1;
    }
}
.comment-tooltip.hide {
    animation: tooltip-hide 0.6s ease-in forwards;
}
@keyframes tooltip-hide {
    0% {
        opacity: 1;
        transform: translateX(50%) translateY(0px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(50%) translateY(-30px) scale(0.5);
    }
}
@media (max-width: 480px) {
    .comment-tooltip {
        bottom: 50px;
        right: 50%;
    }
    .tooltip-content {
        font-size: 11px;
        padding: 6px 14px;
        gap: 6px;
    }
    .tooltip-emoji {
        font-size: 15px;
    }
    .tooltip-arrow {
        bottom: -10px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 10px solid #f39c12;
    }
}
[data-theme="dark"] .tooltip-content {
    background: linear-gradient(135deg, #c0392b, #e67e22);
    box-shadow: 0 8px 30px rgba(192, 57, 43, 0.4);
}
[data-theme="dark"] .tooltip-arrow {
    border-top-color: #e67e22;
}

.comment-tooltip.pop-in {
    animation: pop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards !important;
}
@keyframes pop-in {
    0% {
        transform: translateX(50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
    100% {
        transform: translateX(50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}
.comment-tooltip.pop-out {
    animation: pop-out 0.3s ease-in forwards !important;
}
@keyframes pop-out {
    0% {
        transform: translateX(50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(50%) scale(0.5) rotate(10deg);
        opacity: 0;
    }
}
.comment-tooltip .tooltip-content {
    transition: all 0.5s ease;
}
.comment-tooltip.showing {
    animation: tooltip-float 2.5s ease-in-out infinite, tooltip-appear 0.5s ease-out;
}
@keyframes tooltip-appear {
    0% {
        opacity: 0;
        transform: translateX(50%) translateY(20px) scale(0.7);
    }
    60% {
        transform: translateX(50%) translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(50%) translateY(0px) scale(1);
    }
}
.desktop-comment-badge {
    position: fixed;
    bottom: 30px;
    right: 180px;
    z-index: 999;
    display: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
@media (min-width: 769px) {
    .desktop-comment-badge {
        display: block;
    }
}
.desktop-badge-content {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 8px 30px rgba(232, 76, 61, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: desktop-badge-float 3s ease-in-out infinite;
}
.desktop-badge-content:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 12px 40px rgba(232, 76, 61, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.2);
}
@keyframes desktop-badge-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}
.desktop-badge-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: desktop-icon-pulse 2s ease-in-out infinite;
}
@keyframes desktop-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
.desktop-badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.desktop-badge-count {
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}
.desktop-badge-count::before {
    content: '💬 ';
}
.desktop-badge-text {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
}
.desktop-badge-arrow {
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #f39c12;
    opacity: 0.5;
}
.desktop-badge-content.has-comments {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 
        0 8px 30px rgba(46, 204, 113, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.1);
}
.desktop-badge-content.has-comments .desktop-badge-arrow {
    border-top-color: #27ae60;
}
.desktop-badge-content.many-comments {
    background: linear-gradient(135deg, #9b59b6, #3498db);
    box-shadow: 
        0 8px 30px rgba(155, 89, 182, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.1);
}
.desktop-badge-content.many-comments .desktop-badge-arrow {
    border-top-color: #3498db;
}
.desktop-comment-badge.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}
.desktop-comment-badge.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.desktop-comment-badge .pulse-ring {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(232, 76, 61, 0.08);
    animation: desktop-pulse-ring 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
@keyframes desktop-pulse-ring {
    0%, 100% {
        transform: translate(50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: translate(50%, -50%) scale(1.4);
        opacity: 0.1;
    }
}
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================== */
/* القائمة */
/* ========================================== */
.menu-logo {
    padding: 20px 16px 16px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 8px;
}
.menu-logo-link {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.menu-logo-text {
    font-size: 26px;
    font-weight: 900;
    font-family: 'Cairo', sans-serif;
    color: var(--accent, #111111);
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(135deg, #e34d09, #363637);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.menu-logo-subtitle {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Cairo', sans-serif;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}
@media (min-width: 769px) {
    .menu-logo {
        display: none;
    }
}
@media (max-width: 768px) {
    .menu-logo {
        padding: 24px 16px 20px;
    }
    .menu-logo-text {
        font-size: 28px;
    }
}
@media (max-width: 480px) {
    .menu-logo {
        padding: 18px 12px 14px;
    }
    .menu-logo-text {
        font-size: 24px;
    }
    .menu-logo-subtitle {
        font-size: 10px;
    }
}
[data-theme="dark"] .menu-logo {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
}
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: #000;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}
.menu-container {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 999;
    background: var(--bg-secondary);
    overflow-y: auto;
}
.menu-container.open {
    display: block;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}
.menu-overlay.open {
    display: block;
}
.menu-close-item {
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0 !important;
    display: block !important;
    list-style: none !important;
}
.menu-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--accent, #e74c3c) !important;
    color: #fff !important;
    border: none;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
}
.menu-close-btn i {
    font-size: 18px;
}
@media (min-width: 769px) {
    .menu-close-item {
        display: none !important;
    }
}
.main-navigation {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}
.main-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
}
.main-menu > li {
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-menu > li:last-child {
    border-bottom: none;
}
.main-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.main-menu > li > a:hover {
    background: var(--bg-primary);
    color: var(--accent);
}
.main-menu > li > a .menu-icon,
.main-menu > li > a i.fas,
.main-menu > li > a i.fab,
.main-menu > li > a i.fa-solid,
.main-menu > li > a i.far {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.main-menu > li > a .sub-arrow {
    margin-right: auto;
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.main-menu > li > a .sub-arrow.open {
    transform: rotate(-90deg);
}
.main-menu > li .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    width: 100%;
}
.main-menu > li .sub-menu.open {
    display: block !important;
}
.main-menu > li .sub-menu li {
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-menu > li .sub-menu li:last-child {
    border-bottom: none;
}
.main-menu > li .sub-menu li a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 12px 32px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Cairo', sans-serif;
    border-right: 3px solid transparent;
    background: var(--bg-primary);
    transition: all 0.2s ease;
}
.main-menu > li .sub-menu li a:hover {
    border-right-color: var(--accent);
    background: var(--bg-secondary);
    color: var(--accent);
}
.main-menu > li .sub-menu li a .sub-icon {
    font-size: 14px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
@media (min-width: 769px) {
    .menu-container {
        display: block !important;
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
        background: transparent;
        overflow-y: visible;
        animation: none;
        padding-top: 0;
    }
    .menu-overlay {
        display: none !important;
    }
    .main-navigation {
        max-width: var(--max-width, 1100px);
        margin: 0 auto;
    }
    .main-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px;
    }
    .main-menu > li {
        border-bottom: none;
        position: relative;
    }
    .main-menu > li > a {
        padding: 09px 11px;
        font-size: 14px;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
    }
    .main-menu > li > a:hover {
        border-bottom-color: var(--accent);
        background: transparent;
    }
    .main-menu > li > a .sub-arrow {
        display: none !important;
    }
    .main-menu > li .sub-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 222px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        box-shadow: var(--shadow-hover);
        padding: 8px 0;
        z-index: 200;
    }
    .main-menu > li:hover .sub-menu,
    .main-menu > li:focus-within .sub-menu {
        display: block !important;
    }
    .main-menu > li .sub-menu li {
        border-bottom: none;
    }
    .main-menu > li .sub-menu li a {
        padding: 10px 16px;
        border-right: 3px solid transparent;
        font-size: 13px;
        background: var(--bg-secondary);
    }
}
[data-theme="dark"] .menu-container {
    background: var(--bg-secondary);
}
[data-theme="dark"] .main-menu > li .sub-menu {
    background: var(--bg-primary);
}
[data-theme="dark"] .main-menu > li .sub-menu li a {
    background: var(--bg-primary);
}
@media (max-width: 480px) {
    .app-bar {
        padding: 8px 12px;
    }
    .app-bar .logo-link {
        font-size: 18px;
    }
    .app-bar .actions i,
    .app-bar .actions button {
        font-size: 16px;
    }
    .hamburger-icon {
        width: 20px;
        height: 18px;
        gap: 3px;
    }
    .hamburger-icon span {
        height: 2.5px;
    }
    .main-menu > li > a {
        padding: 12px 12px;
        font-size: 14px;
    }
    .main-menu > li .sub-menu li a {
        padding: 10px 12px 10px 24px;
        font-size: 13px;
    }
    .menu-close-btn {
        padding: 14px;
        font-size: 14px;
    }
}

/* ========================================== */
/* شريط الطقس العلوي */
/* ========================================== */
.weather-top-bar {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    top: 0;
    z-index: 150;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}
.weather-top-bar.scrolled {
    padding: 6px 16px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
}
.weather-top-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--weather-accent), transparent);
    background-size: 200% 100%;
    animation: shimmerLine 3s ease-in-out infinite;
    opacity: 0.6;
    box-shadow: 0 0 20px var(--weather-glow);
}
@keyframes shimmerLine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.weather-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: #fff;
}
.weather-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 150px;
}
.weather-location-icon {
    color: var(--weather-accent);
    animation: locationPulse 2s ease-in-out infinite;
}
@keyframes locationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--weather-accent); }
}
.weather-city {
    font-weight: 700;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.weather-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}
.weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.weather-icon {
    font-size: 28px;
    color: var(--weather-accent);
    animation: weatherFloat 3s ease-in-out infinite;
    text-shadow: 0 0 30px var(--weather-glow);
}
@keyframes weatherFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(5deg); }
}
.weather-temp {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--weather-accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.weather-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 2px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.weather-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
.weather-detail-item i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 16px;
}
.weather-detail-item span {
    font-weight: 700;
}
.weather-detail-item small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    margin-right: 2px;
}
.weather-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.weather-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(45deg);
}
.weather-refresh:active {
    transform: scale(0.9) rotate(180deg);
}
.weather-refresh.spinning i {
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}
.weather-raining .weather-icon {
    animation: rainDrop 1s ease-in-out infinite;
}
@keyframes rainDrop {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(0.9); }
}
.weather-snowing .weather-icon {
    animation: snowFloat 2s ease-in-out infinite;
}
@keyframes snowFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-10deg); }
    75% { transform: translateY(3px) rotate(10deg); }
}
[data-theme="dark"] .weather-top-bar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
@media (max-width: 768px) {
    .weather-top-bar {
        padding: 6px 12px;
    }
    .weather-container {
        gap: 6px 12px;
    }
    .weather-location {
        font-size: 12px;
        min-width: auto;
    }
    .weather-city {
        font-size: 13px;
        padding: 1px 10px;
    }
    .weather-date {
        display: none;
    }
    .weather-icon {
        font-size: 22px;
    }
    .weather-temp {
        font-size: 22px;
    }
    .weather-desc {
        font-size: 12px;
        padding: 1px 10px;
    }
    .weather-details {
        gap: 10px;
    }
    .weather-detail-item {
        font-size: 11px;
    }
    .weather-detail-item i {
        font-size: 12px;
    }
    .weather-detail-item small {
        display: none;
    }
    .weather-refresh {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .weather-container {
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 2px 0;
    }
    .weather-container::-webkit-scrollbar {
        height: 2px;
    }
    .weather-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    .weather-main {
        flex-shrink: 0;
    }
    .weather-details {
        flex-shrink: 0;
        flex-wrap: nowrap;
    }
    .weather-location {
        flex-shrink: 0;
    }
    .weather-temp {
        font-size: 20px;
    }
    .weather-detail-item small {
        display: none;
    }
}
.weather-top-bar {
    animation: slideDown 0.6s ease-out;
}
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.weather-top-bar::before {
    content: '✦ ✧ ✦ ✧ ✦';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 8px;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    animation: sparkleMove 8s linear infinite;
}
@keyframes sparkleMove {
    0% { transform: translateY(-50%) translateX(0); opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-50%) translateX(-20px); opacity: 0.3; }
}

/* ========================================== */
/* تصميم قسم الترندات */
/* ========================================== */
.trends-section {
    background: var(--bg-primary);
    border-radius: 16px;
    margin: 10px 0 19px;
    padding: 20px 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.trends-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #e74c3c);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}
@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.trends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}
.trends-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
}
.trend-icon {
    color: #e74c3c;
    font-size: 24px;
    animation: pulse-fire 1.5s ease-in-out infinite;
}
@keyframes pulse-fire {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: #f39c12; }
}
.trends-badge {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    animation: blink-badge 2s ease-in-out infinite;
}
@keyframes blink-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.trends-live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
    margin-right: 4px;
}
@keyframes live-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6);
    }
    50% { 
        opacity: 0.6;
        transform: scale(0.8);
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
    }
}
.trends-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.last-update {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.country-select {
    padding: 8px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    min-width: 150px;
}
.country-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 76, 61, 0.15);
}
.country-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}
.refresh-trends {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.refresh-trends:active {
    transform: scale(0.92);
}
.refresh-trends.spinning i {
    animation: spin 1s linear infinite;
}
.trends-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .trends-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
.trends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}
.trends-list::-webkit-scrollbar {
    width: 4px;
}
.trends-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}
.trend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-right: 4px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}
.trend-item:hover {
    transform: translateX(-6px) scale(1.01);
    box-shadow: var(--shadow-hover);
}
.trend-item:active {
    transform: scale(0.98);
}
.trend-item.updating {
    animation: itemUpdate 0.6s ease;
}
@keyframes itemUpdate {
    0% { 
        transform: scale(0.95);
        opacity: 0.5;
        background: rgba(231, 76, 60, 0.1);
    }
    50% {
        transform: scale(1.02);
        background: rgba(231, 76, 60, 0.05);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        background: var(--bg-secondary);
    }
}
.trend-item .rank {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-muted);
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
}
.trend-item .rank.top1 { color: #e74c3c; }
.trend-item .rank.top2 { color: #f39c12; }
.trend-item .rank.top3 { color: #2ecc71; }
.trend-item .info {
    flex: 1;
    min-width: 0;
}
.trend-item .info .title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.trend-item .info .traffic {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.trend-item .info .traffic i {
    color: #e74c3c;
    font-size: 14px;
}
.trend-item .trend-bar {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 0 0 12px 12px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-trend-badge {
    position: absolute;
    top: 4px;
    left: 8px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    animation: badgeGlow 2s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}
@keyframes badgeGlow {
    0%, 100% { 
        box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 2px 20px rgba(231, 76, 60, 0.6);
        transform: scale(1.05);
    }
}
.trends-chart-wrapper {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}
.trends-chart-wrapper .chart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
}
.trends-chart-wrapper .chart-title i {
    color: var(--accent);
    margin-left: 6px;
}
#trendsChart {
    max-height: 200px;
    max-width: 100%;
}
.top-trend-now {
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.08), rgba(243, 156, 18, 0.08));
    border-radius: 12px;
    border: 2px solid rgba(231, 76, 60, 0.15);
    transition: all 0.5s ease;
    animation: topTrendPulse 2s ease-in-out infinite;
}
@keyframes topTrendPulse {
    0%, 100% { 
        border-color: rgba(231, 76, 60, 0.15);
        transform: scale(1);
    }
    50% { 
        border-color: rgba(231, 76, 60, 0.3);
        transform: scale(1.005);
    }
}
.top-trend-now .top-trend-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.top-trend-now .top-trend-icon {
    font-size: 28px;
    animation: rocketMove 2s ease-in-out infinite;
}
@keyframes rocketMove {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(-5deg); }
}
.top-trend-now .top-trend-label {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 12px;
    border-radius: 20px;
}
.top-trend-now .top-trend-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-primary);
    flex: 1;
}
.top-trend-now .top-trend-traffic {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-trend-now .top-trend-traffic i {
    color: #e74c3c;
}
.trends-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.trends-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.trends-empty i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 12px;
    display: block;
}
[data-theme="dark"] .trends-section {
    background: #1a1a2e;
    border-color: #413c38;
}
[data-theme="dark"] .trend-item {
    background: #212121;
}
[data-theme="dark"] .trends-chart-wrapper {
    background: #212121;
    border-color: #413c38;
}
[data-theme="dark"] .country-select {
    background: #212121;
    border-color: #413c38;
    color: #f0f0f0;
}
[data-theme="dark"] .country-select option {
    background: #1a1a2e;
}
[data-theme="dark"] .last-update {
    background: #212121;
    border-color: #413c38;
}
[data-theme="dark"] .top-trend-now {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(243, 156, 18, 0.1));
}
.trend-item {
    animation: slideIn 0.4s ease-out backwards;
}
.trend-item:nth-child(1) { animation-delay: 0.05s; }
.trend-item:nth-child(2) { animation-delay: 0.10s; }
.trend-item:nth-child(3) { animation-delay: 0.15s; }
.trend-item:nth-child(4) { animation-delay: 0.20s; }
.trend-item:nth-child(5) { animation-delay: 0.25s; }
.trend-item:nth-child(6) { animation-delay: 0.30s; }
.trend-item:nth-child(7) { animation-delay: 0.35s; }
.trend-item:nth-child(8) { animation-delay: 0.40s; }
.trend-item:nth-child(9) { animation-delay: 0.45s; }
.trend-item:nth-child(10) { animation-delay: 0.50s; }
.trend-item:nth-child(11) { animation-delay: 0.55s; }
.trend-item:nth-child(12) { animation-delay: 0.60s; }
.trend-item:nth-child(13) { animation-delay: 0.65s; }
.trend-item:nth-child(14) { animation-delay: 0.70s; }
.trend-item:nth-child(15) { animation-delay: 0.75s; }
.trend-item:nth-child(16) { animation-delay: 0.80s; }
.trend-item:nth-child(17) { animation-delay: 0.85s; }
.trend-item:nth-child(18) { animation-delay: 0.90s; }
.trend-item:nth-child(19) { animation-delay: 0.95s; }
.trend-item:nth-child(20) { animation-delay: 1.00s; }
@keyframes slideIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .trends-section {
        padding: 14px 12px;
    }
    .trends-title {
        font-size: 17px;
    }
    .country-select {
        min-width: 120px;
        font-size: 12px;
        padding: 6px 10px;
    }
    .trend-item {
        padding: 20px 12px;
    }
    .trend-item .info .title {
        font-size: 13px;
    }
    .trend-item .rank {
        font-size: 15px;
        min-width: 24px;
    }
    .trends-chart-wrapper {
        padding: 10px;
    }
    #trendsChart {
        max-height: 150px;
    }
    .top-trend-now .top-trend-title {
        font-size: 14px;
    }
    .top-trend-now .top-trend-content {
        gap: 8px;
    }
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.trends-badge {
    animation: pulse-badge 2s ease-in-out infinite, blink-badge 2s ease-in-out infinite;
}
.update-flash {
    animation: flashUpdate 0.5s ease;
}
@keyframes flashUpdate {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}