/* Variables pour la cohérence des couleurs */
:root {
    --twitch-purple: #9146ff;
    --twitch-purple-dark: #772ce8;
    --twitch-purple-light: #b9a3e3;
    --background-dark: #18181b;
    --background-light: #1f1f23;
    --accent-color: #bf94ff;
    --text-primary: #efeff1;
    --text-secondary: #adadb8;
}

body {
    background-color: var(--background-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    margin: 0;
    padding: 20px;
}

/* Section Introduction */
.intro-section {
    text-align: left;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 800px;
    margin-bottom: 3rem;
}

.intro-section h1 {
    font-size: 3rem;
    color: var(--twitch-purple);
    text-shadow: 0 0 15px rgba(145, 70, 255, 0.5);
    margin: 0 0 2rem;
    text-align: center;
}

.game-description {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--twitch-purple);
}

.game-description p {
    margin: 1rem 0;
    line-height: 1.6;
}

.game-description strong {
    color: var(--accent-color);
}

/* Liens stylisés */
.links-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 0 1rem;
}

.inventory-link, .twitch-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--twitch-purple);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.inventory-link:hover, .twitch-link:hover {
    background: var(--twitch-purple-dark);
    transform: translateY(-2px);
}

.twitch-link img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
}

.effects-guide {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--twitch-purple);
}

.effects-guide h2 {
    color: var(--accent-color);
    margin-top: 0;
    font-size: 1.5rem;
}

.effects-guide ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.effects-guide ul li {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--background-dark);
    border-radius: 5px;
    border-left: 3px solid var(--twitch-purple);
}

.effects-guide .note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(145, 70, 255, 0.1);
    border-radius: 5px;
    font-style: italic;
    color: var(--text-secondary);
}

/* Contrôles améliorés */
.controls {
    background: var(--background-light);
    border-bottom: 2px solid var(--twitch-purple);
    box-shadow: 0 4px 20px rgba(145, 70, 255, 0.15);
    padding: 20px;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
}

.filter-group > div {
    display: flex;
    gap: 5px;
}

.btn, .filter-select {
    padding: 10px 20px;
    border: 1px solid var(--twitch-purple);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background: var(--background-dark);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover, .filter-select:hover {
    background: var(--twitch-purple-dark);
    transform: translateY(-1px);
}

.btn.active {
    background: var(--twitch-purple);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(145, 70, 255, 0.5);
}

/* Conteneur de cartes */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 2rem auto;
}

.card-wrapper {
    perspective: 1000px;
}

.card {
    position: relative;
    width: 100%;
    padding-bottom: 145%;
    transform-style: preserve-3d;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(145, 70, 255, 0.3);
}

.card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Effet Holographique */
.holographic .card {
    animation: holo 3s linear infinite;
}

.holographic .card img {
    filter: brightness(1.2) contrast(1.1);
}

.holographic .card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255,0,0,0.2) 0%,
        rgba(0,255,0,0.2) 25%,
        rgba(0,0,255,0.2) 50%,
        rgba(255,0,255,0.2) 75%,
        rgba(255,255,0,0.2) 100%
    );
    opacity: 1;
    z-index: 1;
    animation: holo 3s linear infinite;
}

/* Effet Doré */
.golden .card img {
    filter: brightness(1.1) sepia(0.3) saturate(1.5);
}

