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

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
}

.hangman-container {
    width: 300px;
    height: 300px;
}

#hangman {
    width: 100%;
    height: 100%;
}

#hangman line, #hangman circle {
    stroke: #333;
    stroke-width: 4;
    fill: none;
}

.hidden {
    display: none;
}

.word-display {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin: 20px 0;
    min-height: 3rem;
    text-align: center;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    max-width: 600px;
    margin: 20px 0;
}

.keyboard button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    border: none;
    background: #d3d6da;
    color: #1a1a1b;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
}

.keyboard button:hover {
    background: #c5c8cc;
}

.keyboard button.used {
    background: #787c7e;
    color: white;
    cursor: not-allowed;
}

#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 5px;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    text-align: center;
    min-width: 200px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#message.error {
    opacity: 1;
    visibility: visible;
    background: rgba(255, 0, 0, 0.8);
}

#message.success {
    opacity: 1;
    visibility: visible;
    background: rgba(76, 175, 80, 0.8);
}

.new-game-btn {
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.new-game-btn:hover {
    background: #45a049;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.category-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-selector label {
    font-size: 1.1em;
    color: #333;
}

.category-selector select {
    padding: 8px 12px;
    font-size: 1em;
    border: 2px solid #2196F3;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.category-selector select:hover {
    border-color: #1976D2;
}

.category-selector select:focus {
    border-color: #1565C0;
} 