/* أساسيات التطبيق */
.franco-app {
    background: #fbfcfd;
    min-height: 100vh;
    padding: 12px;
}

.franco-app * {
    box-sizing: border-box;
}

/* الهيدر */
.franco-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.franco-header h1 {
    font-size: 24px;
    margin: 0;
    color: #0b74de;
}

.franco-dialect-selector {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

#franco_dialect {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    background: #fff;
    min-width: 150px;
}

.franco-dialect-info {
    color: #666;
    font-size: 14px;
}




/* تنسيق مجموعة أزرار اللهجات الجديدة */
.franco-dialect-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.franco-dialect-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #e6eef8;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 70px;
    position: relative;
    overflow: hidden;
}

.franco-dialect-btn:hover {
    border-color: #0b74de;
    background: #f5f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11,116,222,0.15);
}

.franco-dialect-btn.active {
    border-color: #0b74de;
    background: linear-gradient(135deg, #0b74de 0%, #1e88e5 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(11,116,222,0.25);
}

/* تأثير النقر */
.franco-dialect-btn:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* الأيقونات */
.dialect-icon {
    font-size: 20px;
    margin-bottom: 6px;
    transition: transform 0.3s;
}

.franco-dialect-btn:hover .dialect-icon {
    transform: scale(1.2);
}

.franco-dialect-btn.active .dialect-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* اسم اللهجة */
.dialect-name {
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.franco-dialect-btn.active .dialect-name {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* علامة الاختيار */
.dialect-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s;
}

.franco-dialect-btn.active .dialect-check {
    opacity: 1;
    transform: scale(1);
}

/* تأثير موجة عند النقر */
@keyframes dialectRipple {
    0% {
        box-shadow: 0 0 0 0 rgba(11,116,222,0.4);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(11,116,222,0);
    }
}

.franco-dialect-btn.active {
    animation: dialectRipple 0.6s ease-out;
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .franco-dialect-buttons {
        gap: 6px;
    }
    
    .franco-dialect-btn {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .dialect-icon {
        font-size: 18px;
    }
    
    .dialect-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .franco-dialect-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .franco-dialect-btn {
        flex: 1;
        min-width: 0;
        max-width: 80px;
    }
}


/* قسم الإدخال والإخراج */
.franco-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.franco-io-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 768px) {
    .franco-io-container {
        grid-template-columns: 1fr;
    }
}

/* الكاردات */
.franco-input-card,
.franco-output-card {
    background: #fff;
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(11,116,222,0.08);
    height: 300px; /* ارتفاع ثابت */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* منع التوسع */
}
.franco-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f9;
}

.franco-card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 17px;
    font-weight: 700;
    padding-right: 8px;}

/* أزرار التحكم */
.franco-input-actions,
.franco-output-actions {
    display: flex;
    gap: 6px;
}

.franco-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.franco-btn:hover {
    background: #f5f9ff;
}

.franco-btn.small {
    padding: 4px 8px;
    font-size: 12px;
}

.franco-btn.icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.franco-btn.icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#franco_clear {
    color: #dc3545;
    border-color: #ffccd5;
    background: linear-gradient(to bottom, #fff, #fff5f7);
}

#franco_clear:hover {
    background: linear-gradient(to bottom, #dc3545, #c82333);
    color: white;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

#franco_clear:active {
    transform: translateY(0);
}

/* زر مسح حرف - برتقالي */
#franco_clear_char {
    color: #fd7e14;
    border-color: #ffe5d0;
    background: linear-gradient(to bottom, #fff, #fff9f5);
}

#franco_clear_char:hover {
    background: linear-gradient(to bottom, #fd7e14, #e96a00);
    color: white;
    border-color: #fd7e14;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.25);
}

/* زر سطر جديد - أزرق */
#franco_new_line {
    color: #0b74de;
    border-color: #d4e7ff;
    background: linear-gradient(to bottom, #fff, #f5faff);
}

#franco_new_line:hover {
    background: linear-gradient(to bottom, #0b74de, #0a6ed5);
    color: white;
    border-color: #0b74de;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 116, 222, 0.25);
}

