/**
 * Kleeja Ultimate Edition - 2026
 * Next-Generation UI/UX Design - Clean Professional Theme
 */

/* ==========================================================================
   GOOGLE FONTS
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap");

/* ==========================================================================
   CSS VARIABLES - Advanced Design System
   ========================================================================== */
:root {
    /* Primary Colors - Sophisticated Blue */
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #e6f2ff;
    --primary-gradient: linear-gradient(135deg, #0066ff 0%, #00b4d8 100%);

    /* Accent Colors */
    --accent-cyan: #00b4d8;
    --accent-orange: #ff6b35;
    --accent-green: #06d6a0;
    --success: #06d6a0;
    --warning: #ffd60a;
    --danger: #ef476f;
    --info: #0066ff;

    /* Neutral Colors */
    --dark: #1a1d29;
    --dark-2: #2d3142;
    --dark-3: #4f5d75;
    --gray: #6c757d;
    --gray-light: #adb5bd;
    --gray-lighter: #dee2e6;
    --bg: #f8f9fa;
    --bg-2: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);

    /* Glass Effects */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-blue: 0 10px 40px rgba(0, 102, 255, 0.3);
    --shadow-cyan: 0 10px 40px rgba(0, 180, 216, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
}

/* ==========================================================================
   GLOBAL STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Inter", "Cairo", "Tajawal", -apple-system, BlinkMacSystemFont,
        sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

/* Animated Background Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
            circle at 20% 50%,
            rgba(0, 102, 255, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(0, 180, 216, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

::selection {
    background: rgba(0, 102, 255, 0.2);
    color: var(--dark);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}
h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}
h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}
h5 {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
}
h6 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

p {
    margin-bottom: var(--space-md);
    font-size: 1.0625rem;
    color: var(--dark-2);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ==========================================================================
   GLASSMORPHIC NAVBAR
   ========================================================================== */
.navbar {
    background: var(--glass-strong) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--dark) !important;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
    color: var(--primary) !important;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    transition: var(--transition-bounce);
}

.navbar-brand:hover img {
    transform: scale(1.1) rotate(5deg);
}

.navbar-dark .navbar-brand {
    color: white !important;
}

/* Primary Navbar */
.navbar.navbar-dark {
    background: var(--dark) !important;
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 1.0625rem;
    padding: 0.75rem 1.5rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Secondary Navbar */
.navbar-light .nav-link {
    color: var(--dark) !important;
    font-weight: 600;
    font-size: 1.0625rem;
    padding: 0.875rem 1.75rem !important;
    margin: 0 0.5rem;
    border-radius: var(--radius-lg);
    background: white;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar-light .nav-link:hover {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

.navbar-light .nav-link.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: var(--shadow-blue);
}

.navbar-text {
    font-weight: 700;
    font-size: 1.0625rem;
    background: white;
    color: var(--primary) !important;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-left: auto;
}

.navbar-text:hover {
    background: var(--primary);
    color: white !important;
    transform: scale(1.05);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
#content_index {
    margin: var(--space-2xl) auto;
    padding: 0;
}

.jumbotron {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--accent-cyan) 100%
    );
    color: white;
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.jumbotron::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.jumbotron > * {
    position: relative;
    z-index: 1;
}

.jumbotron h5,
.jumbotron h2 {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.jumbotron p {
    font-size: 1.125rem;
    opacity: 0.95;
    color: white;
}

/* ==========================================================================
   CARDS - GLASSMORPHIC DESIGN
   ========================================================================== */
.card {
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: var(--space-lg);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--primary-light);
    padding: var(--space-lg) var(--space-xl);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}

.card-header .nav-tabs {
    border: none;
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-xl))
        calc(-1 * var(--space-lg));
    padding: 0 var(--space-xl);
}

.card-header .nav-tabs .nav-link {
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: var(--dark-3);
    font-weight: 600;
    padding: var(--space-md) var(--space-lg);
    transition: var(--transition);
    background: transparent;
    margin: 0 var(--space-xs);
}

