* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile-specific improvements */
html {
    touch-action: manipulation; /* Prevent double-tap zoom on mobile */
    -webkit-text-size-adjust: 100%; /* Prevent text size adjustment on mobile */
}

body {
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* BTD6 Style Home Screen */
.home-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 50%, #6b8e23 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto; /* Enable vertical scrolling */
}

.home-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-dragons {
    position: relative;
    width: 100%;
    height: 100%;
}

.dragon {
    position: absolute;
    font-size: 4rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.3;
}

.dragon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.dragon-2 {
    top: 30%;
    right: 15%;
    animation-delay: 1.5s;
}

.dragon-3 {
    bottom: 25%;
    left: 20%;
    animation-delay: 3s;
}

.dragon-4 {
    bottom: 35%;
    right: 10%;
    animation-delay: 4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.home-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 40px;
    margin: 20px 0; /* Add vertical margin for better scrolling */
}

.game-logo {
    margin-bottom: 60px;
}

.main-title {
    font-family: 'Cinzel', serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.subtitle {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #FFA500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.menu-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border: none;
    border-radius: 15px;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 300px;
    margin: 0 auto;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

.menu-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.8rem;
}

.btn-text {
    font-size: 1.3rem;
}

.play-btn {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    font-size: 1.8rem;
    padding: 25px 50px;
}

.play-btn:hover {
    background: linear-gradient(45deg, #F7931E, #FF6B35);
}

.difficulty-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.difficulty-btn:hover {
    background: linear-gradient(45deg, #1976D2, #2196F3);
}

.achievements-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
}

.achievements-btn:hover {
    background: linear-gradient(45deg, #FFA500, #FFD700);
}

.help-btn {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

.help-btn:hover {
    background: linear-gradient(45deg, #7B1FA2, #9C27B0);
}

.version-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.version-info span {
    opacity: 0.8;
}

/* Support Button Styles */
.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-left: 15px; /* Add spacing from the help button */
}

.support-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(45deg, #FF5252, #FF7676);
}

.support-btn:active {
    transform: translateY(-1px);
}

.support-icon {
    font-size: 1.2rem;
}

.support-text {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

/* Game Screen Updates */
.game-container {
    display: none;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 20px;
    z-index: 1001;
    position: relative;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-left {
    display: flex;
    align-items: center;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #DAA520;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #FFD700;
    color: #FFD700;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.game-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-stats {
    display: flex;
    gap: 40px;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
}

.game-main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tower-selection h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    color: #FFD700;
}

.tower-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px; /* Limit height to enable scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 5px; /* Space for scrollbar */
}

.tower-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tower-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.tower-option.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.tower-icon {
    font-size: 2rem;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mudwing-icon {
    background: linear-gradient(45deg, #8B4513, #A0522D);
}

.skywing-icon {
    background: linear-gradient(45deg, #FF4500, #FF6347);
}

.seawing-icon {
    background: linear-gradient(45deg, #4169E1, #1E90FF);
}

.nightwing-icon {
    background: linear-gradient(45deg, #2F2F2F, #4A4A4A);
}

.rainwing-icon {
    background: linear-gradient(45deg, #FF69B4, #FF1493);
}

.icewing-icon {
    background: linear-gradient(45deg, #87CEEB, #00BFFF);
}

.sandwing-icon {
    background: linear-gradient(45deg, #F4A460, #DAA520);
}

.hivewing-icon {
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.silkwing-icon {
    background: linear-gradient(45deg, #FFB6C1, #FF69B4);
}

.leafwing-icon {
    background: linear-gradient(45deg, #228B22, #32CD32);
}

/* Heroes Selection Screen */
.heroes-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow-y: auto;
    z-index: 1000;
}

.heroes-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-heroes {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-float {
    position: absolute;
    font-size: 3rem;
    animation: float 8s ease-in-out infinite;
    opacity: 0.2;
}

.hero-float-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.hero-float-2 {
    top: 25%;
    right: 15%;
    animation-delay: 1.5s;
}

.hero-float-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 3s;
}

.hero-float-4 {
    bottom: 30%;
    right: 10%;
    animation-delay: 4.5s;
}

.hero-float-5 {
    top: 50%;
    left: 50%;
    animation-delay: 6s;
}

.heroes-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    padding: 40px;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 60px;
    padding-bottom: 60px;
}

.heroes-header {
    margin-bottom: 40px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
}

.heroes-title {
    text-align: center;
    flex: 1;
}

.heroes-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.heroes-header p {
    font-size: 1.2rem;
    color: #ffffff;
    opacity: 0.8;
}

.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    flex: 1;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.hero-card:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.hero-card.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.hero-card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.hero-card-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 10px;
    text-align: center;
}

.hero-type {
    color: #FF6B6B;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.hero-cost {
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.hero-ability {
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.hero-description {
    color: #ffffff;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
}

.hero-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.hero-stats .stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #ffffff;
}

.hero-stats .stat:last-child {
    margin-bottom: 0;
}

.selected-hero-info {
    text-align: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #FFD700;
    margin-top: auto;
}

.selected-hero-info h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.confirm-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Hero Select Buttons */
.hero-select-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-select-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.hero-select-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-select-btn.selected {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Hero System Styles */
.hero-selection {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-selection h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    color: #FFD700;
}

.hero-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-option:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.hero-option.selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}



.hero-icon {
    font-size: 1.8rem;
    margin-right: 12px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.glory-icon {
    background: linear-gradient(45deg, #FF69B4, #FF1493);
}

.clay-icon {
    background: linear-gradient(45deg, #8B4513, #A0522D);
}

.tsunami-icon {
    background: linear-gradient(45deg, #4169E1, #1E90FF);
}

.starflight-icon {
    background: linear-gradient(45deg, #2F2F2F, #4A4A4A);
}

.sunny-icon {
    background: linear-gradient(45deg, #F4A460, #DAA520);
}

.hero-info {
    flex: 1;
}

.hero-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 3px;
    color: #FFD700;
}

.hero-cost {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #FFD700;
    margin-bottom: 2px;
}

.hero-ability {
    font-size: 0.7rem;
    opacity: 0.7;
    color: #FF6B6B;
    font-weight: bold;
}

.tower-info {
    flex: 1;
}

.tower-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.tower-cost {
    font-size: 0.9rem;
    opacity: 0.8;
    color: #FFD700;
}

.tower-type {
    font-size: 0.8rem;
    opacity: 0.7;
    color: #FF6B6B;
    font-weight: bold;
}

.tower-description {
    font-size: 0.7rem;
    opacity: 0.6;
    color: #B0B0B0;
    font-style: italic;
    margin-top: 2px;
}

.game-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

.wave-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.wave-info h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #FFD700;
}

#wave-preview {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.game-area {
    flex: 1;
    position: relative;
}

#gameCanvas {
    background: transparent; /* Remove background to see if it's interfering */
    border-radius: 15px;
    border: 3px solid #8B4513;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: crosshair;
    position: relative;
    z-index: 1000; /* Ensure canvas is above other elements */
    
    /* Mobile-specific improvements */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.overlay-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #FFD700;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    margin-bottom: 15px;
    color: #FFD700;
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .game-area {
        order: 1;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .tower-options {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tower-option {
        flex: 1;
        min-width: 120px;
    }
    
    /* Mobile canvas improvements */
    #gameCanvas {
        max-width: 100vw;
        max-height: 60vh;
        width: 100%;
        height: auto;
        border-width: 2px;
    }
    
    .game-area {
        padding: 10px;
    }
}

/* Animation for dragon towers */
@keyframes dragonGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.tower-option:hover .tower-icon {
    animation: dragonGlow 2s infinite;
}

/* Enemy path styling */
.path {
    stroke: #8B4513;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 10, 5;
    animation: pathFlow 2s linear infinite;
}

@keyframes pathFlow {
    to { stroke-dashoffset: -15; }
}

/* Upgrade Menu Styles */
.upgrade-menu {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: fadeInRight 0.3s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Hero Menu Overlay */
.hero-menu-overlay {
    position: absolute;
    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: 2000;
}

.hero-menu-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    width: 90%;
    max-width: 800px;
    height: 80%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
    overflow: hidden;
}

.hero-menu-header {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #DAA520;
}

.hero-menu-header h2 {
    color: #333;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.hero-menu-body {
    display: flex;
    height: calc(100% - 80px);
}

.hero-list {
    width: 40%;
    background: rgba(255, 255, 255, 0.05);
    border-right: 2px solid #DAA520;
    overflow-y: auto;
    padding: 20px;
}

.hero-details {
    width: 60%;
    padding: 20px;
    overflow-y: auto;
}

.hero-list-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.hero-list-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.hero-list-item.selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.hero-list-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.hero-list-item-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.hero-list-item-info h3 {
    margin: 0;
    font-size: 18px;
    color: #FFD700;
}

.hero-list-item-info p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.8;
}

.hero-xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 8px;
}

.hero-xp-info span {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.hero-details-content {
    color: white;
}

.hero-xp-section {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.hero-xp-section h4 {
    margin: 0 0 15px 0;
    color: #FFD700;
    font-size: 18px;
}

.xp-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s;
}

.xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    opacity: 0.8;
}

.no-hero-selected {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    margin-top: 100px;
}

/* Hero button styling */
.btn-hero {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-hero:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.upgrade-header h3 {
    font-family: 'Cinzel', serif;
    color: #FFD700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.upgrade-stats {
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.upgrade-options h4 {
    font-family: 'Cinzel', serif;
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
}

.upgrade-btn {
    width: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.upgrade-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

.upgrade-btn.disabled {
    background: linear-gradient(45deg, #666, #555);
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.upgrade-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.upgrade-effect {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.upgrade-cost {
    font-size: 0.9rem;
    color: #FFD700;
    font-weight: bold;
}

/* Sell Section Styles */
.sell-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
}

.sell-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff5252, #ff4444);
}

.sell-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.sell-value {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #FFD700;
    font-weight: bold;
} 