/* Laniakea Design System - Premium Glassmorphism & Dark Mode */
:root {
    /* Colors - Deep Space Theme */
    --bg-body: #0f172a;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-glass-hover: rgba(51, 65, 85, 0.8);
    --border-glass: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;

    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --backdrop-blur: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
    /* Recommended Arabic font */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[dir="rtl"] h1 {
    background: linear-gradient(to left, #fff, #cbd5e1);
    /* Flip gradient for RTL */
}

h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(var(--backdrop-blur));
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
}

.header-content {
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

/* Language Selector */
.lang-selector {
    position: relative;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.lang-selector:hover {
    background: var(--bg-glass-hover);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Tool Container - The "App" */
.tool-container {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-glass);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Glassmorphism Shine Effect */
.tool-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

[dir="rtl"] .tool-container::before {
    left: auto;
    right: -100%;
    transform: skewX(25deg);
}

.tool-container:hover::before {
    left: 150%;
    transition: 1s;
}

[dir="rtl"] .tool-container:hover::before {
    left: auto;
    right: 150%;
}

/* Inputs & Controls */
.input-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Output Area */
.output-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

/* Ads Placeholders */
.ad-slot {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 2rem auto;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ad-top {
    min-height: 90px;
    max-width: 728px;
}

.ad-content {
    min-height: 250px;
    max-width: 300px;
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

[dir="rtl"] .ad-content {
    float: left;
    margin-left: 0;
    margin-right: 2rem;
}

.ad-sidebar {
    min-height: 600px;
}

.seo-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

[dir="rtl"] .seo-content ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-glass);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-link {
        font-size: 1.2rem;
        ========================================*/

        /* Floating Trigger Button */
        .feedback-trigger {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border: none;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
            transition: var(--transition);
            z-index: 999;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        [dir="rtl"] .feedback-trigger {
            right: auto;
            left: 2rem;
        }

        .feedback-trigger:hover {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 6px 30px rgba(59, 130, 246, 0.6);
        }

        .feedback-trigger:active {
            transform: translateY(-2px) scale(1.02);
        }

        /* Modal Overlay */
        .feedback-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 1rem;
            animation: fadeIn 0.3s ease;
        }

        .feedback-modal.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* Modal Content */
        .feedback-content {
            background: var(--bg-glass);
            backdrop-filter: blur(var(--backdrop-blur));
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-lg);
            padding: 2.5rem;
            max-width: 500px;
            width: 100%;
            box-shadow: var(--shadow-glass);
            position: relative;
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from {
                transform: translateY(30px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Close Button */
        .feedback-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1.5rem;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: var(--transition);
        }

        [dir="rtl"] .feedback-close {
            right: auto;
            left: 1rem;
        }

        .feedback-close:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        /* Form Title */
        .feedback-content h3 {
            margin: 0 0 1.5rem 0;
            font-size: 1.5rem;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Rating Buttons */
        .rating-group {
            margin-bottom: 1.5rem;
        }

        .rating-label {
            display: block;
            margin-bottom: 0.75rem;
            font-weight: 500;
            color: var(--text-main);
        }

        .rating-buttons {
            display: flex;
            gap: 1rem;
        }

        .rating-btn {
            flex: 1;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid var(--border-glass);
            border-radius: var(--radius-md);
            color: var(--text-muted);
            font-size: 1.2rem;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .rating-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--primary);
        }

        .rating-btn.active {
            background: rgba(59, 130, 246, 0.2);
            border-color: var(--primary);
            color: var(--primary);
        }

        .rating-btn.thumbs-up.active {
            border-color: var(--success);
            color: var(--success);
            background: rgba(16, 185, 129, 0.2);
        }

        .rating-btn.thumbs-down.active {
            border-color: var(--error);
            color: var(--error);
            background: rgba(239, 68, 68, 0.2);
        }

        /* Suggestions Textarea */
        .feedback-textarea {
            width: 100%;
            min-height: 120px;
            padding: 1rem;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-md);
            color: #fff;
            font-size: 1rem;
            font-family: inherit;
            resize: vertical;
            margin-bottom: 1.5rem;
            transition: var(--transition);
        }

        .feedback-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .feedback-textarea::placeholder {
            color: var(--text-muted);
        }

        /* Premium Checkbox */
        .premium-group {
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: var(--radius-md);
        }

        .premium-checkbox {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
            cursor: pointer;
        }

        .premium-label {
            color: var(--text-main);
            cursor: pointer;
            flex: 1;
            font-size: 0.95rem;
        }

        /* Submit Button */
        .feedback-submit {
            width: 100%;
            padding: 1rem 2rem;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: #fff;
            font-weight: 600;
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: var(--transition);
            font-size: 1rem;
        }

        .feedback-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--primary-glow);
        }

        .feedback-submit:active {
            transform: translateY(0);
        }

        .feedback-submit:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* Success/Error Toast */
        .feedback-toast {
            position: fixed;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--bg-glass);
            backdrop-filter: blur(var(--backdrop-blur));
            border: 1px solid var(--border-glass);
            border-radius: var(--radius-md);
            padding: 1rem 2rem;
            box-shadow: var(--shadow-glass);
            z-index: 1001;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .feedback-toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .feedback-toast.success {
            border-color: var(--success);
            color: var(--success);
        }

        .feedback-toast.error {
            border-color: var(--error);
            color: var(--error);
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .feedback-trigger {
                bottom: 1rem;
                right: 1rem;
                width: 50px;
                height: 50px;
                font-size: 1.2rem;
            }

            [dir="rtl"] .feedback-trigger {
                right: auto;
                left: 1rem;
            }

            .feedback-content {
                padding: 2rem 1.5rem;
                max-width: 100%;
            }

            .rating-buttons {
                flex-direction: column;
            }

            .feedback-content h3 {
                font-size: 1.25rem;
            }
        }