* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F8F9FA;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}
.container {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}
/* Стили для логотипа */
.logo-container {
    margin-bottom: 20px;
    text-align: center;
}
.logo {
    max-width: 120px;
    max-height: 80px;
    height: auto;
    width: auto;
    object-fit: contain;
}
.game-info {
    margin-top: 30px;
}
#restart-btn {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #F7D33F;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
#restart-btn:hover {
    background-color: rgb(236, 212, 114);
}
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 0 auto;
    max-width: 600px;
    padding: 20px;
}
.card {
    aspect-ratio: 1;
    background-color: #FFFFFF;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.card:hover {
    transform: translateY(-2px);
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 12px;
}
.card.flipped {
    background-color: #F0F0F0;
    transform: rotateY(180deg);
}
.card.flipped img {
    display: block;
}
.card.matched {
    background-color: #000000;
    box-shadow: 0 0 0 2px #F7D33F;
}
#win-message {
    margin-top: 30px;
    padding: 20px;
    background-color: rgb(247, 211, 63);
    color: rgb(0, 0, 0);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
    position: relative;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Стили для промокода */
.promo-code {
    color: #000000;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.promo-code:hover {
    background-color: rgba(255, 255, 255, 0.5);
}
/* Стили для уведомления о копировании */
.copy-notification {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.copy-notification.show {
    opacity: 1;
}
/* Popup styles */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#win-popup {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: popIn 0.4s ease-out;
    position: relative;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#win-message {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #F7D33F;
    color: rgb(0, 0, 0);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    position: relative;
}

.popup-buttons {
    margin-top: 20px;
}
/* Mobile responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    .logo {
        max-width: 100px;
        max-height: 60px;
    }
    .game-board {
        gap: 8px;
        padding: 10px;
    }
    .card {
        border-radius: 8px;
    }
    #win-message {
        font-size: 16px;
        padding: 15px;
    }
    #win-popup {
        padding: 20px;
        width: 320px;
    }
}
.close-popup-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.close-popup-btn:hover {
    color: #333;
}
