:root {
    --primary-color: #2a9d8f;
    --secondary-color: #e9c46a;
    --background-color: #f4f1de;
    --text-color: #264653;
    --error-color: #e76f51;
    --success-color: #2a9d8f;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

#app-container {
    width: 100%;
    max-width: 600px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    overflow: hidden;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.logo {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
}

/* Start Screen */
#start-screen .player-inputs {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #21867a;
    transform: translateY(-2px);
}

#give-up-btn {
    margin-top: 1rem;
    background-color: var(--error-color);
}

#give-up-btn:hover {
    background-color: #d05a40;
}

/* Game Screen */
#scoreboard {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 1rem;
    gap: 1rem;
}

.score-card {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.score-card.active-turn {
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(233, 196, 106, 0.5);
}

.score-card span {
    display: block;
}

.score-card span:first-child {
    font-weight: 600;
    font-size: 1rem;
}

.score-card span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

#turn-indicator {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#turn-indicator span {
    color: var(--secondary-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

#game-area {
    width: 100%;
    margin-bottom: 1.5rem;
}

#guess-form {
    display: flex;
    gap: 0.5rem;
}

#guess-form input {
    flex-grow: 1;
}

#message-area {
    margin-top: 1rem;
    font-weight: 600;
    min-height: 24px;
}

.message-correct { color: var(--success-color); }
.message-wrong { color: var(--error-color); }
.message-info { color: var(--text-color); }

#found-words-container {
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

#found-words-container h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

#found-words-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

#found-words-list li {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 5px;
    font-weight: 500;
}

/* End Screen */
#end-screen h1 {
    font-size: 2.5rem;
}

#winner-message {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

#final-scores {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

#all-words-container {
    width: 100%;
    margin-bottom: 2rem;
    text-align: left;
}

#all-words-container h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#all-words-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

#all-words-list li {
    background-color: #f0f0f0;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 5px;
    text-align: center;
}

#all-words-list li.found {
    background-color: var(--secondary-color);
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    #app-container {
        padding: 1rem;
    }
    #scoreboard {
        flex-direction: column;
    }
    #found-words-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    #all-words-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}