@charset "utf-8";
@import"./reset.css";

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

body {
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    text-align: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.5s ease, color 0.5s ease;
    overflow: hidden;

    --btn-bg: #34495e;
    --btn-hover: #2c3e50;
    --input-bg: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

body.purple {
    --btn-bg: #8e44ad;
    --btn-hover: #7d3c98;
    --input-bg: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #4b0082, #a742f5, #ff6b6b);
}

.controls-left {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.control-btn {
    width: 170px;
    font-size: 1.5rem;
    padding: 12px;
}

.vol-box { 
    position: absolute; 
    top: 30px; 
    right: 30px; 
    display: flex; 
    flex-direction: column;
    gap: 10px; 
    align-items: flex-end; 
}

.vol-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.vol-control span {
    font-size: 1.9rem;
    font-weight: 400;
}

#volumeSlider {
    width: 80px;
    cursor: pointer;
    accent-color: #e2ecea;
    
}

#muteBtn {
    text-align: center;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

#game { 
    background: rgba(255, 255, 255, 0.1); 
    padding: 40px; 
    border-radius: 20px; 
    backdrop-filter: blur(10px); 
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.stats { 
    display: flex; 
    justify-content: space-around; 
    gap: 200px; 
    margin-bottom: 10px; 
}

.stats p {font-size: 2.6rem;}

#word { 
    font-size: 3.6rem; 
    margin: 25px;
    font-weight: 600; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

input {
    padding: 15px;
    font-size: 1.9rem;
    border-radius: 10px;
    border: none;
    width: 500px;
    outline: none;
    color: #fff;
    text-align: center;
    background: var(--input-bg);
}
input::placeholder {
    color: rgba(255, 255, 255, 0.8); 
    opacity: 1; 
}

.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s ease;
}

.stats-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--btn-bg);
    padding: 35px;
    border-radius: 25px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.8);
    text-align: center;
}

.modal-body h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
}

.user-main-icon {
    font-size: 5rem;
    display: block;
    margin: 0 auto 10px;
}

.modal-divider {
    margin: 25px 0;
    opacity: 0.2;
    border: 0;
    border-top: 1px solid #fff;
}

#highScoresList {
    list-style: none;
    margin: 15px 0;
    gap: 15px;
}

#highScoresList li {
    font-size: 1.5rem;
    font-weight: 500;
    padding: 15px 25px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 8px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.rank-window {
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    padding: 20px 0;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 20px;
    width: 100%;
}

.rank-slider {
    display: inline-block;
    white-space: nowrap;
  animation: slideSeamless 10s linear infinite;
}

.rank-slider span {
    display: inline-block;
    padding: 0 30px; 
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
}

@keyframes slideSeamless {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

button {
    padding: 10px 35px;
    cursor: pointer;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.8rem;
    transition: 0.3s;
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#startBtn { 
    margin: 30px auto 0; 
    background: var(--btn-bg); 
    color: #fff;
    width: 200px;
    border: none;
    font-weight: 300;
    padding: 15px;
}

#startBtn:hover {
   background: var(--btn-hover);
    transform: scale(1.05);
}

.user-main-icon {
    font-size: 3.5rem;
}

#closeSidebar {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

/* Tablet and Small Screens (below 768px) */
@media (max-width: 768px) {
    h1 { 
        font-size: 2.2rem;
     }
    #game { 
        width: 95%;
        padding: 25px;
    }
    .stats { 
        gap: 50px; 
        font-size: 1.5rem; 
        justify-content: center; 
    }
    #word { font-size: 2.8rem; }
    input { 
        width: 100%; 
        font-size: 1.6rem; 
    }
    .modal-content { 
        width: 95%; 
        padding: 20px; 
    }
}

/* Mobile Screens */
@media (max-width: 480px) {
    .controls-left { 
        top: 10px; 
        left: 10px;
    }
    .control-btn { 
        width: 140px; 
        font-size: 0.9rem; 
        padding: 8px; 
    }
    .vol-box { 
        top: 10px; 
        right: 10px; 
    }
    h1 { 
        font-size: 1.6rem; 
        margin-top: 100px; 
    }
    #word { font-size: 2rem; }
    .stats { 
        font-size: 1.2rem; 
        gap: 20px; 
    }
}