/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Cormorant Garamond', serif;
}

body {
    background: #050508;
    color: #e8e4d9;
}

/* Écrans */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Transition de sortie améliorée */
.screen.fade-out {
    animation: screenFadeOut 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes screenFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
        filter: blur(10px);
    }
}

/* ========== ÉCRAN D'INTRO ========== */
#intro-screen {
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(88, 28, 135, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(30, 58, 138, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 90%, rgba(139, 69, 19, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #0a0a12 0%, #0d0815 50%, #080610 100%);
}

/* Étoiles animées améliorées */
.stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 160px 120px, #fff, transparent),
        radial-gradient(2px 2px at 200px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 220px 50px, #fff, transparent),
        radial-gradient(2px 2px at 250px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 280px 90px, #fff, transparent);
    background-repeat: repeat;
    background-size: 300px 200px;
    animation: starsMove 150s linear infinite;
}

.stars2 {
    background-image: 
        radial-gradient(1px 1px at 45px 45px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 110px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 180px 30px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 240px 140px, rgba(255,255,255,0.5), transparent);
    background-repeat: repeat;
    background-size: 280px 160px;
    animation: starsMove 200s linear infinite;
    opacity: 0.7;
}

.stars3 {
    background-image: 
        radial-gradient(3px 3px at 100px 50px, rgba(147, 112, 219, 0.8), transparent),
        radial-gradient(3px 3px at 200px 150px, rgba(212, 175, 55, 0.6), transparent),
        radial-gradient(2px 2px at 300px 100px, rgba(138, 43, 226, 0.7), transparent),
        radial-gradient(3px 3px at 400px 200px, rgba(255, 215, 0, 0.5), transparent);
    background-repeat: repeat;
    background-size: 500px 300px;
    animation: twinkle 6s ease-in-out infinite, starsMove 250s linear infinite;
}

@keyframes starsMove {
    from { transform: translateY(0) translateX(0); }
    to { transform: translateY(-2000px) translateX(-500px); }
}

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

/* Nebula effect */
.nebula {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 30% 20%, rgba(138, 43, 226, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 70% 70%, rgba(75, 0, 130, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 50%, rgba(186, 85, 211, 0.04) 0%, transparent 50%);
    animation: nebulaPulse 12s ease-in-out infinite;
}

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

/* Shooting stars */
.shooting-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    opacity: 0;
    animation: shoot 4s ease-in-out infinite;
}

.shooting-star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.shooting-star:nth-child(2) { top: 30%; left: 60%; animation-delay: 2s; }
.shooting-star:nth-child(3) { top: 50%; left: 40%; animation-delay: 4s; }
.shooting-star:nth-child(4) { top: 70%; left: 80%; animation-delay: 6s; }
.shooting-star:nth-child(5) { top: 20%; left: 10%; animation-delay: 8s; }

@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 0; }
    5% { opacity: 1; }
    20% { transform: translateX(300px) translateY(300px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

/* Contenu intro */
.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.main-title {
    font-family: 'Cinzel Decorative', cursive;
    margin-bottom: 2rem;
    position: relative;
}

.title-line {
    display: block;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    background: linear-gradient(135deg, #d4af37 0%, #f4e4bc 20%, #d4af37 40%, #ffd700 60%, #f4e4bc 80%, #d4af37 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 4s linear infinite, titleGlow 3s ease-in-out infinite;
    letter-spacing: 0.15em;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
}

.title-line.subtitle {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #9370db 0%, #dda0dd 30%, #ba55d3 60%, #9370db 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(147, 112, 219, 0.5));
    animation: goldShimmer 5s linear infinite;
}

@keyframes goldShimmer {
    to { background-position: 300% center; }
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4)); }
    50% { filter: drop-shadow(0 0 50px rgba(212, 175, 55, 0.7)); }
}

/* Ligne décorative */
.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.decoration-line {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

.decoration-symbol {
    font-size: 1.5rem;
    color: rgba(212, 175, 55, 0.8);
    animation: symbolRotate 8s linear infinite;
}

@keyframes symbolRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.intro-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(232, 228, 217, 0.75);
    margin-bottom: 3rem;
    font-style: italic;
    letter-spacing: 0.08em;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: textFade 3s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* Bouton magique amélioré */
.magic-btn {
    position: relative;
    padding: 1.4rem 3.5rem;
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: #f4e4bc;
    background: linear-gradient(135deg, rgba(20, 10, 30, 0.9), rgba(30, 15, 45, 0.9));
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 60px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.2),
        inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.magic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    transition: left 0.7s ease;
}

.magic-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.1), transparent, rgba(147, 112, 219, 0.1), transparent);
    animation: btnRotate 6s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes btnRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.magic-btn:hover::after {
    opacity: 1;
}

