body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    opacity: 0.8;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-options {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.category-selector, .difficulty-selector {
    margin-bottom: 15px;
}

.category-selector p, .difficulty-selector p {
    margin: 0 0 10px;
    font-weight: bold;
    text-align: center;
}

.category-buttons, .difficulty-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-button, .difficulty-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.category-button:hover, .difficulty-button:hover {
    background-color: #e0e0e0;
}

.category-button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.difficulty-button.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px;
}

.stat-item {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    flex: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

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

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.hangman-display {
    margin-bottom: 20px;
    width: 200px;
    height: 200px;
    position: relative;
}

.hangman-figure {
    width: 100%;
    height: 100%;
    position: relative;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Hangman states using CSS */
.hangman-figure.state-0 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/></svg>');
}

.hangman-figure.state-1 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/></svg>');
}

.hangman-figure.state-2 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/><line x1="30" y1="10" x2="70" y2="10" stroke="black" stroke-width="2"/></svg>');
}

.hangman-figure.state-3 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/><line x1="30" y1="10" x2="70" y2="10" stroke="black" stroke-width="2"/><line x1="70" y1="10" x2="70" y2="20" stroke="black" stroke-width="2"/></svg>');
}

.hangman-figure.state-4 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/><line x1="30" y1="10" x2="70" y2="10" stroke="black" stroke-width="2"/><line x1="70" y1="10" x2="70" y2="20" stroke="black" stroke-width="2"/><circle cx="70" cy="30" r="10" stroke="black" stroke-width="2" fill="none"/></svg>');
}

.hangman-figure.state-5 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/><line x1="30" y1="10" x2="70" y2="10" stroke="black" stroke-width="2"/><line x1="70" y1="10" x2="70" y2="20" stroke="black" stroke-width="2"/><circle cx="70" cy="30" r="10" stroke="black" stroke-width="2" fill="none"/><line x1="70" y1="40" x2="70" y2="60" stroke="black" stroke-width="2"/><line x1="70" y1="45" x2="60" y2="55" stroke="black" stroke-width="2"/><line x1="70" y1="45" x2="80" y2="55" stroke="black" stroke-width="2"/></svg>');
}

.hangman-figure.state-6 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="90" x2="90" y2="90" stroke="black" stroke-width="2"/><line x1="30" y1="90" x2="30" y2="10" stroke="black" stroke-width="2"/><line x1="30" y1="10" x2="70" y2="10" stroke="black" stroke-width="2"/><line x1="70" y1="10" x2="70" y2="20" stroke="black" stroke-width="2"/><circle cx="70" cy="30" r="10" stroke="black" stroke-width="2" fill="none"/><line x1="70" y1="40" x2="70" y2="60" stroke="black" stroke-width="2"/><line x1="70" y1="45" x2="60" y2="55" stroke="black" stroke-width="2"/><line x1="70" y1="45" x2="80" y2="55" stroke="black" stroke-width="2"/><line x1="70" y1="60" x2="60" y2="75" stroke="black" stroke-width="2"/><line x1="70" y1="60" x2="80" y2="75" stroke="black" stroke-width="2"/></svg>');
}

.word-display {
    margin-bottom: 20px;
    text-align: center;
}

.word-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.letter-box {
    width: 30px;
    height: 40px;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.hint {
    font-style: italic;
    color: #666;
    margin: 10px 0;
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.key {
    width: 40px;
    height: 40px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.key:hover {
    background-color: #e0e0e0;
}

.key.correct {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.key.incorrect {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
    text-decoration: line-through;
}

.key.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-message {
    text-align: center;
    margin-top: 20px;
}

#message-text {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.control-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #45a049;
}

.info-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
}

.info-section h2 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.info-section h3 {
    color: #444;
    margin-top: 20px;
}

.info-section ul, .info-section ol {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
}

.note {
    background-color: #f8f9fa;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-top: 20px;
    border-radius: 0 4px 4px 0;
}

.note h4 {
    margin-top: 0;
    color: #2196F3;
}

/* Ad Container Styling */
.ad-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    min-height: 100px;
}

.ad-label {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0 5px;
    text-align: center;
}

.ad-bottom {
    margin-top: 30px;
    background-color: #f9f9f9;
    border-top: 3px solid #2196F3;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #333;
    color: #fff;
    margin-top: 30px;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.letter-box.revealed {
    animation: pulse 0.5s;
}

.game-message.win {
    animation: fadeIn 1s;
    color: #4CAF50;
}

.game-message.lose {
    animation: fadeIn 1s;
    color: #f44336;
}

.hangman-figure.shake {
    animation: shake 0.5s;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .game-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 100px;
    }
    
    .key {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-buttons, .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-button, .difficulty-button {
        width: 100%;
        max-width: 200px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
    }
    
    .stat-label {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .key {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .letter-box {
        width: 25px;
        height: 35px;
        font-size: 1.2rem;
    }
} 
