/* ===== ملف التجاوب الشامل للموبايل - منصة نهران ===== */
/* يغطي جميع صفحات الموقع ويحافظ على جميع الوظائف */

/* === المتغيرات الاساسية === */
:root {
    --mobile-padding: 12px;
    --mobile-gap: 10px;
    --mobile-radius: 12px;
    --touch-target: 44px;
}

/* === اعدادات عامة للموبايل والتابلت === */
@media screen and (max-width: 1200px) {
    html {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        padding: 0 var(--mobile-padding);
        overflow-x: hidden;
    }
    
    /* منع التمرير الافقي */
    * {
        max-width: 100vw;
    }
}

/* ========================================== */
/* ===== الهيدر والتنقل - HEADER & NAV ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .header {
        padding: 10px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .logo {
        font-size: 18px !important;
        justify-content: center;
        gap: 8px;
    }
    
    .logo i {
        font-size: 20px;
    }
    
    .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px !important;
        padding: 0 5px;
    }
    
    .nav a {
        font-size: 13px !important;
        padding: 10px 14px;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
        white-space: nowrap;
        text-align: center;
    }
    
    .nav .btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 5px;
    }
    
    .nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav a {
        flex-shrink: 0;
        font-size: 11px !important;
        padding: 6px 8px;
    }
}

/* ========================================== */
/* ===== القسم الرئيسي - HERO SECTION ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .hero {
        padding: 50px 15px;
    }
    
    .hero h1 {
        font-size: 32px !important;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 18px !important;
        margin-bottom: 25px;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 25px !important;
        margin-bottom: 25px;
    }
    
    .stat {
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 28px !important;
    }
    
    .stat-label {
        font-size: 13px !important;
    }
    
    .btn-lg {
        padding: 12px 25px !important;
        font-size: 16px !important;
        width: 100%;
        max-width: 280px;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding: 35px 12px;
    }
    
    .hero h1 {
        font-size: 24px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    .stat-number {
        font-size: 24px !important;
    }
}

/* ========================================== */
/* ===== الاقسام العامة - SECTIONS ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 26px !important;
        margin-bottom: 30px;
    }
    
    .section-dark {
        padding: 40px 15px;
    }
}

/* ========================================== */
/* ===== الكروت والشبكات - CARDS & GRIDS ===== */
/* ========================================== */

