*{
  margin:0;
  padding:0;
  box-sizing:border-box;  
}
html{
    scroll-behavior:smooth;
}
body{
    min-height:100vh;
    background:white;
    color:red;
    font-family:Arial,sans-serif;
    overflow-x:hidden;
}
header{
    position:sticky;
    top:0;
    z-index:100;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 50px;
    background:white;
    border-bottom:2px solid red;
}
.logo{
    font-size:25px;
    font-weight:900;
    letter-spacing:1px;
    color:red;
}
.header-score{
    padding:8px 14px;
    border:2px solid red;
    color:red;
    font-weight:bold;
}
.header-score span{
    color:red;
    font-weight:bold;
}
main{
    width:min(1100px,92%);
    margin:auto;
}
.screen{
    display:none;
    min-height:calc(100vh-80px);
}
.screen.active{
    display:block!important;
}
.hero{
    text-align:center;
    padding:80px 20px 55px;
}
.subtitle{
    display:inline-block;
    padding:6px 12px;
    border:2px solid red;
    color:red;
    font-size:12px;
    font-weight:bold;
    letter-spacing:3px;
}
.hero h1{
    margin-top:20px;
    font-size:clamp(50px,9vw,90px);
    font-weight:900;
    line-height:1;
    color:red;
}
.hero>p:last-child{
    margin-top:20px;
    color:red;
    font-size:17px;
}
.game-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    padding:10px 0 70px;
}
.game-card{
    min-height:240px;
    padding:30px 25px;
    background:white;
    border:2px solid red;
    color:red;
    cursor:pointer;
    transition:0.2s ease;
}
.game-card:hover{
    background:red;
    color:white;
    transform:translateY(-4px);
}
.game-icon{
    display:block;
    font-size:50px;
    margin-top:20px;
}
.game-card p{
    color:red;
    line-height:1.5;
}
.game-card:hover p{
    color:white;
}
.game-header{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    margin:30px 0 20px;
    padding:14px 18px;
    background:white;
    border:2px solid red;
}
.game-header>div:nth-child(2){
    font-weight:bold;
    font-size:20px;
}
.game-header>div:last-child{
    text-align:right;
    color:red;
    font-weight:bold;
}
.back-button{
    width:fit-content;
    padding:8px 14px;
    border:2px solid red;
    background:white;
    color:red;
    cursor:pointer;
}
.back-button:hover{
    background:red;
    color:white;
}
.game-area{
    min-height:500px;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:35px;
    background:white;
    border:2px solid red;
}
#gameContent{
    width:100%;
    text-align:center;
}
button{
    font-family:inherit;
}
.game-card,
button{
    -webkit-tap-highlight-color:transparent;
}
footer{
    padding:30px;
    text-align:center;
    color:red;
    border-top:2px solid red;
}
.memory-grid{
    display:grid;
    grid-template-columns:repeat(4,90px);
    gap:15px;
    justify-content:center;
}
.memory-info{
    display:flex;
    justify-content:center;
    gap:40px;
    margin-bottom:25px;
    color:red;
    font-weight:bold;
}
.memory-card{
    width:90px;
    height:90px;
    border:2px solid red;
    background:white;
    cursor:pointer;
    font-size:32px;
}
.memory-card:hover{
    background:red;
    color:white;
}
.memory-card .card-back{
    display:none;
}
.memory-card.flipped .card-front{
    display:none;
}
.memory-card.flipped .card-back{
    display:inline;
}
.memory-card.matched{
    background:red;
    color:white;
}
.sequence-game{
    text-align:center;
}
#sequenceInput{
    width:180px;
    padding:12px 15px;
    border:2px solid red;
    background:white;
    color:red;
    font-size:20px;
    text-align:center;
    outline:none;
    margin-right:8px;
}
#sequenceInput:focus{
    border-color:red;
}
.sequence-game button{
    padding:12px 20px;
    border:2px solid red;
    background:red;
    color:white;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
}
#sequenceMessage{
    margin-top:20px;
    min-height:28px;
    color:red;
    font-size:18px;
    font-weight:bold;
}
.pattern-game{
    text-align:center;
}
#patternInput {
    width:180px;
    padding:12px 15px;
    border:2px solid red;
    background:white;
    color:red;
    font-size:20px;
    text-align:center;
    outline:none;
    margin-right:8px;
}
.pattern-options{
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
    margin-top:25px;
}
.pattern-options button{
    width:80px;
    height:60px;
    border:2px solid red;
    background:white;
    color:red;
    font-size:28px;
    cursor:pointer;
}
.pattern-options button:hover{
    background:red;
    color:white;
}
#patternMessage{
    margin-top:20px;
    min-height:28px;
    color:red;
    font-size:18px;
    font-weight:bold;
}
