:root {
    --primary: #a742f5;
    --primary-dark: #8031c4;
    --secondary: #6e00ff;
    --dark: #0a0a0a;
    --light: #ffffff;
    --accent: #ff00ff;
}

body.dark-theme {
    background-color: var(--dark);
    color: var(--light);
    font-family: 'Space Grotesk', sans-serif;
    padding-top: 76px;
    min-height: 120vh;
    display: flex;
    flex-direction: column;
    
}

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 76px); /* 减去顶部导航栏的高度 */
}

/* Navigation */
.navbar {
    background-color: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(167, 66, 245, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(167, 66, 245, 0.2);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    color: var(--primary) !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 2rem;
    margin: 0;
}

/* Cacher le bouton burger */
.navbar-toggler {
    display: none;
}

/* Toujours afficher les liens */
.navbar-collapse {
    display: flex !important;
}

/* Footer */
footer {
    position: relative; /* 改为固定定位 */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark);
    padding: 1rem 0;
    z-index: 100; /* 确保在最上层 */
}

footer p {
    color: var(--primary);
    margin: 0;
    transition: color 0.3s ease;
}

footer p:hover {
    color: var(--primary-dark);
}

/* Ajuster le contenu principal pour éviter qu'il soit caché par le footer */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        gap: 1rem;
    }
    
    .language-selector {
        margin-left: 1rem;
        gap: 0.2rem;
    }
    
    .language-selector .nav-link {
        padding: 0.2rem;
    }
}

/* Navigation liens */
.nav-link {
    color: var(--primary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-dark) !important;
}

/* Sélecteur de langue */
.language-selector {
    display: flex;
    align-items: center;
    margin-left: 2rem;
    gap: 0.5rem;
}

.language-selector .nav-link {
    padding: 0.2rem 0.5rem;
    color: var(--primary) !important;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.language-selector .nav-link:hover {
    color: var(--primary-dark) !important;
    opacity: 1;
}

.language-selector .nav-link.active {
    opacity: 1;
}

.separator {
    color: var(--primary);
    opacity: 0.3;
    margin: 0;
    padding: 0;
}

/* Pour tous les liens en général */
a {
    color: var(--primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Animation typing */
.typing-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

#typed-text {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(167, 66, 245, 0.3);
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary);
    margin-left: 0.1rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Ajuster le responsive */
@media (max-width: 768px) {
    #typed-text {
        font-size: 1.8rem;
    }
    
    .typing-container {
        min-height: 80px;
    }
}

/* Projets */
.projects-container {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.project-card {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--primary);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(167, 66, 245, 0.3);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-badge {
    background: var(--primary);
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.features {
    color: var(--light);
}

.features h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.features ul {
    list-style: none;
    padding-left: 0;
}

.features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.features li::before {
    content: '→';
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-image img {
        height: 200px;
    }
}

/* Section héros */
.home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 76px);
    /*padding-bottom: 200px; /* 为页脚留出空间 */
    position: relative;
}

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 0; /* 增加顶部间距，修改为 2rem */
    min-height: calc(100vh - 140px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }
}

/* Nouveaux styles pour les boutons */
.hero-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-neon {
    position: relative;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 5px;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(167, 66, 245, 0.2),
        transparent
    );
    transition: 0.5s;
}

.btn-neon:hover::before {
    left: 100%;
}

.btn-neon:hover {
    color: var(--light);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

.btn-neon.btn-neon-filled {
    background: var(--primary);
    color: var(--light);
}

.btn-neon.btn-neon-filled:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-neon {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Styles pour l'image de profil */
.image-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Limite la largeur maximale */
    margin: 0 auto;
    aspect-ratio: 1; /* Maintient un ratio carré */
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garde les proportions de l'image */
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(45deg, var(--primary), transparent);
    opacity: 0.2;
    pointer-events: none;
}

/* Animation au survol */
.image-container:hover .profile-image {
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    .image-container {
        max-width: 300px; /* Plus petit sur mobile */
    }
}

/* Styles pour la page contact */
.contact-container {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

.contact-card {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--light);
    text-shadow: 0 0 10px var(--primary);
    transform: translateY(-3px);
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    border-radius: 5px;
    color: var(--light);
    padding: 0.8rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(167, 66, 245, 0.3);
    color: var(--light);
}

label {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Animation de focus */
.form-control:focus + label {
    color: var(--light);
}

/* Page de succès */
.success-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--primary);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

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

.footer-spacer {
    display: none;
}

.about-section {
    padding: 4rem 0;
    margin-top: 1rem; /* 减少与 hero 的间隔 */
    margin-bottom: 1rem; /* 保持与页脚的间隔 */
    background: var(--dark);
    box-shadow: 0 0 20px rgba(167, 66, 245, 0.3);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    color: #e6e6e6;
}

.glow-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(167, 66, 245, 0.7),
                 0 0 20px rgba(167, 66, 245, 0.2),
                 0 0 30px rgba(0, 255, 255, 0.1);
    position: relative;
}

.glow-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(167, 66, 245, 1), transparent);
}

.about-intro {
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 3px solid rgba(167, 66, 245, 0.3);
}

.services-list {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.services-title {
    color: rgba(167, 66, 245, 1);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.services-list ul {
    list-style: none;
    padding: 0;
}

.services-list li {
    margin: 1.5rem 0;
    padding-left: 2rem;
    position: relative;
    transition: transform 0.3s ease;
}

.services-list li:hover {
    transform: translateX(10px);
}

.cta-section {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 150px; /* 增加底部边距 */
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #fff;
}

.cta-button {
    margin-top: 2rem;
}

/* 为列表项添加悬停效果 */
.services-list li:hover {
    color: rgba(167, 66, 245, 1);
}

.bottom-spacer {
    display: none;
}