/* تأثير للأيقونات داخل الأزرار */
.franco-input-actions .franco-btn.icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.franco-input-actions .franco-btn.icon:hover svg {
    transform: scale(1.1);

}
/* تأثير اهتزاز خفيف عند النقر */
@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.franco-input-actions .franco-btn.icon:active,
.franco-output-actions .franco-btn.icon:active {
    animation: buttonClick 0.2s ease;
}
#franco_copy {
    color: #28a745;
    border-color: #d4edda;
    background: linear-gradient(to bottom, #fff, #f5fff8);
}

#franco_copy:hover {
    background: linear-gradient(to bottom, #28a745, #218838);
    color: white;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

#franco_copy:active {
    transform: translateY(0);
}

/* زر التحميل - أزرق غامق */
#franco_download {
    color: #17a2b8;
    border-color: #d1ecf1;
    background: linear-gradient(to bottom, #fff, #f7fdff);
}

#franco_download:hover {
    background: linear-gradient(to bottom, #17a2b8, #138496);
    color: white;
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.25);
}

/* زر السماع - بنفسجي */
#franco_speak {
    color: #6f42c1;
    border-color: #e9deff;
    background: linear-gradient(to bottom, #fff, #f9f5ff);
}

#franco_speak:hover {
    background: linear-gradient(to bottom, #6f42c1, #5a32a3);
    color: white;
    border-color: #6f42c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.25);
}

/* تأثير للأيقونات داخل أزرار الإخراج */
.franco-output-actions .franco-btn.icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.franco-output-actions .franco-btn.icon:hover svg {
    transform: scale(1.1);
}
/* زر التبديل الجديد */
.franco-btn.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(11,116,222,0.12);
  background: #fff;
  color: #0b74de;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  min-height: 40px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* إضافة الانتقال */
}

/* أيقونة داخل الزر */
.franco-btn.switch svg { stroke: currentColor; width: 18px; height: 18px; }

/* تأثيرات متقدمة للزر عند التبديل */
.franco-btn.switch.active {
  background: #0b74de;
  color: #fff;
  border-color: #0b74de;
  transform: translateY(-2px); /* رفع خفيف */
  box-shadow: 0 4px 12px rgba(11,116,222,0.25); /* ظل أكبر */
}

/* تأثير عند الضغط على الزر */
.franco-btn.switch:active {
  transform: translateY(0);
  transition: transform 0.1s;
}

/* تأثير تحويم إضافي */
.franco-btn.switch:hover:not(.active) {
  background: #f0f7ff;
  border-color: rgba(11,116,222,0.3);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* تأثير تحويم عند الحالة النشطة */
.franco-btn.switch.active:hover {
  background: #0a6ed5;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(11,116,222,0.3);
}
/* تأثير للأيقونة داخل الزر */
.franco-btn.switch svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.franco-btn.switch.active svg {
  transform: rotate(180deg); /* تدوير الأيقونة عند التبديل */
}

/* تأثير ناعم للنص */
.franco-btn.switch .btn-label {
  transition: opacity 0.2s ease;
}

.franco-btn.switch:hover .btn-label {
  opacity: 0.95;
}
/* تأثير وميض بسيط عند التبديل */
@keyframes switchPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(11,116,222,0.25);
  }
  50% {
    box-shadow: 0 4px 20px rgba(11,116,222,0.4);
  }
}

.franco-btn.switch.active {
  animation: switchPulse 1s ease;
}

.franco-btn.switch.active svg { stroke: #fff; }

/* خفض النص على شاشات صغيرة */
@media (max-width: 600px) {
  .franco-btn.switch { padding: 8px 12px; gap: 6px; min-width: auto; }
  .franco-btn.switch .btn-label { display: inline; font-size: 12px; } /* نعرض النص والأيقونة */
}

/* حاوية التحميل */
.franco-download-wrap {
    position: relative;
}

.franco-download-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
    z-index: 100;
    min-width: 150px;
    border: 2px solid #e0e8f3;
    margin-top: 5px;
}

.franco-download-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.franco-download-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s ease;
}

.franco-download-menu button:hover {
    background: #f5f9ff;
    color: #0b74de;
    padding-right: 20px;
}

.franco-download-menu button:not(:last-child) {
    border-bottom: 1px solid #f0f4f9;
}

