:root {
    --primary: #6366f1;
    --accent: #ec4899;
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
}
/* ابحث عن الـ selector ده عندك وعدله */
.controls input {
    width: 100%;
    padding: 12px;
    background: #0b1120;
    border: 1px solid #1e293b;
    border-radius: 8px;
    color: white;
    box-sizing: border-box; /* عشان الـ padding ميزودش الحجم */
    margin-bottom: 20px; /* دي الإضافة اللي هتعمل المسافة اللي انت عاوزها */
    outline: none;
}

/* وتأكد إن الـ btn-group برضه واخد مسافة من تحت عشان الزراير متلزقش في بعض */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px; /* مسافة بين الصف الأول والصف التاني */
}
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); margin: 0; }
.main-container { display: flex; gap: 20px; padding: 20px; max-width: 1300px; margin: auto; }
.theory-section, .visualizer-section { background: var(--card); padding: 25px; border-radius: 15px; flex: 1; }

/* Node Design */
.list-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 50px; }

.node {
    display: flex;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.node-content {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Arrows */
.arrow { font-size: 24px; color: var(--primary); margin: 0 5px; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

.btn-group { display: flex; gap: 10px; margin-bottom: 10px; }
button { flex: 1; padding: 10px; border-radius: 5px; border: none; cursor: pointer; color: white; font-weight: bold; }
.btn-primary { background: var(--primary); }
.btn-danger { background: #ef4444; }
select { width: 100%; padding: 10px; margin-top: 10px; background: #334155; color: white; border-radius: 5px; border: none; }
.code-link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    margin-top: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.code-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-content span {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
}

.card-content small {
    opacity: 0.8;
}

.card-icon {
    font-size: 1.5rem;
}

.highlight {
    color: #ec4899;
    font-weight: bold;
}
.controls input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
}
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(30, 41, 59, 0.7); /* Dark semi-transparent */
    color: #f8fafc;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(8px); /* تأثير الزجاج الضبابي */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 9999; /* عشان يفضل فوق أي حاجة */
}

.back-home:hover {
    background: var(--primary); /* يقلب للون الأساسي بتاعك عند الهوفر */
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}