.card-header .nav-tabs .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.card-header .nav-tabs .nav-link.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    font-weight: 700;
}

.card-body {
    padding: var(--space-xl);
    background: white;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--space-md);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   UPLOAD SECTION
   ========================================================================== */
.input-group {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
}

.input-group .form-control {
    border: 2px solid var(--gray-lighter);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    flex: 1;
}

[dir="rtl"] .input-group .form-control {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border-right: 2px solid var(--gray-lighter);
    border-left: none;
}

.input-group-prepend {
    display: flex;
}

.input-group-prepend .btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border: none;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
}

[dir="rtl"] .input-group-prepend .btn {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.file-button-browse {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
}

/* Upload Label Styling */
.upload-label::before {
    content: "📁";
    font-size: 4rem;
    display: block;
    margin-bottom: var(--space-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.form-control,
.form-select,
textarea.form-control {
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--dark);
    background: white;
    transition: var(--transition);
    width: 100%;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--primary-light);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: translateY(-2px);
}

.form-control:disabled {
    background: var(--bg);
    cursor: not-allowed;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    font-weight: 700;
    font-size: 1.0625rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-blue);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--accent-orange);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #05c08b;
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
    border-radius: var(--radius-xl);
}

/* ==========================================================================
   LIST GROUPS
   ========================================================================== */
.list-group {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-lighter);
}

.list-group-item {
    border: none;
    border-bottom: 1px solid var(--gray-lighter);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.list-group-item:hover {
    background: var(--primary-light);
    padding-left: calc(var(--space-lg) + var(--space-sm));
}

[dir="rtl"] .list-group-item:hover {
    padding-left: var(--space-lg);
    padding-right: calc(var(--space-lg) + var(--space-sm));
}

.list-group-item .text-secondary {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray);
}

.list-group-item-text {
    font-weight: 600;
    color: var(--dark);
}

.list-group-item-info {
    background: var(--primary-light);
    border-color: var(--primary-light);
    text-align: center;
}

.list-group-item-danger {
    background: #ffebee;
    border-color: #ffcdd2;
    color: #c62828;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
    font-weight: 600;
    padding: var(--space-lg) var(--space-xl);
    font-size: 1.0625rem;
    border-radius: var(--radius-lg);
    border: 2px solid;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
    position: relative;
}

.alert::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: currentColor;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

[dir="rtl"] .alert::before {
    left: auto;
    right: 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success);
}

.alert-danger {
    background: #ffe4e8;
    color: #c62828;
    border-color: var(--danger);
}

.alert-info {
    background: var(--primary-light);
    color: #004499;
    border-color: var(--info);
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-block;
}

.badge-default {
    background: var(--gray-lighter);
    color: var(--dark);
}

.badge-pill {
    border-radius: var(--radius-full);
}

/* ==========================================================================
   CAPTCHA
   ========================================================================== */
.safe_code {
    margin: var(--space-xl) 0;
    padding: var(--space-xl);
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6b3 100%);
    border-radius: var(--radius-xl);
    border: 3px solid #ffb700;
    box-shadow: var(--shadow-lg);
    position: relative;
    text-align: center;
}

.safe_code::before {
    content: "🔒";
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    font-size: 3rem;
    opacity: 0.2;
}

[dir="rtl"] .safe_code::before {
    left: auto;
    right: var(--space-md);
}

.safe_code .card-title {
    color: #995c00;
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.safe_code .card-subtitle {
    color: #b37400;
    margin-bottom: var(--space-lg);
}

#kleeja_img_captcha {
    cursor: pointer;
    border-radius: var(--radius-md);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin: 0 auto;
    display: inline-block;
}

#kleeja_img_captcha:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.safe_code input[type="text"] {
    margin-top: var(--space-md);
    max-width: 200px;
}

/* ==========================================================================
   WHO'S ONLINE
   ========================================================================== */
.who-online {
    margin: var(--space-xl) 0;
}

