/* ========================================
   🎨 موقع يحيى دنقل - المبرمج الصغير
   ======================================== */

:root {
    /* ألوان رئيسية */
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --success-color: #95E1D3;
    --purple-color: #A685E2;
    --orange-color: #FFAB73;
    
    /* تدرجات جميلة */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-rainbow: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* ========================================
   🌟 النجوم المتحركة في الخلفية
   ======================================== */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ========================================
   🎯 شريط التنقل
   ======================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(360deg); }
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-links a:hover::before {
    left: 0;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   🏠 الصفحة الرئيسية
   ======================================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out;
    text-align: center;
}

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

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out 0.2s backwards;
}

@keyframes slideInLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.message-from-dad {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    padding: 2rem;
    border-radius: 20px;
    border-right: 5px solid var(--primary-color);
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.1);
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.message-from-dad h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-from-dad p {
    line-height: 2;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* ========================================
   🎨 الأزرار
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-secondary {
    background: var(--gradient-3);
    color: white;
}

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

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ========================================
   🖼️ معرض الصور
   ======================================== */
.gallery-section {
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ========================================
   💭 صفحة الأحلام
   ======================================== */
.dreams-section {
    padding: 4rem 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.dreams-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.dream-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.dream-card:nth-child(1) { animation-delay: 0.1s; }
.dream-card:nth-child(2) { animation-delay: 0.2s; }
.dream-card:nth-child(3) { animation-delay: 0.3s; }

.dream-card:hover {
    transform: translateX(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.dream-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dream-card p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--dark-color);
}

/* ========================================
   💻 صفحة البرمجة
   ======================================== */
.programming-section {
    padding: 4rem 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.programming-container {
    max-width: 1000px;
    margin: 0 auto;
}

.code-showcase {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

.code-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #323232;
    display: flex;
    align-items: center;
}

.code-line {
    margin: 0.5rem 0;
    padding-right: 2rem;
}

.keyword {
    color: #569cd6;
}

.string {
    color: #ce9178;
}

.function {
    color: #dcdcaa;
}

.comment {
    color: #6a9955;
}

.programming-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.tool-card p {
    color: var(--dark-color);
    line-height: 1.6;
}

/* ========================================
   📱 التصميم المتجاوب
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   🎭 رسوم متحركة إضافية
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   🎯 عناصر خاصة
   ======================================== */
.emoji {
    display: inline-block;
    font-size: 1.5em;
    animation: bounce 1s infinite;
}

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

.highlight {
    background: linear-gradient(120deg, var(--accent-color) 0%, var(--accent-color) 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 88%;
    padding: 0 0.2em;
}

/* ========================================
   🌈 خلفيات متحركة
   ======================================== */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: var(--gradient-rainbow);
    background-size: 200% 200%;
    animation: gradient-animation 5s ease infinite;
}

/* ========================================
   🎬 الفيديو
   ======================================== */
.video-container {
    max-width: 800px;
    margin: 3rem auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.video-container video {
    width: 100%;
    display: block;
}

/* ========================================
   🎨 Footer
   ======================================== */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    z-index: 2;
}

footer p {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

footer .heart {
    color: var(--primary-color);
    animation: pulse 1.5s ease-in-out infinite;
}