@media screen and (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .card {
        border-radius: var(--mobile-radius);
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card h3 {
        font-size: 18px;
    }
    
    .card p {
        font-size: 14px;
    }
}

@media screen and (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================== */
/* ===== المميزات - FEATURES ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .feature {
        padding: 20px;
    }
    
    .feature i {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .feature h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .feature p {
        font-size: 14px;
    }
}

@media screen and (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================== */
/* ===== الازرار - BUTTONS ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .btn {
        min-height: var(--touch-target);
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn-block {
        padding: 14px 20px;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 8px 15px;
        font-size: 13px;
    }
    
    /* مجموعات الازرار */
    .actions,
    .btn-group,
    .buttons-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media screen and (max-width: 600px) {
    .actions,
    .btn-group,
    .buttons-group {
        flex-direction: column;
    }
    
    .actions .btn,
    .btn-group .btn {
        width: 100%;
    }
}

/* ========================================== */
/* ===== النماذج - FORMS ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px !important; /* يمنع الزوم على iOS */
        min-height: var(--touch-target);
        border-radius: 10px;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: left 12px center;
        padding-left: 35px;
    }
    
    /* شبكة الادخال */
    .input-section {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .input-group {
        margin-bottom: 0;
    }
    
    .input-group input,
    .input-group select {
        font-size: 16px !important;
        min-height: var(--touch-target);
    }
}

@media screen and (max-width: 600px) {
    .input-section {
        grid-template-columns: 1fr !important;
    }
}

@media screen and (max-width: 480px) {
    /* صفوف الادخال المزدوجة */
    .row2,
    .form-row-2 {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    .row3,
    .form-row-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

/* ========================================== */
/* ===== صفحة المصادقة - AUTH PAGES ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .auth-page {
        padding: 15px;
        align-items: flex-start;
        padding-top: 30px;
    }
    
    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .auth-logo i {
        font-size: 40px;
    }
    
    .auth-logo h2 {
        font-size: 22px;
    }
}

/* ========================================== */
/* ===== الدردشة - CHAT ===== */
/* ========================================== */

@media screen and (max-width: 992px) {
    /* تخطيط الدردشة الرئيسي */
    .section > .container > div[style*="grid-template-columns: 200px"] {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
}

@media screen and (max-width: 768px) {
    /* حاوية الدردشة */
    .chat-container {
        height: calc(100vh - 200px);
        border-radius: var(--mobile-radius);
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-header h3 {
        font-size: 16px;
    }
    
    /* الرسائل */
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 10px 12px;
        border-radius: 12px;
    }
    
    .message-name {
        font-size: 12px;
    }
    
    .message-time {
        font-size: 10px;
    }
    
    /* اجراءات الرسالة */
    .message-actions {
        opacity: 1;
        position: static;
        margin-top: 5px;
    }
    
    /* صندوق الادخال */
    .chat-input-container {
        margin: 10px;
        border-radius: var(--mobile-radius);
    }
    
    .chat-input-container textarea {
        padding: 12px;
        font-size: 16px !important;
        min-height: 50px;
    }
    
    .input-actions {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    
    .tool-btn {
        padding: 8px 10px;
        font-size: 18px;
    }
    
    /* معاينة الملف */
    .file-preview {
        padding: 8px 12px;
    }
    
    .file-preview-item {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .file-preview-item img {
        max-width: 60px;
        max-height: 45px;
    }
    
    /* منتقي الايموجي */
    .emoji-picker {
        width: 280px !important;
        max-height: 300px;
        bottom: 60px !important;
        right: 10px !important;
        left: auto !important;
    }
    
    .emoji-item {
        font-size: 20px;
        padding: 3px;
    }
    
    /* غرف الدردشة */
    .chat-rooms-sidebar,
    div[style*="background: #fff"][style*="border-radius: 15px"][style*="padding: 15px"][style*="overflow-y: auto"] {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 10px !important;
        margin-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-rooms-sidebar a,
    div[style*="background: #fff"] > a[style*="display: block"] {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 15px !important;
        font-size: 13px;
    }
    
    /* مودال التعديل */
    .edit-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* مؤشر الكتابة */
    .typing-indicator {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* الرد على رسالة */
    .reply-preview {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* ردود الفعل */
    .reaction-picker {
        bottom: auto;
        top: 100%;
    }
}

/* ========================================== */
/* ===== المنتدى - FORUM ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .forum-section {
        border-radius: var(--mobile-radius);
        margin-bottom: 15px;
    }
    
    .forum-section-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .forum-section-header i {
        font-size: 24px;
    }
    
    .forum-section-header h3 {
        font-size: 16px;
    }
    
    .forum-section-header p {
        font-size: 13px;
    }
    
    /* قائمة المواضيع */
    .forum-section > div[style*="padding: 20px"] {
        padding: 12px !important;
    }
    
    .forum-section div[style*="padding: 10px 0"] {
        padding: 12px 0 !important;
    }
    
    .forum-section a[style*="color: var(--primary)"] {
        font-size: 15px !important;
        display: block;
        margin-bottom: 5px;
    }
    
    .forum-section div[style*="font-size: 13px"] {
        font-size: 12px !important;
    }
    
    /* زر موضوع جديد */
    div[style*="text-align: left"] {
        text-align: center !important;
    }
    
    div[style*="text-align: left"] .btn {
        width: 100%;
    }
}

/* ========================================== */
/* ===== صفحة الموضوع - TOPIC ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .topic-title {
        font-size: 20px !important;
    }
    
    .post-content {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .post-meta {
        font-size: 12px;
    }
    
    /* التصويت */
    .vote-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .vote-btn {
        min-width: 60px;
        padding: 8px 12px;
    }
}

/* ========================================== */
/* ===== الادوات - TOOLS ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .tools-hero {
        padding: 40px 15px;
        border-radius: 15px;
        margin: 10px;
    }
    
    .tools-hero h1 {
        font-size: 24px;
    }
    
    .tools-hero p {
        font-size: 14px;
    }
    
    .tools-hero::before {
        font-size: 100px;
        opacity: 0.03;
    }
    
    .tools-section {
        padding: 30px 0;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    .section-title p {
        font-size: 14px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .tool-card {
        border-radius: 15px;
    }
    
    .tool-header {
        padding: 20px;
    }
    
    .tool-icon {
        font-size: 40px;
    }
    
    .tool-header h3 {
        font-size: 18px;
    }
    
    .tool-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .tool-body {
        padding: 20px;
    }
    
    .tool-body p {
        font-size: 13px;
    }
    
    .tool-features li {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .tool-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* خدمات المنصة */
    .services-section {
        padding: 40px 15px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-card h4 {
        font-size: 16px;
    }
    
    .service-card p {
        font-size: 13px;
    }
}

/* ========================================== */
/* ===== التقويم - CALENDAR ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .calendar-header {
        padding: 25px 15px;
        border-radius: 15px;
        margin: 10px;
    }
    
    .calendar-header h1 {
        font-size: 22px;
    }
    
    .calendar-header .date {
        font-size: 16px;
    }
    
    .calendar-header .time {
        font-size: 13px;
    }
    
    .location-info {
        font-size: 11px;
        padding: 8px 10px;
        margin: 0 10px 15px;
    }
    
    .nav-buttons {
        gap: 8px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .nav-buttons button {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    /* شبكة التقويم الفلكي */
    .astro-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
        padding: 0 10px;
    }
    
    .astro-card {
        padding: 20px;
        border-radius: var(--mobile-radius);
    }
    
    .astro-card h3 {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    /* طور القمر */
    .moon-phase {
        padding: 10px;
    }
    
    .moon-icon {
        font-size: 50px;
    }
    
    .moon-name {
        font-size: 18px;
    }
    
    .moon-percent {
        font-size: 13px;
    }
    
    .moon-sign {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    /* اوقات الشمس */
    .sun-times {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .sun-time-item {
        padding: 10px;
    }
    
    .sun-time-item i {
        font-size: 18px;
    }
    
    .sun-time-item .time {
        font-size: 14px;
    }
    
    .sun-time-item .label {
        font-size: 10px;
    }
    
    /* الساعات الفلكية */
    .planetary-hours {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px;
    }
    
    .hour-item {
        padding: 6px 4px;
        font-size: 9px;
    }
    
    .hour-planet {
        font-size: 14px;
    }
    
    /* قائمة الكواكب */
    .planet-list {
        padding: 0;
    }
    
    .planet-item {
        padding: 8px 0;
    }
    
    .planet-symbol {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .planet-name {
        font-size: 14px;
    }
    
    .planet-degree {
        font-size: 11px;
    }
    
    /* جدول الحظوظ */
    .dignity-table {
        font-size: 11px;
    }
    
    .dignity-table th,
    .dignity-table td {
        padding: 6px 4px;
    }
    
    /* شبكة الابراج */
    .zodiac-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .zodiac-item {
        padding: 10px 6px;
    }
    
    .zodiac-icon {
        font-size: 20px;
    }
    
    .zodiac-name {
        font-size: 10px;
    }
    
    /* تقويم الشهر */
    .month-calendar {
        padding: 15px;
        margin: 15px 10px;
        border-radius: var(--mobile-radius);
    }
    
    .month-header {
        margin-bottom: 10px;
    }
    
    .month-name {
        font-size: 16px;
    }
    
    .week-day {
        padding: 6px;
        font-size: 10px;
    }
    
    .month-days {
        gap: 3px;
    }
    
    .day-cell {
        font-size: 12px;
        border-radius: 6px;
    }
    
    .day-cell .moon-mini {
        font-size: 8px;
    }
}

/* ========================================== */
/* ===== رسم الخارطة - CHART BUILDER ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .chart-builder {
        margin: 10px;
        border-radius: var(--mobile-radius);
    }
    
    .chart-header {
        padding: 15px;
    }
    
    .chart-header h2 {
        font-size: 20px;
    }
    
    .chart-header p {
        font-size: 13px;
    }
    
    .chart-body {
        padding: 15px;
    }
    
    /* حاوية الخارطة */
    .chart-canvas-container {
        padding: 10px;
        min-height: 350px;
    }
    
    #chartCanvas {
        max-width: 100%;
        height: auto !important;
    }
    
    /* جدول الكواكب */
    .planets-table {
        font-size: 12px;
    }
    
    .planets-table th,
    .planets-table td {
        padding: 8px 4px;
    }
    
    .zodiac-symbol {
        font-size: 16px;
    }
}

/* ========================================== */
/* ===== الاحداث الفلكية - ASTRO EVENTS ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .day-header h2 {
        font-size: 16px !important;
    }
    
    .event-info h4 {
        font-size: 14px !important;
    }
    
    .event-info .time {
        font-size: 12px !important;
    }
    
    .meaning {
        font-size: 13px !important;
        line-height: 1.7;
    }
    
    .field-item h5 {
        font-size: 12px !important;
    }
    
    .field-item p {
        font-size: 12px !important;
    }
    
    .advice-box p,
    .mundane-box p {
        font-size: 13px !important;
    }
    
    .astro-event {
        flex-direction: column;
        gap: 10px;
    }
    
    .astro-event-date {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .astro-event-day {
        font-size: 22px;
    }
    
    .astro-event-month {
        font-size: 11px;
    }
    
    .astro-event-title {
        font-size: 15px;
    }
    
    .astro-event-desc {
        font-size: 12px;
    }
}

/* ========================================== */
/* ===== التوافق - COMPATIBILITY ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .score-circle {
        width: 120px !important;
        height: 120px !important;
        font-size: 36px !important;
    }
    
    .planets-tbl {
        font-size: 12px !important;
    }
    
    .asp-item {
        font-size: 12px !important;
    }
    
    .analysis-section p {
        font-size: 13px !important;
    }
}

/* ========================================== */
/* ===== الكتب والبرامج - BOOKS & SOFTWARE ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .charts-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .chart-card {
        border-radius: 10px;
    }
    
    .chart-card-info {
        padding: 10px;
    }
    
    .chart-card-title {
        font-size: 13px;
    }
    
    .chart-card-date {
        font-size: 11px;
    }
}

@media screen and (max-width: 480px) {
    .charts-gallery {
        grid-template-columns: 1fr;
    }
}

/* ========================================== */
/* ===== الدورات - COURSES ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .course-title {
        font-size: 18px !important;
    }
    
    .course-desc {
        font-size: 13px !important;
    }
    
    .lesson-title {
        font-size: 15px !important;
    }
}

/* ========================================== */
/* ===== الملف الشخصي - PROFILE ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .astro-profile {
        padding: 20px;
        border-radius: var(--mobile-radius);
    }
    
    .zodiac-symbol {
        font-size: 50px;
    }
    
    .zodiac-name {
        font-size: 20px;
    }
    
    .birth-info {
        font-size: 13px;
    }
    
    /* احصائيات المستخدم */
    .user-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .user-stat-item {
        font-size: 12px;
    }
}

/* ========================================== */
/* ===== لوحة التحكم - DASHBOARD ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-card {
        padding: 20px;
    }
}

/* ========================================== */
/* ===== الرسائل - MESSAGES ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .message-text {
        font-size: 15px !important;
    }
    
    .message-time {
        font-size: 11px !important;
    }
    
    .messages-list {
        padding: 10px;
    }
}

/* ========================================== */
/* ===== الجداول - TABLES ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 6px;
    }
    
    /* تحويل الجداول لبطاقات على الموبايل */
    table.responsive-table {
        display: block;
    }
    
    table.responsive-table thead {
        display: none;
    }
    
    table.responsive-table tbody {
        display: block;
    }
    
    table.responsive-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        padding: 10px;
        background: #fff;
    }
    
    table.responsive-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    table.responsive-table td:last-child {
        border-bottom: none;
    }
    
    table.responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
}

/* ========================================== */
/* ===== التبويبات - TABS ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        flex-shrink: 0;
        padding: 10px 15px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* ========================================== */
/* ===== التنبيهات والاشعارات - ALERTS ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .notifications-panel {
        width: calc(100vw - 20px) !important;
        max-width: 320px;
        right: 10px !important;
        left: auto !important;
    }
}

/* ========================================== */
/* ===== البحث - SEARCH ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        font-size: 16px !important;
        padding: 12px 50px 12px 15px;
    }
    
    .search-box button {
        width: 40px;
        height: 40px;
    }
}

/* ========================================== */
/* ===== الشارات - BADGES ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ========================================== */
/* ===== الحالة الفارغة - EMPTY STATE ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state i {
        font-size: 50px;
    }
    
    .empty-state p {
        font-size: 14px;
    }
}

/* ========================================== */
/* ===== الفوتر - FOOTER ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    .footer {
        padding: 20px 15px;
    }
    
    .footer p {
        font-size: 13px;
    }
}

/* ========================================== */
/* ===== عناصر متنوعة - MISC ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    /* زر العودة للاعلى */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 18px;
    }
    
    /* شريط تنسيق النص */
    .format-toolbar {
        flex-wrap: wrap;
        gap: 3px;
        padding: 8px;
    }
    
    .format-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    /* الاعضاء المتصلين */
    .online-users-panel {
        padding: 12px;
    }
    
    .online-users-panel h4 {
        font-size: 14px;
    }
    
    .active-user {
        padding: 6px 12px;
    }
    
    .active-user-avatar {
        width: 25px;
        height: 25px;
        font-size: 11px;
    }
    
    /* مؤشر التحميل */
    .loading-spinner {
        width: 25px;
        height: 25px;
    }
    
    /* سؤال اليوم */
    .daily-question {
        padding: 20px;
    }
    
    .daily-question h3 {
        font-size: 16px;
    }
    
    .daily-question .question-text {
        font-size: 15px;
    }
    
    .daily-question .option {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* الموضوع المثبت والمغلق */
    .topic-pinned,
    .topic-locked {
        padding: 12px;
    }
}

/* ========================================== */
/* ===== اخفاء عناصر على الموبايل ===== */
/* ========================================== */

@media screen and (max-width: 1024px) {
    .hide-mobile,
    .desktop-only {
        display: none !important;
    }
}

/* ========================================== */
/* ===== اظهار عناصر على الموبايل فقط ===== */
/* ========================================== */

.show-mobile,
.mobile-only {
    display: none !important;
}

@media screen and (max-width: 1024px) {
    .show-mobile,
    .mobile-only {
        display: block !important;
    }
}

/* ========================================== */
/* ===== تحسينات الاداء والوصول ===== */
/* ========================================== */

@media screen and (max-width: 768px) {
    /* تقليل الحركات للاجهزة البطيئة */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation: none !important;
            transition: none !important;
        }
    }
    
    /* تحسين التباين */
    @media (prefers-contrast: high) {
        body {
            font-weight: 500;
        }
        
        .btn, button, a {
            text-decoration: underline;
        }
    }
}

/* ========================================== */
/* ===== تصحيحات خاصة للشاشات الصغيرة جدا ===== */
/* ========================================== */

@media screen and (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .hero h1 {
        font-size: 20px !important;
    }
    
    .section-title {
        font-size: 20px !important;
    }
    
    .nav a {
        font-size: 11px !important;
        padding: 5px 8px;
    }
    
    .planetary-hours {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
