:root {
    --bg-dark: #020204;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --primary: #00f0ff;
    --secondary: #a855f7;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --font-main: 'Space Grotesk', sans-serif;
    --font-title: 'Orbitron', sans-serif;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020204; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Utility Helpers */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; }
.w-full { width: 100%; } .h-full { height: 100%; }
.relative { position: relative; } .absolute { position: absolute; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.3s ease; }

/* Cursor */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); pointer-events: none; z-index: 9999; }
.cursor-dot { width: 8px; height: 8px; background-color: var(--primary); border-radius: 50%; }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--primary); border-radius: 50%; opacity: 0.5; }

/* Navigation */
nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    padding: 1.5rem 2rem;
    background: rgba(2, 2, 4, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.nav-menu { display: none; gap: 2rem; }
@media (min-width: 768px) { .nav-menu { display: flex; } }

.nav-link {
    color: rgba(255,255,255,0.7); text-decoration: none;
    font-size: 0.75rem; font-weight: bold; letter-spacing: 0.2em; text-transform: uppercase;
    position: relative;
}
.nav-link:hover { color: var(--primary); opacity: 1; }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px; background: var(--primary); transition: 0.3s; }
.nav-link:hover::after { width: 100%; }

/* Lang Button */
.btn-lang {
    border: 1px solid rgba(255,255,255,0.2); padding: 0.25rem 1rem;
    border-radius: 99px; font-size: 0.75rem; font-family: monospace;
    color: white; text-decoration: none; transition: 0.3s;
}
.btn-lang:hover { background: white; color: black; }

/* MAIN LAYOUT */
main {
    flex-grow: 1; display: flex; align-items: center; justify-content: center;
    padding: 8rem 1rem 4rem 1rem; width: 100%;
}

.hero-container {
    width: 100%; max-width: 1300px;
    display: grid; grid-template-columns: 1fr; gap: 3rem;
    align-items: center; position: relative; z-index: 10;
}
@media (min-width: 1024px) { .hero-container { grid-template-columns: 5fr 7fr; } }

/* Typography */
.hero-text h1 {
    font-family: var(--font-title); font-size: 3rem; line-height: 1; margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}
@media (min-width: 768px) { .hero-text h1 { font-size: 4.5rem; } }

.hero-sub {
    font-size: 1.1rem; color: var(--text-muted);
    border-left: 4px solid var(--primary); padding-left: 1.5rem; margin-bottom: 2rem;
}
[dir="rtl"] .hero-sub { border-left: none; border-right: 4px solid var(--primary); padding-left: 0; padding-right: 1.5rem; }

.neon-title {
    font-family: var(--font-title);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.badge {
    display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; margin-bottom: 1rem;
    border: 1px solid rgba(0, 240, 255, 0.5); background: rgba(0, 240, 255, 0.05);
    border-radius: 99px; color: var(--primary); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
}

/* Upload Panel (FIXED HEIGHT & FLEX) */
.upload-wrapper { 
    min-height: 600px; 
    height: auto; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
}

.glass-panel {
    background: rgba(10, 10, 12, 0.9); 
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 1.5rem;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.05);
    
    /* Fixes for layout issues */
    flex-grow: 1;
    width: 100%;
    min-height: 600px;
    
    padding: 2rem 2rem 3rem 2rem;
    display: flex; 
    flex-direction: column; 
    transition: border-color 0.3s;
}
.glass-panel:hover { border-color: rgba(0, 240, 255, 0.3); }

/* Drop Zone */
#dropZone {
    flex-grow: 1; border: 2px dashed rgba(255,255,255,0.1); border-radius: 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: 0.3s; margin-bottom: 1rem; background: rgba(255,255,255,0.02); min-height: 200px;
}
#dropZone:hover { border-color: var(--primary); background: rgba(0, 240, 255, 0.05); }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-item { position: relative; cursor: pointer; }
.feature-box {
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03);
    padding: 0.75rem; border-radius: 0.5rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem; transition: 0.2s;
}
.feature-item input:checked + .feature-box { background: rgba(0, 240, 255, 0.1); border-color: var(--primary); color: white; }
.feature-label { font-size: 0.65rem; font-weight: bold; text-transform: uppercase; color: var(--text-muted); }
.feature-item input:checked + .feature-box .feature-label { color: white; }

