* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Header */
h1 {
    text-align: center;
    font-size: 3em;
    margin: 30px 0;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Character Creation Screen */
.creation-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 50px auto;
}

.creation-panel h2 {
    margin-bottom: 30px;
    color: #ffd93d;
}

.creation-panel input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    margin-bottom: 20px;
}

.creation-panel input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(255, 107, 107, 0.6);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Character Display Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 215, 61, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.character-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.stat-item {
    margin: 10px 0;
    font-size: 1.1em;
}

.rank-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ffd93d, #ff6b6b);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2em;
}

/* Opponent Selection */
.opponents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.opponent-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.opponent-card:hover {
    transform: translateY(-5px);
    border-color: #ffd93d;
    box-shadow: 0 10px 30px rgba(255, 215, 61, 0.3);
}

.opponent-card.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.opponent-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.opponent-rank {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
    color: #ffd93d;
}

.opponent-name {
    font-size: 1.3em;
    margin: 10px 0;
    color: #ffd93d;
}

.opponent-desc {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Battle Screen */
.battle-arena {
    margin: 30px 0;
}

.fighters {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.fighter-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.fighter-card.player {
    border-color: rgba(107, 203, 255, 0.5);
}

.fighter-card.enemy {
    border-color: rgba(255, 107, 107, 0.5);
}

.fighter-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.fighter-name {
    font-size: 1.5em;
    margin: 10px 0;
}

.vs-badge {
    text-align: center;
    font-size: 3em;
    font-weight: bold;
    color: #ffd93d;
    text-shadow: 0 0 20px rgba(255, 215, 61, 0.5);
    margin: 30px 0;
}

/* Battle Result */
.battle-result {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
}

.battle-result img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin: 20px 0;
}

.battle-story {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 20px 0;
    text-align: left;
}

.outcome {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

.outcome.victory {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 2px solid #4caf50;
}

.outcome.defeat {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 2px solid #f44336;
}

.rank-change {
    text-align: center;
    font-size: 1.5em;
    margin: 20px 0;
}

.rank-change.up {
    color: #4caf50;
}

.rank-change.down {
    color: #f44336;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #ffd93d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Player Stats Panel */
.player-stats {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat {
    text-align: center;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd93d;
}

.btn-secondary {
    background: linear-gradient(45deg, #4a5568, #718096);
    box-shadow: 0 5px 15px rgba(74, 85, 104, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 7px 20px rgba(74, 85, 104, 0.6);
}