/* تخصيص ألوان أزرار القائمة المنسدلة */
.franco-download-menu button[data-type="text"] {
    color: #17a2b8;
}

.franco-download-menu button[data-type="json"] {
    color: #28a745;
}

.franco-download-menu button[data-type="image"] {
    color: #6f42c1;
}
/* حقول النص */
.franco-input,
.franco-output {
    width: 100%;
    min-height: 120px;
    height: calc(100% - 80px); /* يأخذ باقي المساحة */
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e7eef8;
    font-size: 16px;
    resize: none; /* إزالة إمكانية التوسع */
    line-height: 1.6;
    background: #fff;
    overflow-y: auto; /* إضافة سكرول داخلي */
    box-sizing: border-box;
    flex-grow: 1; /* يأخذ المساحة المتاحة */
}

.franco-output {
    background: #f9fcff;
    direction: rtl;
    white-space: pre-wrap;
}

/* إصلاح التصميم على الكمبيوتر */
@media (min-width: 769px) {
    .franco-io-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        min-height: 300px;
    }
    
    .franco-input-card,
    .franco-output-card {
        height: 350px;
    }
}

/* إصلاح التصميم على الموبايل */
@media (max-width: 768px) {
    .franco-io-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .franco-input-card,
    .franco-output-card {
        height: 250px;
    }
}
.franco-input:focus {
    outline: none;
    border-color: #0b74de;
}

.franco-output {
    background: #f9fcff;
    overflow-y: auto;
    direction: rtl;
    white-space: pre-wrap;
}

/* الميتادات */
.franco-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

