/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles - Matching Nafezly */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e9ecef;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 35px;
    width: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    min-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
}

.nav.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.nav-section h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.3rem;
}

.nav-section a {
    text-decoration: none;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-section a:hover,
.nav-section a.active {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-section i {
    font-size: 0.8rem;
    width: 16px;
}

.lang-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.lang-btn:hover {
    background: #e9ecef;
}

.menu-btn {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: #e9ecef;
}

/* Main Content */
.main {
    padding: 1.5rem 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.7rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    color: #212529;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Text to Slug Section */
.slug-section {
    margin-bottom: 2.5rem;
}

.slug-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-wrapper label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.input-group {
    position: relative;
}

#textInput {
    width: 100%;
    padding: 1rem;
    padding-left: 60px; /* Make room for action buttons */
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    background: #fff;
    resize: vertical;
    min-height: 90px;
    font-family: 'Cairo', sans-serif;
}

#textInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-actions {
    position: absolute;
    left: 8px;
    top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-action {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.btn-action:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #007bff;
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.char-count, .word-count {
    font-family: monospace;
}

/* Action Button */
.action-wrapper {
    text-align: center;
    margin-bottom: 1.5rem;
}

.btn-convert {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 180px;
    justify-content: center;
}

.btn-convert:hover:not(:disabled) {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-convert:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Output Section */
.output-section {
    margin-bottom: 2rem;
}

.output-wrapper label {
    display: block;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.output-group {
    position: relative;
    margin-bottom: 1rem;
}

#slugOutput {
    width: 100%;
    padding: 1rem;
    padding-left: 60px;
    border: 2px solid #28a745;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fff8;
    font-family: 'Courier New', monospace;
    color: #495057;
    font-weight: 600;
}

#slugOutput:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.output-actions {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.btn-copy {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-copy:hover {
    background: #1e7e34;
    border-color: #1e7e34;
}

.btn-test {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-test:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.output-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #28a745;
}

.slug-length {
    font-family: monospace;
}

.seo-score {
    font-weight: 500;
}

/* URL Preview */
.url-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1rem;
}

.url-preview h4 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.preview-url {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #007bff;
    background: white;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.base-url {
    color: #6c757d;
}

.slug-part {
    color: #007bff;
    font-weight: 600;
}

/* Examples Section */
.examples-section {
    margin-bottom: 2rem;
}

.examples-section h3 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.btn-example {
    background: white;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
    min-height: 90px;
    justify-content: center;
}

.btn-example:hover {
    border-color: #28a745;
    color: #28a745;
    background: #f8fff8;
    transform: translateY(-2px);
}

.btn-example i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.btn-example span {
    font-weight: 500;
    line-height: 1.3;
}

/* Advanced Options */
.advanced-options {
    margin-bottom: 2rem;
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
}

.advanced-options h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border: 1px solid #e9ecef;
}

.option-checkbox:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.option-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.option-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #28a745;
    border-color: #28a745;
}

.option-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Additional Options */
.additional-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.option-field {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.option-field label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.option-field input,
.option-field select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
}

.option-field input:focus,
.option-field select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Bulk Section */
.bulk-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
}

.bulk-section h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#bulkInput {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    resize: vertical;
    margin-bottom: 1rem;
}

#bulkInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-bulk {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-bulk:hover {
    background: #138496;
}

.bulk-results {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.bulk-item {
    padding: 0.8rem;
    border-bottom: 1px solid #f1f3f4;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.bulk-item:last-child {
    border-bottom: none;
}

.bulk-text {
    font-weight: 500;
    color: #495057;
}

.bulk-slug {
    font-family: 'Courier New', monospace;
    color: #28a745;
    font-size: 0.85rem;
    direction: ltr;
    text-align: left;
}

/* Info Section - Two Column Layout */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-section .info-card,
.about-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.info-section .info-card h2,
.about-card h2 {
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-section .info-card i {
    color: #28a745;
}

.info-section .info-card p,
.about-card p {
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Slug Guide */
.slug-guide {
    margin-bottom: 2.5rem;
}

.slug-guide h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #28a745;
}

.guide-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.guide-header i {
    font-size: 2rem;
    color: #28a745;
}

.guide-header h3 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.guide-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Popular Tools */
.popular-tools {
    margin-bottom: 2rem;
}

.popular-tools h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: white;
    padding: 1.2rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.tool-card:hover,
.tool-card.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #28a745;
}

.tool-card i {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: #28a745;
}

.tool-card span {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 0.8rem;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.footer-logo {
    height: 35px;
    margin-bottom: 0.8rem;
}

.footer-section p {
    color: #6c757d;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #e9ecef;
    border-radius: 6px;
    text-align: center;
    line-height: 35px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: #28a745;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.4rem;
}

.footer-section ul a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul a:hover {
    color: #28a745;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Copy success animation */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.btn-copy.copied {
    animation: copySuccess 0.3s ease;
    background: #28a745 !important;
}

/* SEO Score Colors */
.seo-excellent { color: #28a745; }
.seo-good { color: #ffc107; }
.seo-poor { color: #dc3545; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        min-width: 280px;
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .slug-card {
        padding: 1.2rem;
    }

    #textInput {
        padding-left: 15px;
        font-size: 0.9rem;
    }

    #slugOutput {
        padding-left: 15px;
        font-size: 0.9rem;
    }

    .input-actions,
    .output-actions {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 0.8rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .additional-options {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .preview-url {
        font-size: 0.85rem;
    }

    .bulk-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .slug-card {
        padding: 1rem;
    }

    .btn-convert {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: 150px;
    }

    .examples-grid {
        gap: 0.8rem;
    }

    .btn-example {
        padding: 0.8rem;
        min-height: 70px;
    }

    .btn-example i {
        font-size: 1.2rem;
    }

    .guide-grid {
        gap: 1rem;
    }

    .url-preview {
        padding: 1rem;
    }

    .preview-url {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
}

/* Additional utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #6c757d; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }