/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Galaxy Overlay for better contrast */
.galaxy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(10, 10, 40, 0.4) 0%, rgba(0, 0, 0, 0.9) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle 4s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Shooting Stars */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%);
    filter: blur(1px);
    opacity: 0;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 40, 0.95);
    padding: 15px 20px;
    z-index: 1001;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-content p {
    flex: 1;
    margin-right: 20px;
    color: #ddd;
}

.cookie-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(100, 150, 255, 0.5);
}

.tagline {
    font-size: 1.2rem;
    color: #aaa;
    letter-spacing: 1px;
}

/* Glass Boxes - Enhanced contrast */
.glass-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-box:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.15);
}

/* Timeline Section */
.timeline-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-year {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #fff;
}

.timeline-content p {
    color: #ccc;
    line-height: 1.6;
}

.box-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.box-header i {
    font-size: 2rem;
    margin-right: 15px;
    color: #fff;
}

.box-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.box-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #eee;
}

.box-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.box-content li {
    margin-bottom: 8px;
    position: relative;
}

.box-content li::before {
    content: "▸";
    color: #4fc3f7;
    position: absolute;
    left: -15px;
}

/* Action Buttons */
.action-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.2) 0%, rgba(100, 150, 255, 0.1) 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 150, 255, 0.3);
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.3) 0%, rgba(100, 150, 255, 0.2) 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(100, 150, 255, 0.3);
}

.action-btn i {
    margin-right: 8px;
}

/* Social Links */
footer {
    margin-top: 50px;
    text-align: center;
}

.social-links h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #fff;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-btn i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Custom icon for Hugging Face */
.fa-huggingface:before {
    content: "🤗";
}

.copyright {
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* RTL Support for Persian */
html[dir="rtl"] .box-header i {
    margin-right: 0;
    margin-left: 15px;
}

html[dir="rtl"] .box-content li::before {
    left: auto;
    right: -15px;
}

html[dir="rtl"] .timeline-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .action-btn i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .social-btn i {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 40px 0 30px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .box-header h2 {
        font-size: 1.5rem;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .timeline-year {
        align-self: flex-start;
    }
    
    .social-icons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 250px;
        justify-content: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-content p {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .lang-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Animation for section IDs */
#space .box-header i { color: #4fc3f7; }
#ai .box-header i { color: #69f0ae; }
#programming .box-header i { color: #ff8a65; }
#about .box-header i { color: #b388ff; }
#timeline .box-header i { color: #ffd54f; }