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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.difficulty-control {
    margin-bottom: 30px;
    text-align: center;
}

.difficulty-control label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

#difficulty {
    width: 100%;
    max-width: 300px;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

#difficulty::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-weight: bold;
}

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

.shapes-container {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    margin-bottom: 20px;
}

.shape-container {
    text-align: center;
    flex: 1;
}

.shape {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.shape:hover {
    transform: scale(1.05);
}

.select-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.select-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.select-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.message {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

.message.level-up {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

#restart-btn {
    background: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

#restart-btn:hover {
    background: #c82333;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

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

.instructions p {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.5;
}

/* Shape styles */
.triangle {
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 130px solid;
}

.square {
    width: 130px;
    height: 130px;
}

.rectangle {
    width: 160px;
    height: 100px;
}

.pentagon {
    width: 130px;
    height: 130px;
    position: relative;
}

.pentagon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 65px solid transparent;
    border-right: 65px solid transparent;
    border-bottom: 100px solid;
}

.pentagon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 70px solid white;
}

.hexagon {
    width: 130px;
    height: 130px;
    position: relative;
}

.hexagon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 130px solid;
}

.hexagon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 55px solid transparent;
    border-right: 55px solid transparent;
    border-bottom: 95px solid white;
}

/* Color variations */
.shape[data-color="red"] { background-color: #e74c3c; }
.shape[data-color="blue"] { background-color: #3498db; }
.shape[data-color="green"] { background-color: #2ecc71; }
.shape[data-color="purple"] { background-color: #9b59b6; }
.shape[data-color="orange"] { background-color: #e67e22; }
.shape[data-color="pink"] { background-color: #e91e63; }

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .shapes-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .shape {
        width: 120px;
        height: 120px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
