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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(45deg, #667eea 0%, #66ea7e 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow-x: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 95%;
    text-align: center;
    position: relative;
    overflow: hidden;
    marigin-top: 10px;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 10s infinite;
}

.game-start {
    margin-bottom: 0.8rem;
}

.start-guessing-button {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-guessing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.navigation {
    margin-bottom: 0.8rem;
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-button {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.5); }
}

.clock {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.game-info {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guesses-left {
    font-size: 1rem;
    font-weight: bold;
    color: #ffeb3b;
}

.range-info {
    font-size: 0.8rem;
    color: #e0e0e0;
}

.input-section {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.input-container {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-direction: column;
}

#guessInput {
    padding: 0.6rem 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    text-align: center;
    width: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#guessInput:focus {
    outline: none;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#guessButton {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    marigin-top: 0.5rem;
}

#guessButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#guessButton:active {
    transform: translateY(0);
}

.message {
    position: relative;
    z-index: 1;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.message.success {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
    animation: pulse 0.5s ease-in-out;
}

.message.error {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
    animation: shake 0.5s ease-in-out;
}

.message.hint {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
    animation: bounce 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stats {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    font-size: 0.7rem;
    color: #e0e0e0;
    margin-top: 0.25rem;
}

.floating-numbers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-number {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
    font-weight: bold;
    animation: float 10s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile-specific improvements */
@media (max-width: 600px) {
    body {
        padding: 5px;
        min-height: 100dvh;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .game-container {
        padding: 0.8rem;
        margin-top: 0;
        border-radius: 12px;
        max-height: none;
        min-height: auto;
    }
    
    .title {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .clock {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .navigation {
        margin-bottom: 0.5rem;
    }
    
    .nav-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .game-info {
        margin-bottom: 0.8rem;
        padding: 0.6rem;
    }
    
    .guesses-left {
        font-size: 0.9rem;
    }
    
    .range-info {
        font-size: 0.8rem;
    }
    
    /* Make message area prominent and visible */
    .message {
        min-height: 50px;
        padding: 0.8rem;
        margin-bottom: 0.8rem;
        font-size: 0.9rem;
        font-weight: 600;
        background: rgba(255, 193, 7, 0.2);
        border: 2px solid rgba(255, 193, 7, 0.6);
        border-radius: 12px;
        /* Make it stand out more */
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    
    .message.success {
        background: rgba(76, 175, 80, 0.25);
        border-color: rgba(76, 175, 80, 0.7);
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
    
    .message.error {
        background: rgba(244, 67, 54, 0.25);
        border-color: rgba(244, 67, 54, 0.7);
        box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    }
    
    .message.hint {
        background: rgba(255, 193, 7, 0.25);
        border-color: rgba(255, 193, 7, 0.7);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    
    /* Input section - horizontal layout */
    .input-section {
        margin-bottom: 0.8rem;
    }
    
    .input-container {
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
    }
    
    #guessInput {
        width: 90px;
        padding: 0.7rem 0.5rem;
        font-size: 1.1rem;
        border-radius: 20px;
        margin-top: 0;
    }
    
    #guessButton {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 20px;
        margin-top: 0;
        white-space: nowrap;
    }
    
    /* Compact stats */
    .stats {
        gap: 0.8rem;
        margin-top: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        padding: 0.4rem 0.7rem;
        min-width: 75px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Reduce floating numbers for mobile */
    .floating-number {
        font-size: 1.2rem;
        opacity: 0.6;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .game-container {
        padding: 0.6rem;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .message {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    #guessInput {
        width: 80px;
        font-size: 1rem;
    }
    
    #guessButton {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}