/* SLIDER FIXES (Thumb size increased) */
input[type=range] {
    width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 3px; appearance: none; -webkit-appearance: none; margin-top: 0.5rem; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; 
    width: 20px; height: 20px; /* Bigger Thumb */
    background: var(--primary); border-radius: 50%; cursor: grab; 
    box-shadow: 0 0 15px var(--primary); border: 2px solid #fff; margin-top: -7px;
}
input[type=range]::-moz-range-thumb {
    width: 20px; height: 20px;
    background: var(--primary); border: 2px solid #fff; border-radius: 50%; 
    cursor: grab; box-shadow: 0 0 15px var(--primary);
}

/* Inputs & Buttons */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 1rem; border-radius: 0.5rem; color: white; font-family: monospace;
}
input:focus, textarea:focus { border-color: var(--primary); outline: none; }
label { color: var(--primary); font-size: 0.75rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem; }

.btn-action, .btn-start {
    background: white; color: black; font-weight: bold; border: none;
    text-transform: uppercase; cursor: pointer; transition: 0.3s;
    text-decoration: none !important; /* תיקון קריטי לכפתור */
}
.btn-action {
    width: 100%; margin-top: 1.5rem; margin-bottom: 1rem; padding: 1rem;
    border-radius: 0.75rem; letter-spacing: 0.15em;
    display: flex; justify-content: center; align-items: center; gap: 0.5rem;
}
.btn-start {
    display: inline-flex; align-items: center; padding: 1rem 2rem;
    border-radius: 0.5rem; letter-spacing: 0.1em; font-size: 0.85rem;
}
.btn-action:hover, .btn-start:hover {
    background: var(--primary); box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

/* --- ABOUT PAGE --- */
.about-grid {
    display: grid; grid-template-columns: 1fr; gap: 2rem;
    width: 100%; margin-top: 3rem; position: relative; z-index: 1;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }

.about-card {
    background: rgba(20, 20, 25, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.5rem;
    padding: 3rem 2rem; display: flex; flex-direction: column;
    align-items: center; text-align: center; min-height: 350px;
    transition: all 0.3s ease;
}
.about-card:hover {
    border-color: var(--primary); background: rgba(30, 30, 40, 0.95);
    transform: translateY(-5px); box-shadow: 0 10px 40px -10px rgba(0, 240, 255, 0.15);
}
.card-icon-wrapper {
    width: 5rem; height: 5rem; border-radius: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; font-size: 2rem; transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
}
.about-card:hover .card-icon-wrapper { transform: scale(1.1) rotate(5deg); }
.card-title { font-size: 1.5rem; font-weight: bold; color: white; margin-bottom: 1rem; font-family: var(--font-title); }
.card-text { color: var(--text-muted); font-size: 1rem; line-height: 1.6; max-width: 300px; }

/* Stats & License */
.stat-box { text-align: center; padding: 1rem; }
.stat-number { font-family: monospace; font-size: 2.5rem; font-weight: bold; color: white; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.5rem; }
.license-box {
    margin-top: 4rem; text-align: center; padding: 2rem;
    background: rgba(255,255,255,0.02); border-radius: 1rem;
    border: 1px dashed rgba(168, 85, 247, 0.3); width: 100%;
}

/* --- CONTACT PAGE --- */
.contact-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; width: 100%; }
@media (min-width: 768px) { .contact-layout { grid-template-columns: 1fr 1.5fr; } }
.social-btn {
    width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; color: white; transition: 0.3s; text-decoration: none;
}
.social-btn:hover { background: var(--primary); color: black; }

/* Footer */
footer {
    text-align: center; padding: 2rem; font-size: 0.65rem; font-family: monospace; letter-spacing: 0.1em;
    border-top: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.8); margin-top: auto;
}

/* RTL Support */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .nav-link::after { right: 0; left: auto; }

/* --- ACCESSIBILITY FINAL FIXES (Focus Visibility) --- */

/* 1. הגדרה גורפת וחזקה לפוקוס על אלמנטים סטנדרטיים (כפתורים, קישורים) */
:focus-visible {
    outline: 3px solid #ff00ff !important; /* צבע ניאון בולט */
    outline-offset: 3px;
    border-radius: 4px;
}

/* 2. התיקון הקריטי לפיצ'רים: מכוון ישירות לתווית עם tabindex="0" */
.feature-item:focus-visible {
    outline: none !important; /* מונע את הריבוע הכפול */
    box-shadow: 0 0 0px transparent !important;
}

/* 3. סטיילינג לקופסה הפנימית כשהתווית החיצונית מקבלת פוקוס */
.feature-item:focus-visible .feature-box {
    border-color: var(--secondary); /* משנה צבע לגבול משני (סגול/כחול) */
    box-shadow: 0 0 15px var(--secondary); /* מוסיף זוהר */
    transform: scale(1.02);
}