@import url('https://fonts.googleapis.com/css2?family=Nova+Flat&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

header a {       font-family: 'Nova Flat', sans-serif;
    color: #ffd600;
    text-decoration: none;
    font-size: 1.6rem;
    transition: opacity 0.3s;
}

header a:hover {
    color: #fff;
}

header.logo{
    font-family: 'Nova Flat', sans-serif;
    font-size: 30px;
    padding: 15px;
    text-align: center;
}

.nav-toggle {
    cursor: pointer;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s;  color: #ffd600;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-menu {
    position: absolute;
    top: 100%;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-menu.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 10px;
}

.nav-menu a {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    padding: 15px 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.nav-menu a:last-child {
    border-bottom: none;
}

.nav-menu a:hover {
    background: #667eea;
    color: white;
    padding-left: 25px;
}

.container {
    flex: 1;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.container {
    flex: 1;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 25px;
    font-size: 2.5em;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 25px;
}

select, button {
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
    color: #667eea;
    font-weight: bold;
    transition: all 0.3s;
}

button:hover, select:hover {
    background: #667eea;
    color: #fff;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stats {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    color: #555;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: #f0f4ff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

#gameBoard {
    display: grid;
    gap: 10px;
    margin: 30px auto;
    max-width: 600px;
    justify-content: center;
}

.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.card:hover:not(.flipped):not(.matched) {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.card.flipped {
    background: #fff;
    border: 3px solid #667eea;
}

.card.matched {
    background: #d4edda;
    border: 3px solid #28a745;
    cursor: default;
}

.card-back {
    color: #fff;
    font-size: 1.5em;
}

.card-front {
    display: none;
    font-size: 2em;
}

.card.flipped .card-back {
    display: none;
}

.card.flipped .card-front,
.card.matched .card-front {
    display: block;
}

#message {
    text-align: center;
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
    margin: 20px 0;
    min-height: 30px;
}

.footer {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer a, a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover, a:hover {
    color: #ffd600;
    text-decoration: none;
}

.footer a:focus, a:focus {
    color: #fff;
    text-decoration: none;
    outline: none;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }

    .container {
        padding: 20px;
        margin: 10px;
    }

    .card {
        font-size: 1.5em;
    }

    .stats {
        font-size: 16px;
        gap: 15px;
    }
}

.next-game
{
    background: rgba(0, 0, 0, .3);
    border-radius: 10px;
    margin: 20px auto 30px;
    padding: 20px 15px;
}

.mr-15
{
   margin-right: 15px
}