/* Base styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Roboto:wght@300;400;700&display=swap');

body {
    background: #0f1620;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #f0f0f0;
    
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-blend-mode: overlay;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section title */
.menu-cards-section h2, .mystic-slider-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 169, 159, 0.7);
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 15px;
}

.menu-cards-section h2::after, .mystic-slider-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--card-color, #00a99f), transparent);
}

.menu-cards-section h2 i, .mystic-slider-section h2 i {
    margin-right: 10px;
    color: #00a99f;
}

/* Cards container */
.menu-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    justify-content: center;
    align-items: stretch;
}

/* Card styling */
.menu-card {
    perspective: 1000px;
    height: 400px;
    width: 100%;
    margin: 0;
}

.menu-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.menu-card:hover .menu-card-inner {
    transform: rotateY(180deg);
}

.menu-card-front, 
.menu-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
}

.menu-card-front {
    background-image: 
        linear-gradient(160deg, rgba(40, 44, 52, 0.9) 0%, rgba(20, 22, 26, 0.95) 100%),
        url('https://dayzaide.fr/TopServeurDayz/assets/img/back_server-card.png');
    background-blend-mode: overlay;
    transform: rotateY(0deg);
}

.menu-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(var(--r), var(--g), var(--b), 0.2) 0%, 
        rgba(20, 22, 26, 0) 70%
    );
    z-index: 1;
}

.menu-card-back {
    background-image: 
        linear-gradient(160deg, rgba(20, 22, 26, 0.95) 0%, rgba(40, 44, 52, 0.95) 100%),
        url('https://dayzaide.fr/TopServeurDayz/assets/img/back_server-card.png');
    background-blend-mode: overlay;
    transform: rotateY(180deg);
    overflow-y: auto;
}

/* Card content */
.menu-card-icon {
    font-size: 3.5rem;
    color: var(--card-color);
    margin-bottom: 20px;
    text-shadow: 0 0 15px var(--card-color);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.1);
}

.menu-card-front h3,
.menu-card-back h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: white;
    margin: 0;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 5px var(--card-color);
    text-align: center;
}

.menu-card-back p {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 10px;
    color: #d4d4d4;
}

.menu-card-back p:first-of-type {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
}

/* Dynamic coloring based on card color */
.menu-card:nth-child(1) { --r: 0; --g: 169; --b: 159; }  /* #00a99f */
.menu-card:nth-child(2) { --r: 52; --g: 152; --b: 219; } /* #3498db */
.menu-card:nth-child(3) { --r: 230; --g: 126; --b: 34; } /* #e67e22 */
.menu-card:nth-child(4) { --r: 155; --g: 89; --b: 182; } /* #9b59b6 */
.menu-card:nth-child(5) { --r: 192; --g: 57; --b: 43; }  /* #c0392b */
.menu-card:nth-child(6) { --r: 46; --g: 204; --b: 113; } /* #2ecc71 */
.menu-card:nth-child(7) { --r: 241; --g: 196; --b: 15; } /* #f1c40f */
.menu-card:nth-child(8) { --r: 52; --g: 73; --b: 94; }   /* #34495e */
.menu-card:nth-child(9) { --r: 0; --g: 169; --b: 159; }  /* #00a99f */

.menu-card:hover .menu-card-front::before {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* Shine effect */
.menu-card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.1), 
                transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.menu-card:hover .menu-card-front::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

/* Scrollbar styling for back card content */
.menu-card-back::-webkit-scrollbar {
    width: 5px;
}

.menu-card-back::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.menu-card-back::-webkit-scrollbar-thumb {
    background: var(--card-color);
    border-radius: 10px;
}

/* Styles pour le slider Mystic */
.mystic-slider-section {
    background: #0f1620;
    padding: 50px 0;
    overflow: hidden;
}

.mystic-slider-container {
    perspective: 1000px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    height: 600px; /* Hauteur fixe importante */
}

.mystic-slider-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    overflow: hidden; /* Important */
}

.mystic-slider-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.8s ease;
    background: linear-gradient(160deg, rgba(40, 44, 52, 0.9) 0%, rgba(20, 22, 26, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.mystic-slider-image {
    max-width: 100%;
    max-height: 400px; /* Réduit pour laisser de la place pour la description */
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 20px;
}

.mystic-slider-description {
    width: 100%;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: #f0f0f0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    padding: 10px;
}

.mystic-slider-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.mystic-slider-control-btn {
    background: rgba(0, 169, 159, 0.7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Orbitron', sans-serif;
}

.mystic-slider-control-btn:hover {
    background: rgba(0, 169, 159, 1);
}

/* Media queries */
@media screen and (max-width: 1200px) {
    .menu-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .menu-cards-container {
        grid-template-columns: 1fr;
    }
    
    .menu-card {
        height: 350px;
    }
    
    .menu-cards-section h2, .mystic-slider-section h2 {
        font-size: 2rem;
    }
    
    .mystic-slider-container {
        max-width: 95%;
    }

    .mystic-slider-image {
        max-height: 300px;
    }

    .mystic-slider-description {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .menu-card-front h3 {
        font-size: 1.5rem;
    }
    
    .menu-card-icon {
        font-size: 2.5rem;
    }
    
    .menu-card {
        height: 300px;
    }
}