/* ---
Design Overhaul V2 for Skyin AI
- Added Arabic font (Tajawal)
- Switched to CSS Logical Properties for perfect LTR/RTL support
--- */

/* Import both Inter for English and Tajawal for Arabic */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    --background-dark: #02040A;
    --background-medium: #0D1117;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-primary: #00A7E1;
    --accent-glow: rgba(0, 167, 225, 0.5);
    --border-radius: 12px;
    /* Font stack now includes Tajawal for Arabic */
    --font-family: 'Tajawal', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #02040a, #0d2a45, #02040a);
    background-size: 200% 200%;
    animation: gradient-flow 15s ease infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1100px;
    margin-inline: auto; /* Replaced margin: 0 auto */
    padding-inline: 24px;  /* Replaced padding: 0 24px */
    position: relative;
    z-index: 2;
}

h1, h2, h3 {
    font-weight: 600;
}

/* --- Animated Floating Shapes --- */
.shape-blob { background: linear-gradient(180deg, var(--accent-primary), #3D4F9F); height: 250px; width: 250px; border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; position: absolute; z-index: -1; opacity: 0.15; filter: blur(50px); animation: transform-blob 15s ease-in-out infinite both alternate, movement-blob-1 30s ease-in-out infinite both alternate; }
.shape-blob.one { top: -50px; left: -100px; }
.shape-blob.two { bottom: -100px; right: -150px; animation-delay: 2s; animation-name: transform-blob, movement-blob-2; }
@keyframes transform-blob { from { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } to { border-radius: 40% 60% 30% 70% / 60% 40% 70% 40%; transform: rotate(7deg); } }
@keyframes movement-blob-1 { from { transform: translate(0, 0); } to { transform: translate(150px, 100px); } }
@keyframes movement-blob-2 { from { transform: translate(0, 0); } to { transform: translate(-100px, -120px); } }

/* --- Header & Navigation --- */
header {
    background-color: rgba(2, 4, 10, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding-block: 1.25rem;
    z-index: 100;
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--text-primary); font-weight: 700; font-size: 1.5rem; }
.logo img {
    margin-inline-end: 12px;
    height: 32px;
}
nav { display: flex; justify-content: space-between; align-items: center; }
nav ul { list-style: none; display: flex; }
nav ul li a { text-decoration: none; color: var(--text-secondary); padding: 10px 18px; font-weight: 600; transition: color 0.3s ease; }
nav ul li a:hover, .nav-active { color: var(--text-primary); }


/* --- Hero Section --- */
.hero { min-height: 90vh; display: flex; align-items: center; text-align: center; padding-block: 60px; position: relative; }
.hero h1 { font-size: 4rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.1; letter-spacing: -2px; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
.hero p { font-size: 1.25rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 2.5rem auto; }
.hero .btn { padding: 14px 32px; font-size: 1rem; }


/* --- Features Section & Cards --- */
.features { padding-block: 100px; text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-block-start: 50px; text-align: start; }
.feature-card { background: rgba(13, 17, 23, 0.6); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 40px 30px; backdrop-filter: blur(5px); position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 0 25px rgba(0, 167, 225, 0.2); }
.feature-card .icon { background-color: rgba(0, 167, 225, 0.1); border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; margin-block-end: 20px; }
.feature-card .icon svg { width: 28px; height: 28px; color: var(--accent-primary); }
.feature-card h3 { margin-block-end: 10px; color: var(--text-primary); }
.feature-card p { font-size: 0.95rem; color: var(--text-secondary); }


/* --- Scroll Animations --- */
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }


/* --- Footer --- */
footer { text-align: center; padding-block: 40px; margin-block-start: 60px; border-top: 1px solid var(--border-color); color: var(--text-secondary); }


/* --- Model Tester Page Specifics --- */
.model-tester-container { padding: 60px 20px; }
.page-header { text-align: center; margin-bottom: 50px; max-width: 800px; margin-inline: auto; }
.input-section, .output-section { background-color: var(--background-medium); padding: 30px; border-radius: var(--border-radius); border: 1px solid var(--border-color); height: 100%; }
h3 { border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.file-drop-area { border: 2px dashed var(--border-color); border-radius: var(--border-radius); padding: 40px 20px; text-align: center; cursor: pointer; position: relative; background-color: var(--background-dark); transition: all 0.3s ease; }
.file-drop-area.drag-over { border-color: var(--accent-primary); background-color: rgba(49, 162, 217, 0.1); }
.file-drop-area input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#result-display { min-height: 400px; display: flex; justify-content: center; align-items: center; border: 1px solid var(--border-color); border-radius: var(--border-radius); background-color: var(--background-dark); padding: 10px; }
.placeholder-text { color: var(--text-secondary); }
.loader {
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--accent-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn { display: inline-block; background: var(--accent-primary); color: #fff; padding: 12px 28px; text-decoration: none; border-radius: var(--border-radius); font-weight: 700; transition: all 0.3s ease; border: 2px solid transparent; }
.btn:hover { background: #007ead; transform: translateY(-2px); }

/* --- NEW: Progress Bar Styles --- */
.progress-container {
    width: 100%;
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-top: 20px;
    display: none; /* Hidden by default */
}

.progress-bar {
    width: 0%;
    height: 24px;
    background: linear-gradient(90deg, var(--accent-primary), #00c6ff);
    border-radius: 8px;
    text-align: center;
    line-height: 24px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 0.5s ease-in-out;
}

/* --- Batch Prediction Results Grid --- */
#result-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    align-items: start;
}

.result-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--background-dark);
}

.result-item img {
    display: block;
    width: 100%;
    height: auto;
}
