* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.info-item {
    text-align: center;
}

.label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.game-container {
    margin-bottom: 30px;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
}

#imageCanvas {
    position: absolute;
    top: 0;
    left: 0;
}

#scratchCanvas {
    position: relative;
    z-index: 10;
    cursor: crosshair;
}

.hint {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

.hint.hidden {
    display: none;
}

.guess-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#guessInput {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#guessInput:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 15px 30px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-accent {
    background: #28a745;
    color: white;
}

.btn-accent:hover {
    background: #218838;
}

.feedback {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    animation: slideIn 0.3s ease-out;
}

.feedback.hidden {
    display: none;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.instructions ul {
    list-style-position: inside;
    line-height: 1.8;
    color: #666;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .game-info {
        padding: 15px 10px;
    }

    .info-item {
        flex: 1;
    }

    .label {
        font-size: 0.8em;
    }

    .value {
        font-size: 1.5em;
    }

    .guess-section {
        flex-direction: column;
    }

    #guessInput {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .controls {
        flex-direction: column;
    }
}
