:root {
    --primary: #2D5A27;
    --secondary: #F4D03F;
    --dark: #0a110a;
    --light: #ecf0f1;
    --accent: #D35400;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

h1, h2, h3, .brand {
    font-family: 'Luckiest Guy', cursive;
}

/* Cleanup links */
a {
    color: var(--secondary);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

.main-header {
    background: var(--dark);
    border-bottom: 4px solid var(--primary);
}

.nav-link {
    color: var(--light);
    font-weight: bold;
    margin: 0 1rem;
    display: flex;
    align-items-center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--secondary);
    text-decoration: none;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: translateY(-3px);
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 15px;
    border: 2px solid transparent;
    transition: transform 0.3s;
    text-align: center;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

/* Rarity colors */
.commun { border-color: #95a5a6; }
.rare { border-color: #3498db; }
.epique { border-color: #9b59b6; box-shadow: 0 0 15px rgba(155, 89, 182, 0.4); }
.legendaire { border-color: #f1c40f; box-shadow: 0 0 25px rgba(241, 196, 15, 0.6); animation: gold-shine 3s infinite alternate; }

@keyframes gold-shine {
    from { box-shadow: 0 0 10px rgba(241, 196, 15, 0.4); }
    to { box-shadow: 0 0 30px rgba(241, 196, 15, 1); }
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Puzzle styles */
.puzzle-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 15px;
    border: 3px solid var(--primary);
    aspect-ratio: 16/9;
}

.puzzle-piece {
    background: #222;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.puzzle-piece.revealed img {
    opacity: 1;
}

.puzzle-piece img {
    width: 400%; /* Since it's 4x3 */
    height: 300%;
    position: absolute;
    opacity: 0.2;
    filter: grayscale(1);
    transition: 0.5s;
    object-fit: cover;
}

.hover-gold:hover {
    color: var(--secondary) !important;
}