.who-online .card-header {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.who-online .card-body {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.who-online .badge {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   AD BANNERS
   ========================================================================== */
.ad-banner {
    margin: var(--space-xl) auto;
    padding: var(--space-lg);
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--gray-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.ad-banner::before {
    content: "Advertisement";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ad-banner:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* 728x90 Leaderboard */
.ad-leaderboard {
    max-width: 768px;
    min-height: 130px;
    padding-top: var(--space-xl);
}

.ad-leaderboard .ad-placeholder {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* 300x250 Medium Rectangle */
.ad-rectangle {
    max-width: 340px;
    min-height: 290px;
    padding-top: var(--space-xl);
}

.ad-rectangle .ad-placeholder {
    width: 300px;
    height: 250px;
    max-width: 100%;
}

/* 336x280 Large Rectangle */
.ad-large-rectangle {
    max-width: 376px;
    min-height: 320px;
    padding-top: var(--space-xl);
}

.ad-large-rectangle .ad-placeholder {
    width: 336px;
    height: 280px;
    max-width: 100%;
}

/* Ad Placeholder */
.ad-banner .ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--gray-lighter) 100%);
    border-radius: var(--radius-md);
    color: var(--gray);
    font-weight: 600;
    font-size: 1.0625rem;
}

/* Download Page Ad Positions */
.download-top-ad {
    margin: var(--space-xl) auto var(--space-2xl);
}

.download-sidebar-ad {
    margin: var(--space-xl) 0;
}

.download-bottom-ad {
    margin: var(--space-2xl) auto var(--space-xl);
}

/* ==========================================================================
   DOWNLOAD PAGE
   ========================================================================== */
.download {
    text-align: center;
    padding: var(--space-lg);
}

.download a.btn {
    font-size: 1.5rem;
    padding: var(--space-lg) var(--space-2xl);
    margin: var(--space-lg) 0;
}

.download .badge {
    font-size: 1rem;
    margin-top: var(--space-md);
    background: var(--accent-orange);
    color: white;
    padding: 0.75rem 1.5rem;
}

#url {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#url .wait {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

#url .alert,
#url .alert-danger,
.text .alert,
.text .alert-danger {
    background: #ffe4e8 !important;
    color: #c62828 !important;
    border: 2px solid var(--danger) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--space-lg) !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-md) !important;
    margin: 0 !important;
}

#loadingImage {
    max-width: 100px;
    margin: var(--space-lg) auto;
    display: block;
}

/* ==========================================================================
   LOADING
   ========================================================================== */
#loadbox {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: var(--space-xl) 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    border-top: 3px solid var(--primary);
    padding: var(--space-xl) 0;
    margin-top: var(--space-3xl);
    position: relative;
    z-index: 10;
}

footer .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: var(--space-md);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-section h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

[dir="rtl"] .footer-section h3::after {
    left: auto;
    right: 0;
}

.footer-section p,
.footer-section a {
    color: var(--dark-3);
    font-size: 1rem;
    line-height: 1.8;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary);
    padding-left: var(--space-xs);
}

[dir="rtl"] .footer-section a:hover {
    padding-left: 0;
    padding-right: var(--space-xs);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-links a::before {
    content: "→";
    font-weight: 700;
    transition: var(--transition-fast);
}

[dir="rtl"] .footer-links a::before {
    content: "←";
}

.footer-links a:hover::before {
    transform: translateX(5px);
}

[dir="rtl"] .footer-links a:hover::before {
    transform: translateX(-5px);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 1.25rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: var(--shadow-blue);
}

.footer-bottom {
    padding: var(--space-lg) 0;
    border-top: 2px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--gray);
    font-weight: 500;
}

.footer-bottom a {
    color: var(--primary);
    font-weight: 700;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.table thead {
    background: var(--primary);
    color: white;
}

.table thead th {
    padding: var(--space-md) var(--space-lg);
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
    border: none;
}

[dir="rtl"] .table thead th {
    text-align: right;
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-lighter);
    transition: var(--transition-fast);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--primary-light);
}

