* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    text-align: center;
    background: linear-gradient(-45deg, #c77dff, #9d4edd, #5a189a, #3c096c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mode-selector {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.mode-btn {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-family: 'Alfa Slab One', cursive;
}
.mode-btn.active {
    background: #5a189a;
    box-shadow: 0 0 10px #e0aaff;
}

#turn-display {
    font-family: 'Alfa Slab One', cursive;
    color: #fff;
    background: rgba(90, 24, 154, 0.4);
    padding: 10px 25px;
    border-radius: 50px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#heading {
    font-size: 55px;
    color: #3c096c; 
    font-family: 'Alfa Slab One', cursive;
    margin: 20px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(224, 170, 255, 0.6);
}

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

.game {
    height: 60vmin;
    width: 60vmin;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
}

.box {
    height: 18vmin;
    width: 18vmin;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: rgba(224, 170, 255, 0.4);
    backdrop-filter: blur(10px);
    font-size: 8vmin;
    font-family: 'Alfa Slab One', cursive;
    cursor: pointer;
    transition: 0.3s;
}

.box:hover {
    background: rgba(224, 170, 255, 0.6);
    transform: scale(1.05);
}

#reset_btn, #new_game_btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #e0aaff;
    color: #5a189a;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    font-weight: bold;
    transition: 0.3s;
}

#reset_btn:hover, #new_game_btn:hover {
    background-color: #fff;
    transform: scale(1.1);
}

#msg {
    color: #fff;
    font-size: 8vmin;
    font-family: 'Alfa Slab One', cursive;
    text-shadow: 0 0 20px #5a189a;
}

.msg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
}

.hide { display: none; }

#footer {
    padding: 2rem;
    color: #e0aaff;
}

.social-links a {
    color: #e0aaff;
    font-size: 2rem;
    margin: 0 15px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.social-links a:hover {
    color: #fff;
    transform: scale(1.4) rotate(10deg);
}
