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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.score, .attempts-left {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.game-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

#current-icon {
    font-size: 120px;
    color: #4285f4;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#current-icon::before {
    content: attr(data-icon);
}

.icon-container:hover #current-icon {
    transform: scale(1.05);
}

.name-display {
    text-align: center;
    margin: 20px 0;
}

#name-letters {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 8px;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.letter {
    display: inline-block;
    min-width: 30px;
    text-align: center;
    border-bottom: 3px solid #333;
    height: 40px;
    line-height: 37px;
}

.letter.revealed {
    border-bottom: 3px solid #4285f4;
    color: #4285f4;
}

.letter.space {
    border-bottom: none;
    min-width: 20px;
}

.letter.underscore {
    border-bottom: 3px solid #666;
}

.input-section {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#guess-input {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

#guess-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-guess {
    background: #4285f4;
    color: white;
    width: 160px;
}

#submit-guess:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

#submit-guess:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.give-up {
    background: #ea4335;
    color: white;
}

.give-up:hover {
    background: #d33b2c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(234, 67, 53, 0.3);
}

.next-icon {
    background: #34a853;
    color: white;
}

.next-icon:hover {
    background: #2d8f47;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 168, 83, 0.3);
}

.message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 30px;
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
}

.message.success {
    background: #e8f5e8;
    color: #2d8f47;
    border: 2px solid #34a853;
}

.message.failure {
    background: #fce8e6;
    color: #d33b2c;
    border: 2px solid #ea4335;
}

.message.info {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #4285f4;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .score-container {
        gap: 15px;
    }
    
    .game-area {
        padding: 20px;
    }
    
    #current-icon {
        font-size: 80px;
    }
    
    #name-letters {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
    
    .input-section {
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }
    
    #guess-input {
        width: 100%;
        min-width: unset;
    }
}