.table tbody td {
    padding: var(--space-md) var(--space-lg);
    color: var(--dark-2);
    font-size: 1rem;
    border: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--bg);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    flex-wrap: wrap;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 var(--space-md);
    background: white;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.pagination .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-blue);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: var(--space-xl);
    border-bottom: 2px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--space-xl);
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-xl);
    border-top: 2px solid var(--gray-lighter);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress {
    height: 30px;
    background: var(--gray-lighter);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: var(--space-md) 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    transition: width 0.6s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.4);
}

.progress-bar-animated {
    animation: progress-animation 1.5s ease-in-out infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

/* ==========================================================================
   TOOLTIPS
   ========================================================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--space-sm) var(--space-md);
    background: var(--dark);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

[data-tooltip]::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dark);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--space-md);
    }
}

@media (max-width: 992px) {
    :root {
        font-size: 15px;
    }

    .navbar-collapse {
        background: var(--glass-strong);
        backdrop-filter: blur(20px);
        margin-top: var(--space-md);
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }

    .navbar-light .nav-link {
        margin: var(--space-xs) 0;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
    }

    .jumbotron {
        padding: var(--space-xl) var(--space-lg);
    }

    .card-body {
        padding: var(--space-lg);
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .ad-leaderboard,
    .ad-rectangle,
    .ad-large-rectangle {
        max-width: 100%;
    }

    .ad-placeholder {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    :root {
        font-size: 14px;
    }

    .navbar {
        padding: var(--space-sm) 0;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .card-header {
        padding: var(--space-md);
    }

    .card-body {
        padding: var(--space-md);
    }

    .jumbotron {
        padding: var(--space-lg) var(--space-md);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .form-control {
        border-radius: var(--radius-lg);
        border: 2px solid var(--gray-lighter);
        margin-bottom: var(--space-sm);
    }

    .input-group-prepend .btn {
        border-radius: var(--radius-lg);
        width: 100%;
    }

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

    .footer-social {
        justify-content: center;
    }

    .table {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: var(--space-sm) var(--space-md);
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    body {
        background: white;
    }

    .navbar,
    .ad-banner,
    footer,
    .btn,
    .safe_code {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: var(--space-xs);
}
.mt-2 {
    margin-top: var(--space-sm);
}
.mt-3 {
    margin-top: var(--space-md);
}
.mt-4 {
    margin-top: var(--space-lg);
}
.mt-5 {
    margin-top: var(--space-xl);
}

.mb-1 {
    margin-bottom: var(--space-xs);
}
.mb-2 {
    margin-bottom: var(--space-sm);
}
.mb-3 {
    margin-bottom: var(--space-md);
}
.mb-4 {
    margin-bottom: var(--space-lg);
}
.mb-5 {
    margin-bottom: var(--space-xl);
}

.d-none {
    display: none;
}
.d-block {
    display: block;
}
.d-flex {
    display: flex;
}
.d-grid {
    display: grid;
}

.flex-column {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.justify-center {
    justify-content: center;
}
.align-center {
    align-items: center;
}
.gap-1 {
    gap: var(--space-xs);
}
.gap-2 {
    gap: var(--space-sm);
}
.gap-3 {
    gap: var(--space-md);
}

.w-100 {
    width: 100%;
}
.h-100 {
    height: 100%;
}

/* ==========================================================================
   DARK MODE (OPTIONAL)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #f8f9fa;
        --dark-2: #e9ecef;
        --dark-3: #dee2e6;
        --bg: #1a1d29;
        --bg-2: #2d3142;
    }

    body {
        background: linear-gradient(135deg, #1a1d29 0%, #2d3142 100%);
        color: var(--dark);
    }

    .card,
    .navbar,
    .card-body {
        background: rgba(255, 255, 255, 0.05);
        color: var(--dark);
    }
}

/* END OF CSS */