/* قسم الكيبورد */
.franco-keyboard-section {
    background: #fff;
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(11,116,222,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* الكيبورد الرئيسية */
.franco-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 14px;
    background: #f9fbff;
    border-radius: 14px;
    border: 2px solid #e0e8f3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.kb-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    flex-wrap: nowrap;
}

.kb-key {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px;
    border-radius: 8px;
    background: #f0f7ff;
    border: 1px solid #3498db;
    cursor: pointer;
    flex: 0 1 auto;
    min-width: 0;
    height: 40px;
    font-size: 12px;
    transition: all .12s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.kb-key:hover {
    transform: translateY(-2px);
    border-color: #0b74de;
    background: #fff;
}

.kb-key.kb-wide {
    flex: 0 1 84px;
}

.kb-key.kb-space {
    flex: 0 1 120px;
}

.kb-key .lat {
    font-weight: 700;
    line-height: 1.1;
    font-size: 12px;
    white-space: nowrap;
}

.kb-key .arb {
    font-size: 11px;
    color: #666;
    line-height: 1.1;
    direction: rtl;
    white-space: nowrap;
}

/* المفاتيح الخاصة */
.franco-special-keys {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 8px;
}

.franco-special-key {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    background: #fff;
    cursor: pointer;
    color: #0b74de;
    font-size: 13px;
    white-space: nowrap;
}

.franco-special-key:hover {
    background: #eaf4ff;
    border-color: #0b74de;
}

/* الكلمات السريعة */
.franco-quick-words {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.franco-quick-words button {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    background: #fff;
    cursor: pointer;
    color: #0b74de;
    font-size: 13px;
}

.franco-quick-words button:hover {
    background: #eaf4ff;
    border-color: #0b74de;
}

/* أزرار البحث */
.franco-search-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 2px solid #e7eef8;
    margin-top: 8px;
    padding: 12px;
    border: 2px solid #e0e8f3;
    border-radius: 14px;
    background: linear-gradient(to bottom, #ffffff, #fafcff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.franco-search-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e6eef8;
    background: #fff;
    cursor: pointer;
    color: #0b74de;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.franco-search-btn:hover {
    background: #eaf4ff;
    border-color: #0b74de;
}

.franco-search-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* ألوان أزرار البحث حسب المنصة */
.franco-search-btn[data-site="google"] {
    background: #4285f4;
    color: #fff;
    border-color: #4285f4;
}

.franco-search-btn[data-site="google"]:hover {
    background: #4285f4;
    color: #fff;
    border-color: #4285f4;
}

.franco-search-btn[data-site="bing"] {
    background: #008373;
    color: #fff;
    border-color: #008373;
}

.franco-search-btn[data-site="bing"]:hover {
    background: #008373;
    color: #fff;
    border-color: #008373;
}

.franco-search-btn[data-site="facebook"] {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.franco-search-btn[data-site="facebook"]:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.franco-search-btn[data-site="twitter"] {
    background: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

.franco-search-btn[data-site="twitter"]:hover {
    background: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

.franco-search-btn[data-site="youtube"] {
    background: #ff0000;
    color: #fff;
    border-color: #fff;
}

.franco-search-btn[data-site="youtube"]:hover {
    background: #ff0000;
    color: #fff;
    border-color: #ff0000;
}

/* تحسين الأيقونات داخل أزرار البحث */
.franco-search-btn svg {
    transition: transform 0.2s ease;
}

.franco-search-btn:hover svg {
    transform: scale(1.1);
}

/* قسم المفاتيح الخاصة والكلمات السريعة */
.franco-keyboard-extras {
    margin-top: 12px;
    padding: 14px;
    border: 2px solid #e0e8f3;
    border-radius: 14px;
    background: linear-gradient(to bottom, #ffffff, #fafcff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.franco-special-keys {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e7eef8;
}

.franco-quick-words {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0;
}

/* تحسين أزرار المفاتيح الخاصة */
.franco-special-key {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e6eef8;
    background: linear-gradient(to bottom, #ffffff, #f8fbff);
    cursor: pointer;
    color: #0b74de;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.franco-special-key:hover {
    background: linear-gradient(to bottom, #eaf4ff, #f0f8ff);
    border-color: #0b74de;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(11,116,222,0.15);
}

/* تحسين أزرار الكلمات السريعة */
.franco-quick-words button {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e6eef8;
    background: linear-gradient(to bottom, #ffffff, #f8fbff);
    cursor: pointer;
    color: #0b74de;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.franco-quick-words button:hover {
    background: linear-gradient(to bottom, #eaf4ff, #f0f8ff);
    border-color: #0b74de;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(11,116,222,0.15);
}
/* الاقتراحات */
/* قائمة الاقتراحات - حل نهائي */
/* قائمة الاقتراحات - ثابتة نهائياً */
#franco_suggestions {
    display: none;
    position: absolute; /* سيتم وضعها داخل .franco-input-card */
    top: 0;
    right: 14px; /* RTL: نلصقها من اليمين داخل الكارد */
    width: min(320px, calc(100% - 28px));
    max-height: 50vh;
    overflow-y: auto;
    z-index: 1100;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(11,116,222,0.12);
    border: 1px solid rgba(11,116,222,0.08);
    text-align: right;
    direction: rtl;
    transform: none;
}

/* ظهور */
#franco_suggestions.show { display: block; animation: fadeInUp .12s ease-out; }

/* عناصر داخل القائمة */
#franco_suggestions .suggestion-title { font-weight:700; font-size:14px; color:#0b74de; margin-bottom:6px; }
#franco_suggestions button { display:block; width:100%; padding:8px 10px; border:none; background:transparent; cursor:pointer; text-align:right; border-radius:6px; font-size:14px; color:#213547; transition:background .12s; }
#franco_suggestions button:hover { background:#f1f8ff; transform:translateY(-1px); }
#franco_suggestions .suggestion-close { margin-top:6px; font-weight:700; color:#888; }

/* small screens fallback */
@media (max-width:420px) {
    #franco_suggestions { width: calc(100% - 24px); right: 12px; left: 12px; top: auto; }
}

.franco-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.franco-toast.show {
    opacity: 1;
}

/* أحجام الكيبورد على الكمبيوتر */
@media (min-width: 901px) {
    .franco-keyboard {
        max-width: 100%;
    }
    
    .kb-key {
        flex: 0 1 65px;
        min-width: 55px;
        height: 60px;
        font-size: 16px;
    }
    
    .kb-key .lat {
        font-size: 17px;
    }
    
    .kb-key .arb {
        font-size: 15px;
    }
    
    .kb-key.kb-wide {
        flex: 0 1 130px;
    }
    
    .kb-key.kb-space {
        flex: 0 1 380px;
    }
}

/* أحجام الموبايل */
@media (max-width: 900px) {
    .franco-keyboard {
        max-width: 100%;
        padding: 6px;
        gap: 4px;
    }
    
    .kb-row {
        gap: 2px;
        min-height: 38px;
    }
    
    .kb-key {
        height: 36px;
        padding: 4px;
        font-size: 11px;
        flex-shrink: 1;
    }
    
    .kb-key.kb-wide {
        flex: 0 1 70px;
    }
    
    .kb-key.kb-space {
        flex: 0 1 100px;
    }
}

@media (max-width: 768px) {
    .franco-search-buttons {
        padding: 10px;
        gap: 6px;
	}
        .franco-keyboard-extras {
        padding: 10px;
    }
    .franco-search-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .franco-search-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .franco-special-keys,
    .franco-quick-words {
        gap: 6px;
    }
        .franco-special-key,
    .franco-quick-words button {
        padding: 6px 10px;
        font-size: 12px;
    }
}


@media (max-width: 420px) {
    .franco-keyboard-section {
        padding: 10px;
    }
    
    .kb-row {
        gap: 1px;
        min-height: 34px;
    }
    
    .kb-key {
        height: 32px;
        padding: 3px;
        font-size: 10px;
    }
    
    .kb-key .lat {
        font-size: 10px;
    }
    
    .kb-key .arb {
        font-size: 9px;
    }
    
    .kb-key.kb-wide {
        flex: 0 1 60px;
    }
    
    .kb-key.kb-space {
        flex: 0 1 80px;
    }
    
    .franco-search-buttons {
        gap: 4px;
    }
    
    .franco-search-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .franco-search-btn svg {
        width: 10px;
        height: 10px;
    }
}

.franco-tool-guide>*:not(:last-child){margin-bottom:20px}
.franco-tool-guide .franco-card{padding:25px}
.franco-tool-guide .franco-section-title{font-size:20px;color:#0b74de;margin:0 0 25px;padding-bottom:10px;border-bottom:2px solid #e7eef8}

/* مقدمة الأداة */
.franco-tool-intro .franco-intro-title{font-size:28px;color:#0b74de;margin:0 0 20px;line-height:1.3}
.franco-tool-intro .franco-intro-text{font-size:18px;line-height:1.7;color:#444;margin-bottom:0}

/* ميزات الأداة */
.franco-tool-features .franco-features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-top:20px}
.franco-tool-features .franco-feature-card{padding:20px;background:#f9fbff;border-radius:12px;border:1px solid #e7eef8;transition:transform .2s}
.franco-tool-features .franco-feature-card:hover{transform:translateY(-5px)}
.franco-tool-features .franco-feature-card h3{font-size:18px;color:#0b74de;margin:0 0 10px}
.franco-tool-features .franco-feature-card p{font-size:15px;line-height:1.5;margin:0;color:#555}

/* أوضاع الأداة */
.franco-tool-modes .franco-modes-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:25px;margin-top:20px}
.franco-tool-modes .franco-mode-card{padding:25px;background:#fff;border-radius:12px;border:1px solid #e7eef8;box-shadow:0 4px 12px rgba(0,0,0,0.05)}
.franco-tool-modes .franco-mode-header{display:flex;align-items:center;gap:15px;margin-bottom:15px}
.franco-tool-modes .franco-mode-icon{font-size:30px}
.franco-tool-modes .franco-mode-card h3{font-size:18px;color:#0b74de;margin:0}
.franco-tool-modes .franco-mode-card p{font-size:16px;line-height:1.6;margin-bottom:15px;color:#444}
.franco-tool-modes .franco-mode-example{background:#eef7ff;padding:10px 15px;border-radius:8px;font-size:14px;color:#0b74de}

/* خطوات الاستخدام */
.franco-tool-steps .franco-steps-list{margin-top:20px}
.franco-tool-steps .franco-step-item{display:flex;gap:20px;margin-bottom:25px;padding-bottom:25px;border-bottom:1px solid #e7eef8}
.franco-tool-steps .franco-step-item:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}
.franco-tool-steps .franco-step-number{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:50px;height:50px;background:#0b74de;color:#fff;border-radius:50%;font-size:22px;font-weight:bold}
.franco-tool-steps .franco-step-content{flex:1}
.franco-tool-steps .franco-step-content h3{font-size:18px;color:#0b74de;margin:0 0 10px}
.franco-tool-steps .franco-step-content p{font-size:16px;line-height:1.6;margin:0;color:#444}

/* حالات الاستخدام */
.franco-tool-uses .franco-uses-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-top:20px}
.franco-tool-uses .franco-use-card{padding:20px;background:#fff;border-radius:12px;border:1px solid #e7eef8}
.franco-tool-uses .franco-use-card h3{font-size:18px;color:#0b74de;margin:0 0 10px}
.franco-tool-uses .franco-use-card p{font-size:15px;line-height:1.5;margin:0;color:#555}

/* الأسئلة الشائعة */
.franco-tool-faq .franco-faq-list{margin-top:20px}
.franco-tool-faq .franco-faq-item{margin-bottom:20px;padding:20px;background:#f9fbff;border-radius:10px;border:1px solid #e7eef8}
.franco-tool-faq .franco-faq-item:last-child{margin-bottom:0}
.franco-tool-faq .franco-faq-item h3{font-size:18px;color:#0b74de;margin:0 0 10px}
.franco-tool-faq .franco-faq-item p{font-size:15px;line-height:1.5;margin:0;color:#555}

/* معلومات إضافية عن الأداة */
.franco-tool-info .franco-info-text{font-size:16px;line-height:1.7;color:#444;margin-bottom:20px}
.franco-tool-info .franco-info-list{padding-right:25px;margin:0}
.franco-tool-info .franco-info-list li{font-size:15px;line-height:1.6;margin-bottom:8px;color:#444}

/* التجاوب للشاشات الصغيرة لقسم الشرح */
@media (max-width:768px){
  .franco-tool-intro .franco-intro-title{font-size:24px}
  .franco-tool-intro .franco-intro-text{font-size:16px}
  .franco-tool-guide .franco-section-title{font-size:22px}
  .franco-tool-features .franco-features-grid,
  .franco-tool-modes .franco-modes-grid,
  .franco-tool-uses .franco-uses-grid{grid-template-columns:1fr;gap:15px}
  .franco-tool-steps .franco-step-item{flex-direction:column;gap:15px}
  .franco-tool-steps .franco-step-number{width:40px;height:40px;font-size:20px}
  .franco-tool-info .franco-info-list{padding-right:20px}
}
/* فك رموز الفرانكو */
.franco-tool-rules .franco-rules-intro{
  font-size:16px;
  line-height:1.7;
  color:#444;
  margin-bottom:25px;
}

.franco-tool-rules .franco-rules-box{
  background:#f9fbff;
  border:1px solid #e7eef8;
  border-radius:12px;
  padding:25px;
  margin-bottom:25px;
}

.franco-tool-rules .franco-rules-box h3{
  font-size:18px;
  color:#0b74de;
  margin:0 0 15px;
}

.franco-tool-rules .franco-rules-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px 20px;
  margin:0;
  padding:0;
  list-style:none;
}

.franco-tool-rules .franco-rules-list li{
  font-size:15px;
  color:#444;
  line-height:1.6;
}

.franco-tool-rules .franco-rules-list strong{
  color:#0b74de;
  font-weight:600;
}

.franco-tool-rules .franco-dialects{
  margin-top:20px;
}

.franco-tool-rules .franco-dialect-item{
  background:#fff;
  border:1px solid #e7eef8;
  border-radius:10px;
  padding:15px 20px;
  margin-bottom:15px;
}

.franco-tool-rules .franco-dialect-item h4{
  font-size:16px;
  color:#0b74de;
  margin:0 0 8px;
}

.franco-tool-rules .franco-dialect-item p{
  font-size:15px;
  color:#444;
  line-height:1.6;
  margin:0;
}

.franco-tool-rules .franco-rules-footer, .franco-tool-features{
  font-size:16px;
  line-height:1.8;
  color:#444;
  background:#eef7ff;
  padding:20px;
  border-radius:12px;
  border:1px solid #e7eef8;
}

/* موبايل */
@media (max-width:768px){
  .franco-tool-rules .franco-rules-list{
    grid-template-columns:1fr;
  }
}
