body {
    font-family: 'Shabnam', sans-serif;
    background: linear-gradient(135deg, #ff6b81, #ffd1dc, #80d8ff, #a7f3d0);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    color: #333;
    animation: gradient 10s ease infinite;
    background-size: 600% 600%;
}
@media (max-width: 600px) {
    body {
        height: 100vh;
        width: 100vw;
        display: flex;
        align-items: flex-start;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.game-container {
    background: #fff;
    border-radius: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 95%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: popIn 1s ease;
}
@media (max-width: 600px) {
    .game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 15px;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        box-sizing: border-box;
    }
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.7) rotate(-5deg); }
    60% { opacity: 1; transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}
h1 {
    font-size: 2.4em;
    color: #ff4081;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    animation: glow 2s infinite;
}
@keyframes glow {
    0% { text-shadow: 2px 2px 5px rgba(255, 64, 129, 0.5); }
    50% { text-shadow: 2px 2px 10px rgba(255, 64, 129, 0.8); }
    100% { text-shadow: 2px 2px 5px rgba(255, 64, 129, 0.5); }
}
.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1em;
    color: #444;
    font-weight: 700;
}
.progress-bar {
    width: 100%;
    height: 14px;
    background: #e0e0e0;
    border-radius: 7px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #a5d6a7);
    transition: width 0.6s ease;
    animation: progressPulse 2s infinite;
}
@keyframes progressPulse {
    0% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.8); }
    100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
}
#current-word {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 18px;
    min-height: 40px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}
.letters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.letter {
    background: linear-gradient(135deg, #ffeb3b, #ff9800);
    border-radius: 18px;
    padding: 12px;
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    min-width: 50px;
    text-align: center;
    position: relative;
}
.letter:hover {
    transform: scale(1.25) rotate(10deg);
    background: linear-gradient(135deg, #ff9800, #ffeb3b);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: wobble 0.5s;
}
@keyframes wobble {
    0% { transform: rotate(10deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(10deg); }
}
.letter.selected {
    background: linear-gradient(135deg, #ff4081, #d81b60);
    color: #fff;
    transform: scale(0.85);
    animation: bounce 0.3s;
}
@keyframes bounce {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.1); }
    100% { transform: scale(0.85); }
}
.buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1em;
    font-family: 'Shabnam', sans-serif;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
button svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 600px) {
    button svg {
        width: 18px;
        height: 18px;
    }
}
#submit-word {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #fff;
}
#submit-word:hover {
    background: linear-gradient(135deg, #45a049, #5cb85c);
    transform: scale(1.1);
}
#clear-word {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: #fff;
}
#clear-word:hover {
    background: linear-gradient(135deg, #d32f2f, #e53935);
    transform: scale(1.1);
}
#hint-button {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: #fff;
}
#hint-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976d2, #2196f3);
    transform: scale(1.1);
}
#reset-game {
    background: linear-gradient(135deg, #9c27b0, #ab47bc);
    color: #fff;
}
#reset-game:hover {
    background: linear-gradient(135deg, #7b1fa2, #8e24aa);
    transform: scale(1.1);
}
#found-words, #creative-words {
    margin-top: 15px;
    max-height: 120px;
    overflow-y: auto;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 18px;
    font-size: 0.9em;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
}
.found-word, .creative-word {
    margin: 6px 0;
    padding: 8px;
    border-radius: 12px;
    animation: zoomIn 0.5s ease;
}
.found-word {
    background: #e8f5e9;
    color: #2e7d32;
}
.creative-word {
    background: #e3f2fd;
    color: #1565c0;
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
#game-over {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.8em;
    text-align: center;
    animation: fadeIn 0.5s ease;
}
#game-over button {
    background: linear-gradient(135deg, #ff4081, #d81b60);
    margin-top: 20px;
}
#game-over button:hover {
    background: linear-gradient(135deg, #d81b60, #ff4081);
    transform: scale(1.1);
}
#error-message, #hint-message, #timer-message {
    color: #f44336;
    font-size: 1em;
    margin-bottom: 15px;
    display: none;
    animation: popIn 0.3s ease;
}
#hint-message {
    color: #2196f3;
}
#timer-message {
    color: #fff;
    background: linear-gradient(135deg, #ff6f61, #ff8a76);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 1.2em;
    animation: shakeIn 0.5s ease;
}
@keyframes shakeIn {
    0% { transform: translateX(-20px); opacity: 0; }
    20% { transform: translateX(20px); }
    40% { transform: translateX(-15px); }
    60% { transform: translateX(15px); }
    80% { transform: translateX(-5px); }
    100% { transform: translateX(0); opacity: 1; }
}
.sound-control {
    position: absolute;
    top: 20px;
    left: 20px;
}
.sound-icon {
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}
.sound-icon svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sound-icon .sound-off {
    display: none;
}
.sound-icon.muted .sound-on {
    display: none;
}
.sound-icon.muted .sound-off {
    display: inline;
}
.github-logo {
    display: inline-block;
    transition: all 0.3s ease;
}
.github-logo svg {
    width: 24px;
    height: 24px;
    fill: #333;
    stroke: none;
}
.github-logo:hover {
    transform: scale(1.2) rotate(20deg);
}
footer {
    margin-top: 20px;
    text-align: center;
}
@media (max-width: 600px) {
    h1 {
        font-size: 1.5em;
    }
    .letter {
        padding: 10px;
        font-size: 1em;
        min-width: 35px;
    }
    button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    #game-over {
        font-size: 1.5em;
    }
    .sound-control {
        top: 10px;
        left: 10px;
    }
    .sound-icon svg, .github-logo svg {
        width: 18px;
        height: 18px;
    }
    #timer-message {
        font-size: 0.9em;
        padding: 10px;
    }
  }
