.matchdiv {
    background-color: darkolivegreen;
    width:1024px;
    height: 576px;

    margin: 50px auto 0 auto;
}

body {
    background-color: black;
    margin : 0;
}

#game {
    position: relative;
}

.intro-screen {
    position: absolute;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
    color: #fff;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background: #0b2e1f url('../assets/TitleBackground.jpg') center / cover no-repeat;
}
.intro-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.50) 100%);
    pointer-events: none;
}

.intro-card {
    position: relative;
    width: min(560px, 92vw);
    box-sizing: border-box;
    padding: 26px 32px 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(8,40,27,0.88), rgba(5,26,18,0.92));
    border: 2px solid rgba(255,211,78,0.55);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: introIn 0.5s cubic-bezier(0.2,0.8,0.2,1) both;
}
@keyframes introIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.intro-logo {
    display: block;
    width: min(360px, 80%);
    height: auto;
    margin: 0 auto 4px;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.55));
}
.intro-tagline {
    margin: 2px 0 18px;
    font-family: 'Happy Monkey', 'Roboto', cursive;
    font-size: 1.06rem;
    color: #ffe9a8;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.how-to-title {
    margin: 0 0 12px;
    font-family: 'Mogra', system-ui, cursive;
    font-weight: 400;
    font-size: 1.32rem;
    letter-spacing: 0.5px;
    color: #FFD34E;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    gap: 11px;
    text-align: left;
}
.steps li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 0.98rem;
    line-height: 1.35;
    color: #eef5ef;
}
.step-ico {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    color: #FFD34E;
    background: rgba(255,211,78,0.12);
    border: 1px solid rgba(255,211,78,0.42);
    border-radius: 9px;
}

.intro-button {
    display: inline-block;
    padding: 14px 46px;
    font-family: 'Mogra', system-ui, sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #7a0000;
    background: linear-gradient(180deg, #FFE07A, #FFC300);
    border: 2px solid #8B0000;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 0 #b8860b, 0 10px 20px rgba(0,0,0,0.45);
    transition: transform 0.08s ease, background 0.2s ease;
    animation: pulseGlow 1.9s ease-in-out infinite;
}
.intro-button:hover { background: linear-gradient(180deg, #FFE9A0, #FFCE1F); }
.intro-button:active { transform: translateY(4px); }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 6px 0 #b8860b, 0 10px 20px rgba(0,0,0,0.45), 0 0 0 rgba(255,211,78,0); }
    50%      { box-shadow: 0 6px 0 #b8860b, 0 10px 20px rgba(0,0,0,0.45), 0 0 24px rgba(255,211,78,0.5); }
}

@media (prefers-reduced-motion: reduce) {
    .intro-card, .intro-button { animation: none; }
}

.main-menu-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #FFD34E;
    border: 2px solid #8B0000;
    border-radius: 20px;
    color: #8B0000;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.main-menu-btn:hover {
    background-color: #FFC300;
    color: #fff;
    box-shadow: 2px 6px 18px rgba(0,0,0,0.35);
}

.full-menu-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #FFD34E;
    border: 2px solid #8B0000;
    border-radius: 20px;
    color: #8B0000;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.full-menu-btn:hover {
    background-color: #FFC300;
    color: #fff;
}