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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#wordInput {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #333;
    background: #111;
    color: #fff;
    border-radius: 8px;
}

button {
    padding: 15px 30px;
    font-size: 16px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.95);
}

.character-display {
    text-align: center;
}

.character-card {
    background: #111;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

#characterImage {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.character-info h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
}

.battle-arena {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    background: #111;
    border: 2px solid #333;
    border-radius: 12px;
    margin-bottom: 20px;
}

.fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fighter img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.hp-bar {
    width: 150px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.5s;
}

.enemy-side .hp-fill {
    background: #f44336;
}

.hp-text {
    font-size: 14px;
    color: #888;
}

.battle-log {
    background: #111;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.log-entry {
    padding: 5px 0;
    font-size: 14px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

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

.result-screen {
    text-align: center;
    padding: 40px;
    background: #111;
    border: 2px solid #333;
    border-radius: 12px;
}

.result-screen h1 {
    margin-bottom: 30px;
    font-size: 36px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .battle-arena {
        flex-direction: column;
        gap: 30px;
    }
    
    .fighter img {
        width: 120px;
        height: 120px;
    }
    
    .stats {
        gap: 15px;
    }
}

