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


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin:3rem;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}


.floating-letters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
.letter {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float 10s infinite linear;
    font-weight: 300;
}
@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0.1;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0.1;
    }
}


.game-container{
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.game-header{
    margin-bottom: 2rem;
    text-align:center;
}
.game-title{
    font-size: 4rem;
    font-weight: 300;
    letter-spacing:2px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.game-subtitle{
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}


.instructions{
    background: rgba(255, 255, 255, 0.05);
    border:1px solid rgba(255, 255, 255, 0.1);
    border-radius:1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align:center;
}
.instructions h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing:2px;
}
.instruct-list{
    list-style: none;
    line-height: 1.8;
    opacity: 0.9;
}
.instructions li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.instructions li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
}


.game-board{
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border:2px solid rgba(255, 255, 255, 0.1);
    border-radius:1rem; 
    text-align:center;
    padding: 2rem;
    margin: 2rem;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.game-stats{
    display:flex; 
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}
.stat-item {
    text-align: center;
}
.stat-label {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.stat-value {
font-size: 1.5rem;
font-weight: 600;
}

.word-display{
    text-align: center;
    margin-bottom: 2rem;
}
.scrambled-word{
    font-size:clamp(1rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: 15px;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}
.word-hint {
    opacity: 0.8;
    font-size: 1.2rem;
    color:goldenrod;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 2rem;
}

.input-section{
    margin:2rem;
}
.guess-input{
    width:100%;
    height:3rem;
    padding: 1.2rem 1.5rem;
    border:2px solid rgba(255, 255, 255, 0.1);
    border-radius:0.5rem;
    background:rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align:center;
    outline: none;
    letter-spacing:2px;
    font-size:1.3rem;
    outline: none;
    transition: all 0.3s ease;
}
.guess-input::placeholder{
    color:rgba(255, 255, 255, 0.6);
}
.guess-input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}
.submit-btn{
    margin:1.5rem;
    padding:0.5rem 1rem;
    width:fit-content;
    border:2px solid rgba(255, 255, 255, 0.1);
    border-radius:0.5rem;
    background:rgba(255, 255, 255, 0.2);
    font-size:1rem;
    color:goldenrod; 
    cursor:pointer;
    transition: all 0.3s ease; 
}
.submit-btn:hover{
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.feedback {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 1.2rem;
    min-height: 2rem;
}
.feedback.correct {
    color: #025721;
    font-weight: 600;
}
.feedback.wrong {
    color: #9d0101;
    font-weight: 600;
}


.game-over{
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border:2px solid rgba(255, 255, 255, 0.1);
    border-radius:1rem; 
    text-align:center;
    padding: 2rem;
    margin: 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.game-over p{
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 1px;
    padding-bottom:0.5rem;
    color:darkgoldenrod;
}
.game-over h3{
    font-size: 2rem;
    font-weight: 300;
    letter-spacing:1px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}


.game-controls{
    display:flex;
    gap:1rem;
    justify-content:center;
}
.control-btn{
    margin:1.5rem;
    padding:0.5rem;
    width:fit-content;
    border:2px solid rgba(255, 255, 255, 0.1);
    border-radius:1rem;
    background:rgba(255, 255, 255, 0.2);
    font-size:1rem;
    color:rgba(255, 255, 255, 0.795);
    cursor:pointer; 
    transition: all 0.3s ease; 
}
.control-btn:hover{
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}




/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }      
    .game-board {
        padding: 2rem;
        margin: 1rem;
    }       
    .scrambled-word {
        font-size: 2rem;
        letter-spacing: 4px;
    }       
    .game-controls {
        flex-direction: column;
    }        
    .control-btn {
        width: 100%;
    }
    .guess-input {
        font-size: 1rem;
        padding: 1rem;
        height: 2.5rem;
    }
    
    .guess-input::placeholder {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
    }       
    .game-title {
        font-size: 2rem;
    }       
    .scrambled-word {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    .guess-input {
        font-size: 0.9rem;
        padding: 0.8rem;
        height: 2rem;
    }
    
    .guess-input::placeholder {
        font-size: 0.8rem;
    }
}