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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    color: white;
    overflow: hidden;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

#mainMenu {
    background: radial-gradient(circle at center, rgba(255, 0, 100, 0.1), transparent);
}

h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 0, 100, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 0, 100, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 0, 100, 0.8), 0 0 40px rgba(255, 0, 100, 0.6); }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ff0066, #ff3366);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 100, 0.4);
}

#characterCreator {
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
}

.creator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#characterPreview {
    width: 300px;
    height: 400px;
    border: 2px solid rgba(255, 0, 100, 0.3);
    border-radius: 10px;
}

.stats-display {
    margin-top: 1rem;
    width: 100%;
}

.stat-bar {
    margin: 0.5rem 0;
}

.bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0066, #ff3366);
    transition: width 0.3s;
}

.customization-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
}

.custom-section {
    margin-bottom: 1.5rem;
}

.options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn, .ability-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 0, 100, 0.3);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn.active, .ability-btn.active {
    background: rgba(255, 0, 100, 0.5);
    border-color: #ff0066;
}

.color-presets {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.color-picker {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.color-picker label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#primaryColor, #secondaryColor {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#battleScreen {
    background: #000;
}

#gameCanvas {
    width: 100%;
    height: 100%;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.player-hud {
    position: absolute;
    top: 20px;
    width: 300px;
}

#player1HUD {
    left: 20px;
}

#player2HUD {
    right: 20px;
}

.player-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.health-bar, .special-meter {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0066, #ff3366);
    transition: width 0.3s;
}

.special-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ccff, #33aaff);
    transition: width 0.3s;
}

#matchInfo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#timer {
    font-size: 2rem;
    font-weight: bold;
}

.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.overlay.active {
    display: flex;
}

.portrait-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.portrait-preview {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 0, 100, 0.3);
    border-radius: 50%;
    overflow: hidden;
    background: #222;
}

.portrait-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn, .random-portrait-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 100, 0.3);
    border: 1px solid rgba(255, 0, 100, 0.5);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-btn:hover, .random-portrait-btn:hover {
    background: rgba(255, 0, 100, 0.5);
    transform: translateY(-1px);
}

.instructions-container {
    max-width: 600px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 2rem;
}

.control-section {
    margin-bottom: 2rem;
}

.control-section h3 {
    margin-bottom: 1rem;
    color: #ff0066;
    text-align: center;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.key {
    background: rgba(255, 0, 100, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: monospace;
    font-weight: bold;
}

.gameplay-section {
    margin-top: 2rem;
}

.gameplay-section h3 {
    color: #ff0066;
    margin-bottom: 1rem;
    text-align: center;
}

.gameplay-section ul {
    list-style: none;
    padding: 0;
}

.gameplay-section li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.back-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #ff0066, #ff3366);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 100, 0.4);
}