* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0b2e 0%, #16213e 25%, #0f0f23 50%, #240b36 75%, #1a0b2e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particules d'arrière-plan - uniquement sur le contenu */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #a855f7, transparent),
        radial-gradient(2px 2px at 40px 70px, #c084fc, transparent),
        radial-gradient(1px 1px at 90px 40px, #ddd6fe, transparent),
        radial-gradient(1px 1px at 130px 80px, #8b5cf6, transparent);
    background-repeat: repeat;
    background-size: 150px 150px;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
    opacity: 0.3;
    z-index: -1;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-150px); }
}

/* Navbar simplifiée sans effets */
.navbar {
    background: rgba(16, 9, 35, 0.95);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.navbar h1 a {
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: #ddd6fe;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #fff;
    background: rgba(168, 85, 247, 0.2);
}

/* Styles pour le lien admin - simplifié */
.nav-menu a[href="admin.php"] {
    background: #8b5cf6;
    color: #fff !important;
    font-weight: bold;
}

.nav-menu a[href="admin.php"]:hover {
    background: #7c3aed;
}

.main-content {
    min-height: calc(100vh - 80px);
    position: relative;
}

.hero {
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Effets visuels concentrés sur le hero */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(168, 85, 247, 0.1), transparent);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #a855f7, #c084fc, #ddd6fe, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5)); }
    to { filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.8)); }
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    color: #c084fc;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: linear-gradient(45deg, #7c3aed, #a855f7, #c084fc);
    background-size: 200% 200%;
    color: white;
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 50px;
    display: inline-block;
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
    animation: backgroundShift 3s ease infinite;
}

@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.6);
    filter: brightness(1.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.features {
    padding: 5rem 0;
    position: relative;
}

.features h3 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    background: linear-gradient(45deg, #ddd6fe, #c084fc, #a855f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.features h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(45deg, #a855f7, #c084fc);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: rgba(16, 9, 35, 0.6);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(168, 85, 247, 0.1), rgba(192, 132, 252, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
}

.feature-card h4 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ddd6fe;
    position: relative;
}

.feature-card h4::before {
    content: '✨';
    margin-right: 10px;
}

.feature-card p {
    color: #c084fc;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Animation pour les boutons voir plus */
.btn-download {
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-download:hover::after {
    left: 100%;
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h2 {
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-content p {
    animation: fadeInUp 1s ease 0.4s both;
}

.btn-primary {
    animation: fadeInUp 1s ease 0.6s both;
}

.feature-card:nth-child(1) {
    animation: fadeInUp 1s ease 0.8s both;
}

.feature-card:nth-child(2) {
    animation: fadeInUp 1s ease 1s both;
}

.feature-card:nth-child(3) {
    animation: fadeInUp 1s ease 1.2s both;
}

/* Styles pour les autres pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-form {
    background: rgba(16, 9, 35, 0.6);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #ddd6fe;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
}

.auth-form input::placeholder {
    color: #c084fc;
}

.auth-form p {
    text-align: center;
    margin-top: 1rem;
}

.auth-form a {
    color: #a855f7;
    text-decoration: none;
}

.auth-form a:hover {
    color: #c084fc;
}

.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #bbf7d0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Badge admin dans le profil */
.admin-badge {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-weight: bold;
    text-transform: uppercase;
}

/* Amélioration du chargement des images */
.game-image {
    background: linear-gradient(45deg, #1a0b2e, #240b36);
    position: relative;
}

.game-image::before {
    content: '🎮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.3;
    z-index: 1;
}

.game-image img {
    position: relative;
    z-index: 2;
}

/* Loader pour les images */
.game-image img[style*="opacity:0"] + .game-rating {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .features h3 {
        font-size: 2rem;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(16, 9, 35, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #7c3aed, #a855f7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #6d28d9, #8b5cf6);
}

/* Effet de sélection de texte */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
}
