* {
    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;
}

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

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

.header h1 {
    color: #764ba2;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.level-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.game-area {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    min-height: 300px;
    position: relative;
}

.damage-numbers {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
}

.damage-number {
    position: absolute;
    font-size: 48px;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

.dragon-container {
    text-align: center;
}

.dragon {
    font-size: 120px;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.1s;
}

.dragon:hover {
    transform: scale(1.1);
}

.dragon.hit {
    animation: shake 0.3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
}

.health-bar-container {
    width: 200px;
    height: 25px;
    background: #ddd;
    border-radius: 12px;
    margin: 15px auto;
    overflow: hidden;
    border: 3px solid #333;
}

.health-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ee5a6f);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.health-text {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.warrior-container {
    text-align: center;
}

.warrior {
    font-size: 80px;
}

.warrior-head {
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.warrior.looking-at-you .warrior-head {
    animation: alert 0.5s ease-in-out;
}

@keyframes alert {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.warrior-name {
    font-size: 24px;
    font-weight: bold;
    color: #764ba2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.warrior-status {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

.warrior-status.safe {
    background: #51cf66;
    color: white;
}

.warrior-status.danger {
    background: #ff6b6b;
    color: white;
    animation: pulse 0.5s ease-in-out infinite;
}

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

.controls {
    text-align: center;
    margin: 30px 0;
}

.hit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hit-button:active {
    transform: translateY(0);
}

.hit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.message {
    margin-top: 20px;
    font-size: 1.3em;
    font-weight: bold;
    min-height: 30px;
    animation: fadeIn 0.3s;
}

.message.success {
    color: #51cf66;
}

.message.error {
    color: #ff6b6b;
}

.message.warning {
    color: #ffa94d;
}

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

.game-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.game-info h3 {
    color: #764ba2;
    margin-bottom: 10px;
}

.game-info ul {
    list-style-position: inside;
    color: #333;
    line-height: 1.8;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

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

.modal-content h2 {
    color: #764ba2;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #333;
}

.restart-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