.golden .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Gradient doré de base */
        linear-gradient(
            45deg,
            rgba(255,215,0,0.2) 0%,
            rgba(255,248,220,0.3) 50%,
            rgba(255,215,0,0.2) 100%
        ),
        /* Set 1 de paillettes brillantes */
        radial-gradient(circle at 30% 40%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 45% 70%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 60% 30%, rgba(255,255,220,0.8) 0%, transparent 1%),
        radial-gradient(circle at 75% 60%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 25% 50%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 88% 33%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 12% 88%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 92% 92%, rgba(255,255,220,0.8) 0%, transparent 1%),
        /* Set 2 de paillettes brillantes */
        radial-gradient(circle at 10% 20%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 85% 75%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 40% 15%, rgba(255,255,220,0.8) 0%, transparent 1%),
        radial-gradient(circle at 90% 45%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 15% 65%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 5% 42%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 82% 18%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 22% 76%, rgba(255,255,220,0.8) 0%, transparent 1%),
        /* Set 3 de paillettes brillantes */
        radial-gradient(circle at 55% 85%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 70% 25%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 20% 55%, rgba(255,255,220,0.8) 0%, transparent 1%),
        radial-gradient(circle at 80% 80%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 35% 35%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 95% 63%, rgba(255,223,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 8% 95%, rgba(255,215,0,0.8) 0%, transparent 1%),
        radial-gradient(circle at 67% 5%, rgba(255,255,220,0.8) 0%, transparent 1%),
        /* Paillettes moyennes */
        radial-gradient(circle at 20% 30%, rgba(255,223,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 40% 60%, rgba(255,215,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 70% 40%, rgba(255,248,220,0.6) 0%, transparent 2%),
        radial-gradient(circle at 55% 25%, rgba(255,223,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 85% 55%, rgba(255,215,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 15% 45%, rgba(255,223,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 75% 95%, rgba(255,215,0,0.6) 0%, transparent 2%),
        radial-gradient(circle at 95% 15%, rgba(255,248,220,0.6) 0%, transparent 2%),
        /* Petites paillettes */
        radial-gradient(circle at 35% 25%, rgba(255,223,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 65% 75%, rgba(255,215,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 50% 50%, rgba(255,248,220,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 80% 25%, rgba(255,223,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 15% 85%, rgba(255,215,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 45% 95%, rgba(255,223,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 92% 88%, rgba(255,215,0,0.4) 0%, transparent 1.5%),
        radial-gradient(circle at 7% 65%, rgba(255,248,220,0.4) 0%, transparent 1.5%);
    background-size: 
        100% 100%,
        /* Tailles paillettes brillantes Set 1 */
        30px 30px, 25px 25px, 35px 35px, 28px 28px, 32px 32px, 27px 27px, 33px 33px, 29px 29px,
        /* Tailles paillettes brillantes Set 2 */
        30px 30px, 25px 25px, 35px 35px, 28px 28px, 32px 32px, 27px 27px, 33px 33px, 29px 29px,
        /* Tailles paillettes brillantes Set 3 */
        30px 30px, 25px 25px, 35px 35px, 28px 28px, 32px 32px, 27px 27px, 33px 33px, 29px 29px,
        /* Tailles paillettes moyennes */
        50px 50px, 45px 45px, 55px 55px, 48px 48px, 52px 52px, 47px 47px, 53px 53px, 49px 49px,
        /* Tailles petites paillettes */
        40px 40px, 35px 35px, 45px 45px, 38px 38px, 42px 42px, 37px 37px, 43px 43px, 39px 39px;
    opacity: 0.7;
    z-index: 1;
    mix-blend-mode: color-dodge;
    animation: goldenSparkle 3s ease infinite;
}

/* Effet Cosmos */
.cosmos .card {
    animation: holo 3s linear infinite;
}

.cosmos .card img {
    filter: brightness(1.2) contrast(1.2);
}

.cosmos .card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background-image: url('holo.png');
    background-size: 120% 120%;
    mix-blend-mode: color-dodge;
    opacity: 0.8;
    z-index: 1;
    transform: translateZ(1px);
    filter: brightness(1.5) contrast(1.3) saturate(1.5);
}

.cosmos .card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255,0,0,0.2) 0%,
        rgba(0,255,0,0.2) 25%,
        rgba(0,0,255,0.2) 50%,
        rgba(255,0,255,0.2) 75%,
        rgba(255,255,0,0.2) 100%
    );
    opacity: 1;
    z-index: 2;
    animation: holo 3s linear infinite;
}

/* Info-bulle améliorée */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(31, 31, 35, 0.95);
    padding: 1rem;
    display: none;
    transform: translateY(0);
    border-top: 2px solid var(--twitch-purple);
    z-index: 10;
    pointer-events: none;
    isolation: isolate;
}

.card:hover .card-info {
    display: block;
}

/* Protection du texte contre les effets */
.holographic .card-info,
.golden .card-info,
.cosmos .card-info {
    filter: none !important;
    animation: none !important;
    opacity: 1 !important;
    background: rgba(31, 31, 35, 0.95) !important;
    mix-blend-mode: normal !important;
}

.card-info h3 {
    color: var(--twitch-purple);
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.card-info p {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes holo {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes goldenSparkle {
    0%, 100% { filter: brightness(0.8) contrast(1); }
    50% { filter: brightness(1.2) contrast(1.1); }
}

@keyframes cosmosSparks {
    from {
        background-position: 
            0 0,
            50px 50px,
            -30px -30px,
            20px 20px,
            -50px -50px,
            0 0;
    }
    to {
        background-position: 
            100px 100px,
            150px 150px,
            70px 70px,
            220px 220px,
            250px 250px,
            0 0;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .intro-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    .links-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .inventory-link,
    .twitch-link {
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .controls {
        padding: 15px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 1rem;
    }

    .filter-group {
        width: calc(50% - 5px);
        min-width: 140px;
    }

    .filter-group:first-child {
        width: 100%;
    }

    .filter-group:first-child > div {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .filter-group label {
        text-align: left;
        white-space: nowrap;
        font-size: 12px;
        margin-bottom: 4px;
    }

    .btn, .filter-select {
        width: 100%;
        padding: 8px;
        font-size: 13px;
        height: 36px;
        min-height: 36px;
    }

    .filter-select {
        box-sizing: border-box;
    }

    .cards-container {
        padding: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .card-info {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .intro-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .game-description,
    .effects-guide {
        padding: 1rem;
    }

    .controls {
        padding: 10px;
        gap: 8px;
    }

    .filter-group {
        margin-bottom: 0;
    }

    .filter-group:first-child > div {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .btn, .filter-select {
        padding: 6px;
        font-size: 12px;
        height: 32px;
        min-height: 32px;
    }

    .card-info {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Styles pour les liens dans la description */
.game-description a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.game-description a:hover {
    color: var(--twitch-purple-light);
    text-decoration: underline;
}

/* Animation plus fluide pour les transitions de cartes */
.card-wrapper {
    transition: opacity 0.3s ease;
}

.card-wrapper[style*="display: none"] {
    opacity: 0;
}

/* Animations */
@keyframes holo {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes goldenSparkle {
    0%, 100% { filter: brightness(0.8) contrast(1); }
    50% { filter: brightness(1.2) contrast(1.1); }
}

@keyframes cosmosSparks {
    from {
        background-position: 
            0 0,
            50px 50px,
            -30px -30px,
            20px 20px,
            -50px -50px,
            0 0;
    }
    to {
        background-position: 
            100px 100px,
            150px 150px,
            70px 70px,
            220px 220px,
            250px 250px,
            0 0;
    }
}

/* Protection du texte contre les effets */
.holographic .card-info,
.golden .card-info,
.cosmos .card-info {
    filter: none !important;
    animation: none !important;
    opacity: 1 !important;
    background: rgba(31, 31, 35, 0.95) !important;
    mix-blend-mode: normal !important;
} 