.magic-btn:hover {
    background: linear-gradient(135deg, rgba(30, 15, 45, 0.95), rgba(40, 20, 60, 0.95));
    border-color: #d4af37;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.5),
        0 0 80px rgba(212, 175, 55, 0.3),
        0 0 120px rgba(147, 112, 219, 0.2),
        inset 0 0 30px rgba(212, 175, 55, 0.15);
    transform: scale(1.08);
    letter-spacing: 0.25em;
}

.magic-btn:active {
    transform: scale(1.02);
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* Runes flottantes améliorées */
.floating-runes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.rune {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(147, 112, 219, 0.3);
    animation: floatRune 10s ease-in-out infinite;
    text-shadow: 0 0 10px currentColor;
}

.rune:nth-child(1) { left: 8%; top: 15%; animation-delay: 0s; color: rgba(212, 175, 55, 0.3); }
.rune:nth-child(2) { left: 88%; top: 12%; animation-delay: 1.2s; }
.rune:nth-child(3) { left: 12%; top: 72%; animation-delay: 2.4s; color: rgba(186, 85, 211, 0.3); }
.rune:nth-child(4) { left: 82%; top: 78%; animation-delay: 3.6s; }
.rune:nth-child(5) { left: 50%; top: 8%; animation-delay: 4.8s; color: rgba(212, 175, 55, 0.3); }
.rune:nth-child(6) { left: 22%; top: 88%; animation-delay: 6s; }
.rune:nth-child(7) { left: 72%; top: 42%; animation-delay: 7.2s; color: rgba(186, 85, 211, 0.3); }
.rune:nth-child(8) { left: 3%; top: 45%; animation-delay: 8.4s; }
.rune:nth-child(9) { left: 95%; top: 55%; animation-delay: 1.8s; color: rgba(212, 175, 55, 0.3); }
.rune:nth-child(10) { left: 40%; top: 92%; animation-delay: 5.4s; }

@keyframes floatRune {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg) scale(1.1);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-35px) rotate(180deg) scale(1); 
        opacity: 0.8;
    }
    75% {
        transform: translateY(-20px) rotate(270deg) scale(1.1);
        opacity: 0.6;
    }
}

/* ========== ÉCRAN PORTAIL 3D ========== */
#portal-screen {
    background: radial-gradient(ellipse at center, #0a0515 0%, #000 100%);
}

#portal-canvas {
    width: 100%;
    height: 100%;
}

.portal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
}

.portal-text {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    color: rgba(212, 175, 55, 0.9);
    text-align: center;
    opacity: 0;
    transition: opacity 1.5s ease, transform 1s ease;
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.6),
        0 0 40px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(147, 112, 219, 0.3);
    letter-spacing: 0.25em;
}

.portal-text.visible {
    opacity: 1;
    animation: portalTextPulse 2s ease-in-out infinite;
}

@keyframes portalTextPulse {
    0%, 100% { 
        text-shadow: 
            0 0 20px rgba(212, 175, 55, 0.6),
            0 0 40px rgba(212, 175, 55, 0.4),
            0 0 60px rgba(147, 112, 219, 0.3);
    }
    50% { 
        text-shadow: 
            0 0 30px rgba(212, 175, 55, 0.8),
            0 0 60px rgba(212, 175, 55, 0.6),
            0 0 90px rgba(147, 112, 219, 0.5);
    }
}

