@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&family=Poppins:wght@400;700&display=swap');

body {
    font-family: 'Mountains of Christmas', cursive;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    background: url("assets/background.jpeg") no-repeat center center fixed;
    background-size: cover;
    color: rgb(255, 255, 255);
    overflow-x: hidden;
    position: relative; /* Add this */
}

.header {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-areas: 
        "title . button"
        "instructions instructions counter";
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.header h1 {
    grid-area: title;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 0;
    text-align: left;
    /* Comment out or delete this static glow
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(128, 0, 255, 0.4);
    */

    /* Uncomment this line */
    animation: headerGlow 2s ease-in-out infinite alternate;
}

/* Keep this @keyframes section */
@keyframes headerGlow {
    from {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.5),
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(128, 0, 255, 0.4);
    }
    to {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(128, 0, 255, 0.6);
    }
}

.instructions {
    grid-area: instructions;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    text-align: left;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

#counter {
    grid-area: counter;
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4);
    text-align: right;
    margin: 0;
    white-space: nowrap;
    font-weight: 700;
}

#auth-button, #mint-nft-button, #login-mint-button, #play-again-button {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#auth-button {
    grid-area: button;
    background-color: rgb(67, 201, 109);
    white-space: nowrap;
    justify-self: end;
}

#auth-button:hover {
    background-color: #55ff95;
    transform: translateY(-2px);
}

#game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10px;
    width: 90vw;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.card {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 165%;
    cursor: pointer;
    perspective: 1000px;
}

.card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
}

.card-front {
    background-image: url('assets/32Halloween_2021_NFT_back.png');
}

.card-back {
    transform: rotateY(180deg);
}

.card.matched .card-inner {
    visibility: hidden;
}

/* Victory Screen Styles */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#message {
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
    color: white;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.victory-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.victory-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: white;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.victory-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

#mint-nft-button {
    background-color: orange;
    color: black;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    padding: 12px 24px;
    width: 100%;
    animation: pulse 2s infinite;
}

#mint-nft-button:hover {
    background-color: #ffa500;
    transform: translateY(-2px);
}

#play-again-button {
    background-color: #ff5722;
    color: white;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    padding: 12px 24px;
    width: 100%;
}

#play-again-button:hover {
    background-color: #f4511e;
    transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7),
                   0 0 0 0 rgba(255, 165, 0, 0.4);
    }
    70% { 
        box-shadow: 0 0 10px 20px rgba(255, 165, 0, 0),
                   0 0 20px 30px rgba(255, 165, 0, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0),
                   0 0 0 0 rgba(255, 165, 0, 0);
    }
}

.hidden {
    display: none !important;
}

#success-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    z-index: 15;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    0% { transform: translateX(-50%) translateY(50px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .header {
        grid-template-areas:
            "title . button"
            "instructions instructions instructions"
            "counter counter counter";
    }

    .instructions, #counter {
        text-align: center;
    }

    #game-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 10px;
    }

    #game-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

.music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.player-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.player-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Add these new styles here */
.player-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

/* Option 1: Add a colored circle behind the disc */
#toggle-player svg {
    background: linear-gradient(45deg, #ff6b6b, #8c52ff);
    border-radius: 50%;
    padding: 4px;
}

/* Option 2: More noticeable spin animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#toggle-player.playing svg {
    animation: spin 3s linear infinite;
    /* Add a subtle pulsing effect */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.track-info {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}