/* Custom styles for Darija Translator - Now with Google Translate inspired mobile UI */

:root {
    --lime-green: rgb(10, 88, 202);
    --dark-lime: rgb(8, 70, 161);
    --white: #FFFFFF;
    --offwhite: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #CED4DA;
    --dark-gray: #6C757D;
    --text-gray: #212529;
    --text-dark: #000000;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    
    /* Google Translate colors */
    --google-blue: #4285f4;
    --google-light-blue: #e8f0fe;
    --google-gray: #000000;
    --google-light-gray: #f1f3f4;
    --google-background: #ffffff;
    --google-border: #dadce0;
}

/* Add custom classes for background colors */
.bg-lime-green {
    background-color: rgb(10, 88, 202)) !important;
}

.text-white {
    color: white !important;
}

.text-muted {
    color: var(--text-dark) !important;
    opacity: 0.8;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* RTL Support */
html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Fix Bootstrap icons and spacing in RTL */
html[dir="rtl"] .fas,
html[dir="rtl"] .far,
html[dir="rtl"] .fab {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .btn .fas,
html[dir="rtl"] .btn .far,
html[dir="rtl"] .btn .fab {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* RTL Support for Translator Interface */
html[dir="rtl"] .translation-panels {
    direction: rtl;
}

html[dir="rtl"] .translation-panel {
    direction: rtl;
}

html[dir="rtl"] .panel-actions {
    direction: rtl;
}

html[dir="rtl"] .panel-actions .d-flex {
    flex-direction: row-reverse;
}

html[dir="rtl"] .toggle-switches-container {
    direction: rtl;
}

html[dir="rtl"] .language-controls {
    direction: rtl;
}

html[dir="rtl"] .language-dropdown {
    direction: rtl;
}

html[dir="rtl"] .swap-languages-btn {
    margin: 0 15px;
}

html[dir="rtl"] .char-count {
    direction: rtl;
    text-align: left;
}

html[dir="rtl"] .transliteration-container {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .transliteration-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .translation-controls {
    direction: rtl;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

html[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

/* Fix textarea direction for Arabic */
html[dir="rtl"] textarea {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input[type="text"] {
    direction: rtl;
    text-align: right;
}

/* Fix dropdown menus in RTL */
html[dir="rtl"] .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .dropdown-item {
    text-align: right;
}

/* Fix button groups */
html[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn-group .btn:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

html[dir="rtl"] .btn-group .btn:last-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* RTL Mobile Navigation Fixes */
html[dir="rtl"] .navbar-brand {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .navbar-brand .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .navbar-toggler {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .navbar-collapse {
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
    text-align: right;
}

html[dir="rtl"] .nav-link {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .dropdown-item {
    text-align: right;
    padding-right: 1rem;
    padding-left: 1rem;
}

html[dir="rtl"] .dropdown-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Mobile collapsible menu RTL fixes */
@media (max-width: 767.98px) {
    html[dir="rtl"] .navbar-collapse {
        text-align: right;
        direction: rtl;
    }
    
    html[dir="rtl"] .navbar-nav {
        text-align: right;
        direction: rtl;
        align-items: flex-end;
    }
    
    html[dir="rtl"] .nav-item {
        text-align: right;
        direction: rtl;
        width: 100%;
    }
    
    html[dir="rtl"] .nav-link {
        text-align: right;
        padding-right: 1rem;
        padding-left: 1rem;
        direction: rtl;
        display: block;
        width: 100%;
    }
    
    html[dir="rtl"] .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        direction: rtl;
        text-align: right;
    }
    
    html[dir="rtl"] .dropdown-item {
        text-align: right;
        padding-right: 2rem;
        padding-left: 1rem;
        direction: rtl;
    }
    
    html[dir="rtl"] .dropdown-toggle {
        text-align: right;
        direction: rtl;
    }
    
    html[dir="rtl"] .dropdown-toggle::after {
        margin-left: 0;
        margin-right: 0.255em;
        float: left;
    }
    
    /* Fix navbar brand positioning in mobile RTL */
    html[dir="rtl"] .navbar-brand {
        margin-left: auto;
        margin-right: 0;
        order: 2;
    }
    
    html[dir="rtl"] .navbar-toggler {
        margin-left: 0;
        margin-right: auto;
        order: 1;
    }
    
    html[dir="rtl"] .navbar > .container {
        flex-direction: row-reverse;
    }
}

/* Fix text alignment in RTL */
html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

html[dir="rtl"] .text-center {
    text-align: center !important;
}

/* Fix hero section and main content alignment */
html[dir="rtl"] .hero-section {
    text-align: right;
}

html[dir="rtl"] .hero-title {
    text-align: right;
}

html[dir="rtl"] .hero-subtitle {
    text-align: right;
}

html[dir="rtl"] .container {
    direction: rtl;
}

html[dir="rtl"] .card {
    text-align: right;
}

html[dir="rtl"] .card-title {
    text-align: right;
}

html[dir="rtl"] .card-text {
    text-align: right;
}

/* Clear/Remove button positioning fix for RTL */
html[dir="rtl"] .clear-icon {
    right: auto;
    left: 10px;
}

html[dir="rtl"] .position-relative .clear-icon {
    right: auto;
    left: 10px;
}

/* Translation panel fixes for RTL */
html[dir="rtl"] .translation-panel textarea {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .translation-panel input {
    text-align: right;
    direction: rtl;
}

/* Language selector RTL fixes */
html[dir="rtl"] .language-selector .dropdown-toggle {
    direction: rtl;
}

html[dir="rtl"] .language-selector .dropdown-toggle .fas {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .language-selector .language-name {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* RTL fixes for corner icons */
html[dir="rtl"] .corner-copy-icon {
    right: auto;
    left: 8px;
}

html[dir="rtl"] .corner-audio-icon {
    right: auto;
    left: 48px;
}

html[dir="rtl"] .arabic-copy-button {
    left: auto;
    right: 4px;
}

/* RTL fixes for badges and labels */
html[dir="rtl"] .badge {
    margin-left: 0;
    margin-right: 0.5rem;
}

html[dir="rtl"] .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

/* Fix flex layouts in RTL */
html[dir="rtl"] .d-flex {
    direction: rtl;
}

html[dir="rtl"] .justify-content-between {
    flex-direction: row-reverse;
}

html[dir="rtl"] .justify-content-end {
    justify-content: flex-start;
}

html[dir="rtl"] .justify-content-start {
    justify-content: flex-end;
}

html[dir="rtl"] .align-items-center {
    flex-direction: row-reverse;
}

/* Navigation brand RTL fix */
html[dir="rtl"] .navbar-brand img {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Additional RTL navbar fixes */
html[dir="rtl"] .navbar-nav.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .navbar-nav:last-child {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Fix language selector in RTL navbar */
html[dir="rtl"] .language-selector {
    direction: rtl;
}

html[dir="rtl"] .language-selector .dropdown-toggle {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .language-selector .dropdown-menu {
    direction: rtl;
    text-align: right;
    left: auto !important;
    right: 0 !important;
}

/* Fix user dropdown in RTL */
html[dir="rtl"] .dropdown-menu-end {
    left: 0 !important;
    right: auto !important;
}

/* Ensure burger menu items are properly aligned */
@media (max-width: 767.98px) {
    html[dir="rtl"] .navbar-nav {
        padding-right: 0;
        padding-left: 0;
    }
    
    html[dir="rtl"] .nav-item {
        margin-right: 0;
        margin-left: 0;
    }
    
    html[dir="rtl"] .nav-link {
        border-radius: 0;
        margin: 0;
    }
    
    html[dir="rtl"] .dropdown-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Force RTL layout for Arabic navbar */
    html[dir="rtl"] .rtl-navbar {
        flex-direction: row-reverse;
    }
    
    html[dir="rtl"] .navbar-expand-lg .navbar-nav {
        flex-direction: column;
    }
    
    html[dir="rtl"] .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    
    html[dir="rtl"] .navbar-expand-lg .navbar-nav .dropdown-menu {
        position: absolute;
        left: auto;
        right: 0;
    }
}

/* Desktop RTL navbar fixes */
@media (min-width: 992px) {
    html[dir="rtl"] .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
    
    html[dir="rtl"] .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
    
    html[dir="rtl"] .navbar-expand-lg .navbar-nav .dropdown-menu {
        left: auto;
        right: 0;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-dark);
}

/* Header styling */
.site-header {
    background-color: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header .logo-circle {
    width: 40px;
    height: 40px;
    background-color: #FF0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.site-header .logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.site-header .logo-subtext {
    color: var(--dark-gray);
    font-size: 0.8rem;
    margin-top: -5px;
}

.site-header a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.site-header a:hover {
    color: var(--lime-green);
}

.nav-link {
    margin-left: 28px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.button-signup {
    background-color: var(--lime-green);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.button-signup:hover {
    background-color: var(--dark-lime);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 88, 202, 0.3);
}

.button-login {
    color: var(--text-dark);
    padding: 10px 24px;
    font-weight: 500;
}

/* Main container */
.main-container {
    padding: 60px 0;
}

.container.main-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.hero-section {
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-subtitle {
    color: var(--text-dark);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Translator container */
.translator-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-gray);
}

.translator-title {
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Section styling */
.section {
    margin-bottom: 60px;
    padding: 40px;
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-gray);
}

.section-title {
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 1.8rem;
}

/* Make textareas resize vertically only */
textarea {
    resize: vertical;
    min-height: 150px;
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    padding: 15px;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

textarea:focus {
    border-color: var(--lime-green);
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.2);
}

/* Custom styling for cards */
.card {
    border-radius: var(--border-radius);
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    margin-bottom: 30px;
    transition: all var(--transition-speed) ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-text {
    color: var(--text-dark);
}

/* Custom styling for buttons */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 12px 28px;
    transition: all var(--transition-speed) ease;
    border: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--lime-green);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-lime);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 88, 202, 0.3);
}

.btn-secondary {
    background-color: var(--dark-gray);
    color: var(--white);
    border: 1px solid var(--dark-gray);
}

.btn-secondary:hover {
    background-color: var(--text-gray);
    color: var(--white);
    border: 1px solid var(--text-gray);
}

.btn-info {
    background-color: var(--light-gray);
    color: var(--text-dark);
}

.btn-info:hover {
    background-color: var(--medium-gray);
    color: var(--text-dark);
}

.btn-success {
    background-color: #00C853;
    color: var(--white);
}

.btn-success:hover {
    background-color: #00B34A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 200, 83, 0.2);
}

.btn-outline-primary {
    border-color: var(--lime-green);
    color: var(--lime-green);
}

.btn-outline-primary:hover {
    background-color: var(--lime-green);
    border-color: var(--lime-green);
    color: white;
}

.btn-outline-info {
    border-color: var(--light-gray);
    color: var(--text-dark);
}

.btn-outline-info:hover {
    background-color: var(--light-gray);
    border-color: var(--light-gray);
    color: var(--text-dark);
}

.btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-arrow i {
    transition: transform var(--transition-speed) ease;
}

.btn-arrow:hover i {
    transform: translateX(4px);
}

/* Loading overlay styling */
#loadingOverlay {
    border-radius: var(--border-radius);
    z-index: 100;
}

/* Alert styling */
#alertBox {
    border-radius: var(--border-radius);
    margin-top: 20px;
    padding: 15px 20px;
}

/* Form elements */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    color: var(--text-dark);
    padding: 12px 15px;
    font-size: 0.95rem;
}

.form-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    color: var(--text-dark);
    padding: 12px 15px;
    font-size: 0.95rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-select-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Focus styles */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.2);
    border-color: var(--lime-green);
    background-color: var(--white);
    color: var(--text-dark);
}

/* Language selection */
.language-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* Character count display */
#sourceCharCount, #targetCharCount {
    padding-top: 0.5rem;
    color: var(--text-dark);
    font-size: 0.85rem;
}

/* Translation timer display */
#translationTimer {
    font-weight: 600;
    background-color: var(--lime-green);
    color: white;
    border-radius: 50px;
    padding: 4px 12px;
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

/* Resources section */
.resource-card {
    height: 100%;
    transition: transform var(--transition-speed) ease;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 20px;
    background-color: var(--lime-green);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.resource-link:hover {
    background-color: var(--dark-lime);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 88, 202, 0.3);
    color: white;
}

.resource-link i {
    transition: transform var(--transition-speed) ease;
}

.resource-link:hover i {
    transform: translateX(4px);
}

/* Footer */
.site-footer {
    background-color: var(--lime-green);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: none;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-speed) ease;
}

.footer-social a:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Google Translate Style UI */
.google-translator-container, .translation-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    max-width: 800px !important;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-inline: 1rem;
}

.google-translator-container {
    padding: 0;
}

/* Translation container layout */
.translation-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .translation-container {
        flex-direction: row;
    }
    
    .translation-container .translation-box {
        flex: 1;
    }
}

/* Tab navigation */
.translator-tabs {
    display: flex;
    border-bottom: 1px solid var(--google-border);
    background-color: var(--white);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.translator-tabs .tab {
    padding: 15px;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.translator-tabs .tab.active {
    color: var(--lime-green);
    font-weight: 700;
}

.translator-tabs .tab.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--lime-green);
}

/* Coming Soon Tab Styles */
.translator-tabs .tab.coming-soon-tab {
    color: #9ca3af;
    cursor: pointer;
    opacity: 0.8;
}

.translator-tabs .tab.coming-soon-tab:hover {
    color: #6b7280;
    opacity: 1;
}

.coming-soon-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Coming Soon Modal */
.coming-soon-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.coming-soon-modal.show {
    display: flex;
}

.coming-soon-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coming-soon-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coming-soon-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.coming-soon-modal-text {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.coming-soon-modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.coming-soon-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Language controls */
.language-controls {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--white);
    border-bottom: 1px solid var(--google-border);
}

.language-dropdown {
    position: relative;
    flex: 1;
}

.language-dropdown .dropdown-label {
    font-size: 14px;
    color: var(--text-dark);
    display: block;
    padding: 5px 0;
}

.swap-languages-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--google-border);
    color: var(--lime-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.swap-languages-btn:hover {
    background-color: var(--google-light-blue);
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.2);
}

.google-select {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Translation panels */
.translation-panels {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.translation-panel {
    flex: 1;
    border-bottom: 1px solid var(--google-border);
    background-color: var(--white);
    margin: 0;
}

.translation-panel textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: none;
    background-color: var(--white);
    font-size: 16px;
    line-height: 1.4;
    resize: none;
    border-radius: 0;
    box-shadow: none !important;
    outline: none !important;
}

.translation-panel textarea:focus {
    border: none;
    box-shadow: none !important;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--white);
}

.panel-actions {
    display: flex;
    align-items: center;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.icon-btn:hover {
    background-color: var(--google-light-gray);
}

/* Small translate button */
.small-translate-btn {
    background-color: var(--google-blue);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.small-translate-btn:hover {
    background-color: #3367d6;
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.3);
}

.char-count {
    font-size: 12px;
    color: var(--text-dark);
}

/* Action button feedback styling */
.feedback-action-btn {
    text-decoration: none;
    color: inherit;
}

.feedback-link {
    font-size: 12px;
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.feedback-link:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.translation-timer {
    font-size: 12px;
    color: var(--google-blue);
    margin-left: 10px;
}

/* Arabic script container */
.arabic-script-container {
    background-color: var(--google-light-gray);
    border: 1px solid var(--google-border);
    border-radius: 8px;
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
}

/* Practice page styles */
.practice-section {
    padding: 2rem 0;
}

.practice-card {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    height: 100%;
    border: 2px solid transparent;
    padding: 1.5rem;
    text-align: center;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--lime-green);
}

.practice-card .card-title {
    font-weight: 600;
    color: var(--lime-green);
    margin-top: 1rem;
}

.practice-card .icon {
    font-size: 3rem;
    color: var(--lime-green);
}

.practice-module {
    margin-bottom: 2rem;
}

/* Pronunciation section styles */
.pronunciation-card {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.pronunciation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.pronunciation-scripts {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 1rem;
}

.pronunciation-scripts .darija-text {
    font-size: 1.2rem;
    font-weight: 500;
}

.pronunciation-scripts .arabic-script {
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Amiri', 'Scheherazade New', 'Arial', sans-serif;
    direction: rtl;
}

.play-audio-btn {
    background-color: var(--lime-green);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.play-audio-btn:hover {
    background-color: var(--dark-lime);
}

.check-btn {
    background-color: var(--lime-green);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: background-color var(--transition-speed);
}

.check-btn:hover {
    background-color: var(--dark-lime);
}

.feedback-correct {
    color: #28a745;
    font-weight: 500;
}

.feedback-incorrect {
    color: #dc3545;
    font-weight: 500;
}

.arabic-script-header {
    border-bottom: 1px solid var(--google-border);
    padding: 8px 12px;
    font-size: 12px;
}

.arabic-script-text {
    font-family: 'Amiri', 'Scheherazade New', 'Arial', sans-serif;
    font-size: 18px;
    line-height: 1.5;
    padding: 12px;
    text-align: right;
}

/* Corner copy icons */
.corner-copy-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--lime-green);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 10;
}

.corner-copy-icon:hover {
    background-color: var(--lime-green);
    color: white;
}

/* Audio playback button */
.corner-audio-icon {
    position: absolute;
    top: 8px;
    right: 48px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--lime-green);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 10;
}

/* Clear text icon */
.clear-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.3);
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    opacity: 0.7;
}

.clear-icon:hover {
    color: rgba(10, 88, 202, 0.8);
    background-color: rgba(10, 88, 202, 0.1);
    opacity: 1;
}

.corner-audio-icon:hover {
    background-color: var(--lime-green);
    color: white;
}

.corner-audio-icon.playing {
    color: white;
    background-color: var(--lime-green);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.arabic-copy-button {
    top: 4px;
    left: 4px; /* Moved to left side since Arabic text is right-aligned */
    right: auto;
}

/* Action buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 25px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.action-btn.active {
    background-color: rgba(10, 88, 202, 0.1);
    color: rgb(10, 88, 202));
    border-color: rgb(10, 88, 202));
}

.action-btn i {
    font-size: 24px;
    margin-bottom: 8px;
}

.action-btn.active i {
    color: rgb(10, 88, 202));
}

.action-btn span {
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 30px;
    }
}

@media (min-width: 768px) {
    .translation-panels {
        flex-direction: row;
        max-width: 100%;
    }
    
    .translation-panel {
        border-bottom: none;
        flex: 1;
    }
    
    .source-panel {
        border-right: 1px solid var(--google-border);
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 25px;
    }
    
    .translator-container {
        padding: 20px;
    }
    
    .nav-link {
        margin-left: 15px;
    }
    
    .translator-tabs .tab {
        padding: 15px 10px;
        font-size: 13px;
    }
    
    .language-controls {
        padding: 10px;
    }
    
    .swap-languages-btn {
        margin: 0 10px;
    }
    
    .translation-panel textarea {
        height: 120px;
    }
    
    /* Mobile adjustments for copy buttons */
    .corner-copy-icon {
        width: 36px;
        height: 36px;
        background-color: rgba(255, 255, 255, 0.9);
    }
    
    .small-translate-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Better text clarity on mobile */
    .arabic-script-text {
        font-size: 20px;
        line-height: 1.6;
        padding: 15px;
    }
    
    /* Make sure Arabic script container has enough space */
    .arabic-script-container {
        max-height: 180px;
        margin-top: 15px;
    }
}

/* Enhanced Pricing Page Styles */
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card .card-body {
    padding: 2rem 1.5rem;
}

.pricing-value {
    font-weight: 800;
    position: relative;
    margin-top: 1rem;
}

.pricing-value .display-5 {
    color: var(--lime-green);
    font-weight: 800;
}

.pricing-tag {
    position: absolute;
    top: -15px;
    right: -55px;
    background: var(--lime-green);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 25px 50px 5px 50px;
    transform: rotate(45deg);
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 0.9rem;
    margin-right: 10px;
    color: var(--lime-green);
    width: 20px;
    text-align: center;
}

.feature-text {
    flex: 1;
    font-size: 0.95rem;
    color: #000000;
}

.text-accent {
    color: var(--lime-green);
}

.text-accent-dark {
    color: var(--dark-lime);
}

.pricing-badge {
    background-color: var(--lime-green);
    color: white;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.pricing-toggle {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 50px;
    padding: 0.25rem;
    display: inline-flex;
    margin-bottom: 2rem;
}

.pricing-toggle-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-toggle-btn.active {
    background: var(--lime-green);
    color: white;
}

.testimonial-card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-stars {
    color: var(--lime-green);
}

.testimonial-text {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #000000;
}

.testimonial-author {
    font-weight: 700;
    margin-bottom: 0;
    color: #000000;
}

.testimonial-role {
    font-size: 0.85rem;
    opacity: 0.7;
    color: #404040;
}

/* Additional styling for pricing page */
.pricing-card .card-text,
.pricing-card .card-body,
.accordion-body {
    color: #000000;
}

/* Ensure navbar links are white */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand {
    color: white !important;
}

/* Make login and signup form text black */
.form-label,
.card-title,
.card-body p,
.card-body .text-center {
    color: #000000 !important;
}

/* Custom styling for the Advanced toggle switch */
.form-check-input {
    background-color: white !important;
    border-color: #ccc !important;
}

.form-check-input:checked {
    background-color: var(--lime-green) !important;
    border-color: var(--lime-green) !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(10, 88, 202, 0.25) !important;
    border-color: var(--lime-green) !important;
}

.form-check-label.text-primary {
    color: var(--lime-green) !important;
    font-weight: 500;
}