/* Flash de transition */
.portal-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #fff, #d4af37);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.portal-flash.active {
    animation: flashBang 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flashBang {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* ========== ÉCRAN PRINCIPAL ========== */
#main-screen {
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(88, 28, 135, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(75, 0, 130, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #080812 0%, #0d0a1a 30%, #0a0815 70%, #050510 100%);
}

.mystical-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(147, 112, 219, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(75, 0, 130, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%);
    animation: bgPulse 10s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Grille de fond mystique */
.grid-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(147, 112, 219, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 112, 219, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from { transform: perspective(500px) rotateX(60deg) translateY(0); }
    to { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

.particle.gold {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.9), rgba(212, 175, 55, 0.3), transparent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.particle.purple {
    background: radial-gradient(circle, rgba(147, 112, 219, 0.9), rgba(147, 112, 219, 0.3), transparent);
    box-shadow: 0 0 10px rgba(147, 112, 219, 0.5);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Contenu principal */
.main-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
}

.welcome-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #d4af37 0%, #f4e4bc 30%, #ffd700 50%, #f4e4bc 70%, #d4af37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1), goldShimmer 4s linear infinite;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
}

.welcome-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: rgba(232, 228, 217, 0.7);
    margin-bottom: 3.5rem;
    font-style: italic;
    letter-spacing: 0.1em;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

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

/* Grille des portails */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3.5rem;
    perspective: 1000px;
}

/* Cartes portail améliorées */
.portal-card {
    position: relative;
    padding: 3rem 2rem;
    background: linear-gradient(145deg, rgba(20, 15, 40, 0.9), rgba(15, 10, 30, 0.95));
    border: 1px solid rgba(147, 112, 219, 0.2);
    border-radius: 24px;
    text-decoration: none;
    color: #e8e4d9;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    transform-style: preserve-3d;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.portal-card:hover::before {
    transform: translateX(100%);
}

.portal-card:nth-child(1) { animation-delay: 0.4s; }
.portal-card:nth-child(2) { animation-delay: 0.6s; }
.portal-card:nth-child(3) { animation-delay: 0.8s; }

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(60px) rotateX(10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.card-inner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, currentColor, transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    opacity: 0.1;
}

.portal-card:hover .card-inner-glow {
    width: 300%;
    height: 300%;
}

.portal-card:hover .card-glow {
    opacity: 1;
}

/* Couleurs spécifiques améliorées */
.portal-card.github {
    --card-color: rgba(255, 255, 255, 0.9);
    --card-glow: rgba(255, 255, 255, 0.15);
}
.portal-card.github .card-glow {
    background: radial-gradient(ellipse at 50% 0%, var(--card-glow) 0%, transparent 70%);
}
.portal-card.github .card-inner-glow { color: rgba(255, 255, 255, 0.3); }
.portal-card.github:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 50px rgba(255, 255, 255, 0.2),
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.portal-card.greengaia {
    --card-color: rgba(76, 175, 80, 0.9);
    --card-glow: rgba(76, 175, 80, 0.2);
}
.portal-card.greengaia .card-glow {
    background: radial-gradient(ellipse at 50% 0%, var(--card-glow) 0%, transparent 70%);
}
.portal-card.greengaia .card-inner-glow { color: rgba(76, 175, 80, 0.3); }
.portal-card.greengaia:hover {
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 
        0 0 50px rgba(76, 175, 80, 0.3),
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(76, 175, 80, 0.08);
}

.portal-card.discord {
    --card-color: rgba(88, 101, 242, 0.9);
    --card-glow: rgba(88, 101, 242, 0.2);
}
.portal-card.discord .card-glow {
    background: radial-gradient(ellipse at 50% 0%, var(--card-glow) 0%, transparent 70%);
}
.portal-card.discord .card-inner-glow { color: rgba(88, 101, 242, 0.3); }
.portal-card.discord:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 
        0 0 50px rgba(88, 101, 242, 0.3),
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(88, 101, 242, 0.08);
}

.portal-card:hover {
    transform: translateY(-15px) scale(1.03);
}

.card-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(147, 112, 219, 0.1), rgba(75, 0, 130, 0.15));
    border: 1px solid rgba(147, 112, 219, 0.25);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.5s ease;
}

.card-icon svg {
    width: 44px;
    height: 44px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.portal-card.github .card-icon svg { color: #fff; }
.portal-card.greengaia .card-icon svg { color: #4caf50; }
.portal-card.discord .card-icon svg { color: #5865f2; }

.portal-card:hover .card-icon {
    transform: scale(1.15) rotate(8deg);
}

.portal-card.github:hover .card-icon {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}
.portal-card.greengaia:hover .card-icon {
    background: radial-gradient(circle, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.08));
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}
.portal-card.discord:hover .card-icon {
    background: radial-gradient(circle, rgba(88, 101, 242, 0.2), rgba(88, 101, 242, 0.08));
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.3);
}

.card-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    transition: all 0.4s ease;
}

.portal-card:hover .card-title {
    letter-spacing: 0.12em;
}

.card-desc {
    font-size: 1.05rem;
    color: rgba(232, 228, 217, 0.6);
    font-style: italic;
    transition: color 0.3s ease;
}

.portal-card:hover .card-desc {
    color: rgba(232, 228, 217, 0.8);
}

/* Effet de particules sur les cartes */
.card-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.portal-card:hover .card-particles {
    opacity: 1;
}

/* Bouton retour amélioré */
.return-btn {
    padding: 1.1rem 2.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    color: rgba(232, 228, 217, 0.6);
    background: transparent;
    border: 1px solid rgba(147, 112, 219, 0.25);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 1s ease 1s backwards;
    position: relative;
    overflow: hidden;
}

.return-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.return-btn:hover::before {
    width: 300%;
    height: 300%;
}

.return-btn:hover {
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

.return-btn span {
    position: relative;
    z-index: 1;
}

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

/* Responsive */
@media (max-width: 768px) {
    .portals-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .portal-card {
        padding: 2.5rem 1.8rem;
    }
    
    .rune {
        font-size: 2rem;
    }
    
    .shooting-star {
        width: 60px;
    }
}

/* Curseur personnalisé */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, border-color 0.3s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: rgba(212, 175, 55, 1);
    background: rgba(212, 175, 55, 0.1);
}

.cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(212, 175, 55, 0.9);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}
