/* styles.css - Styles for the card website */

/* Universal box-sizing for all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Cinzel', serif;
    background-color: #000001;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
    background-image: url('/images/background_1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
}

.header {
    top: 0;
    position: sticky;
    background-color: #151c2b;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10000;
    max-width: 100%;
}

.table-header {
    top: 0;
    background-color: #151c2b;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10000;
    max-width: 100%;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.nav-tab:hover {
    transform: scale(1.05);
}

.nav-tab.current span {
    color: #d4af37; /* Gold color for current page */
}

.nav-tab img {
    height: 50px;
    margin-bottom: 2px;
}

.nav-tab span {
    font-size: 18px;
    font-weight: bold;
}

/* Wallet Connect Button */
.wallet-connect-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
    margin-left: auto;
    margin-right: 20px;
}

.wallet-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
}

.wallet-connect-btn:active {
    transform: translateY(0);
}

.wallet-connect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wallet-connect-btn.connected {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.wallet-connect-btn.connected:hover {
    border-color: #d4af37;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* ========================================
   UTILITY CLASSES
   Reusable styling patterns for consistency
   ======================================== */

/* Golden Card Base - Premium container styling with golden border and glow */
.card-golden {
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.9), rgba(42, 47, 69, 0.8));
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.card-golden::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #d4af37, #ffd700, #d4af37);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

/* Variant with thinner border for subtle sections */
.card-golden--subtle {
    border-width: 2px;
}

/* Flexbox centering utilities */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* General Button Styles */
.btn {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
}

.btn.primary:active {
    transform: translateY(0);
}

.btn.secondary {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn.secondary:hover {
    transform: translateY(-2px);
    border-color: #d4af37;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn.secondary:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    position: relative;
    overflow: visible;
    transition: transform 0.3s ease;
    max-width: 300px;
}

/* Gold card styling - adds a subtle golden glow */
.card.gold-card {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.card.gold-card::after {
    content: '✦';
    position: absolute;
    top: 5px;
    right: 5px;
    color: #d4af37;
    font-size: 1.2em;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
    z-index: 10;
}

.card:hover {
    transform: scale(1.005);
}

.card.attacking {
    animation: attackShake 0.5s ease-in-out;
}

.card.damaged {
    animation: damageFlash 0.3s ease-in-out;
}

.card.dead {
    animation: deathFade 1.5s ease-out forwards;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial Black', 'Arial Bold', 'Helvetica Bold', sans-serif;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px black, -1px -1px 2px black, 1px -1px 2px black, -1px 1px 2px black, 0 0 8px rgba(0, 0, 0, 0.9);
    font-size: 2em;
    overflow: visible;
    z-index: 1;
    cursor: default;
}

.health {
    top: 10px;
    left: 10px;
    background-image: url('/images/icon_health.webp');
    background-size: cover;
    width: 65px;
    height: 65px;
}

.armor {
    top: 85px;
    left: 10px;
    background-image: url('/images/icon_armor.webp');
    background-size: cover;
    width: 55px;
    height: 55px;
}

.damage {
    top: 10px;
    right: 10px;
    background-image: url('/images/icon_damage.webp');
    background-size: cover;
    width: 65px;
    height: 65px;
}

.magic {
    top: 85px;
    right: 10px;
    background-image: url('/images/icon_magic.webp');
    background-size: cover;
    width: 55px;
    height: 55px;
}

.range {
    top: 65px;
    right: 10px;
    background-image: url('/images/icon_range.webp');
    background-size: cover;
    width: 40px;
    height: 40px;
}

/* Hero Level Badge - displayed on hero cards */
.hero-xp-bar {
    position: absolute;
    bottom: 14px;
    left: 12px;
    right: 8px;
    height: 10px;
    background: rgba(21, 25, 39, 0.9);
    border-radius: 5px;
    border: 1px solid #d4af37;
    overflow: hidden;
    z-index: 3;
}

.hero-xp-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #d4af37, #ffd700);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.hero-level-badge {
    position: absolute;
    bottom: 24px;
    right: 10px;
    background: #d4af37;
    color: #151927;
    font-size: 16px;
    font-weight: bold;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: default;
    z-index: 3;
}

.hero-level-badge:hover {
    z-index: 9998;
}

.hero-level-badge:hover .stat-tooltip {
    opacity: 1;
}

.hero-level-badge .stat-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

/* Custom Tooltip for Stat Overlays */
.stat-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: #f4e4bc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
    border: 1px solid #d4af37;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.overlay:hover {
    z-index: 9998;
}

.overlay:hover .stat-tooltip {
    opacity: 1;
}

/* Tooltip positioning based on overlay position */
.overlay.health .stat-tooltip,
.overlay.armor .stat-tooltip {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

.overlay.damage .stat-tooltip,
.overlay.magic .stat-tooltip {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

/* Effect overlays container */
.effect-overlays {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.effect-overlay {
    width: 45px;
    height: 45px;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    cursor: default;
    position: relative;
}

.effect-overlay:hover {
    z-index: 9998;
}

.effect-overlay:hover .stat-tooltip {
    opacity: 1;
}

.effect-overlay .stat-tooltip {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
}

.effect-overlay .effect-value {
    font-family: 'Arial Black', 'Arial Bold', 'Helvetica Bold', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px black, -1px -1px 2px black, 1px -1px 2px black, -1px 1px 2px black, 0 0 8px rgba(0, 0, 0, 0.9);
    z-index: 3;
}

.critical-overlay {
    background-image: url('/images/effect_critical.webp');
}

.stun-overlay {
    background-image: url('/images/effect_stun.webp');
}

.lifesteal-overlay {
    background-image: url('/images/effect_lifesteal.webp');
}

.stun-immune-overlay {
    background-image: url('/images/effect_stun_immune.webp');
}

.critical-immune-overlay {
    background-image: url('/images/effect_critical_immune.webp');
}

.magic-block-overlay {
    background-image: url('/images/icon_magic_block.webp');
}

/* Magic stat overlay when blocked by opponent */
.overlay.magic.magic-blocked {
    background-image: url('/images/icon_magic_block.webp');
}

/* Page Content Styles */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-content h1 {
    text-align: center;
    color: #f4e4bc;
    margin-bottom: 40px;
    font-size: 3em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    border-bottom: 3px solid #d4af37;
    padding-bottom: 20px;
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.9), rgba(42, 47, 69, 0.8));
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}

/* Battle Page Styles */
.battle-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.battle-btn {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 100px;
}

.battle-btn:hover {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.battle-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

.battle-left, .battle-right {
    display: flex;
    flex-direction: column;
}

.battle-right {
    gap: 30px;
}

.hero-focus {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.item-slots {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 25px;
    padding: 20px;
    background: rgba(21, 25, 39, 0.5);
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.2);
}

.item-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slot-available-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.slot-label {
    color: #ffd700;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.slot-content {
    width: 70px;
    height: 70px;
    border-radius: 5px;
    background: rgba(21, 25, 39, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
}

.slot-content:hover {
    border-color: rgba(212, 175, 55, 0.7);
}

.slot-content.has-item {
    border-style: solid;
    cursor: pointer;
}

.slot-content.has-item:hover {
    background: rgba(42, 47, 69, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    z-index: 1001;
}

.empty-slot {
    font-size: 32px;
    color: rgba(212, 175, 55, 0.5);
    font-weight: bold;
}

.slot-content .item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.battle-stats-display {
    margin-top: 25px;
    padding: 20px;
    background: rgba(21, 25, 39, 0.7);
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.battle-stats-display h3 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #f4e4bc;
}

.stat-row .stat-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.stat-row .stat-label {
    font-weight: 500;
    min-width: 80px;
}

.stat-row .stat-value {
    font-weight: bold;
    color: #ffd700;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.combine-btn {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.combine-btn:hover {
    background: linear-gradient(135deg, #a0522d, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.combine-btn-upgrade {
    background: linear-gradient(135deg, #c62828, #d32f2f) !important;
    border: 2px solid #ff5252 !important;
    animation: pulse-glow 2s infinite;
}

.combine-btn-upgrade:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.6);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(211, 47, 47, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 82, 82, 0.8), 0 0 30px rgba(255, 82, 82, 0.4);
    }
}

.combine-all-btn {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.combine-all-btn:hover {
    background: linear-gradient(135deg, #a0522d, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Consolidated section headings for golden card sections */
.user-stats h3,
.shop-section h2,
.leaderboard-section h2 {
    color: #f4e4bc;
    font-size: 24px;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    padding-bottom: 15px;
}

/* Player Profile Section */
.player-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.profile-image-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    cursor: pointer;
}

.profile-image-container:hover .profile-edit-overlay {
    opacity: 1;
}

.profile-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 24px;
    color: #d4af37;
    border: 3px solid #d4af37;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
}

.player-level-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.player-level-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #151927;
    font-size: 18px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
    z-index: 2;
}

.player-xp-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.player-xp-bar {
    width: 80%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.player-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #ffd700);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.player-xp-text {
    font-size: 12px;
    color: #a0a0a0;
}

.player-combat-stats {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 16px;
}

.player-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 20px;
    color: #d4af37;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.player-stat span {
    color: #ffd700;
    font-weight: bold;
}

.stat-icon {
    height: 32px;
    vertical-align: middle;
}

/* Profile Selection Modal */
.profile-modal-content {
    max-width: 500px;
    width: calc(100% - 20px);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.profile-option {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.profile-option:hover {
    border-color: #d4af37;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.profile-option.selected {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.profile-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-option .profile-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(212, 175, 55, 0.9);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #151927;
}

.profile-option.selected .profile-check {
    display: flex;
}

.stats-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: transparent;
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    cursor: default;
    gap: 10px;
}

.stat-item:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.stat-item[style*="cursor: pointer"]:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.5);
}

.stat-label {
    color: #d4af37;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.stat-value {
    color: #ffd700;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 60px;
    text-align: right;
    transition: all 0.3s ease;
    margin-left: auto;
}

.stat-value:hover {
    color: #fff;
    transform: scale(1.1);
    text-shadow: 0 0 10px #ffd700, 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.item-image {
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.item-level {
    position: absolute;
    right: 0;
    bottom: 0;
    background: #d4af37;
    color: #151927;
    font-size: 12px;
    font-weight: bold;
        width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.item-tooltip {
    position: absolute;
    pointer-events: none;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(21, 25, 39, 0.95);
    color: #f4e4bc;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: none;
    /* Allow text wrapping to fit within constrained width */
    white-space: normal;
    z-index: 1000;
    font-size: 14px;
    /* Constrain tooltip width to stay within viewport */
    min-width: 180px;
    max-width: min(280px, calc(100vw - 40px));
    width: max-content;
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffd700;
}

.tooltip-description {
    margin-bottom: 5px;
    font-size: 12px;
    color: #ccc;
}

.tooltip-effect {
    font-size: 14px;
    font-weight: bold;
    color: #d4af37;
    display: inline-block;
}

.stat-icon-inline {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 2px;
}

/* Home page item styles */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.owned-item {
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.9), rgba(42, 47, 69, 0.8));
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.owned-item:hover {
    border-color: #d4af37;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.4);
}

.item-info {
    margin-top: 10px;
}

.item-name {
    display: block;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.uncombined-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #d32f2f;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid #ff5252;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.6);
    z-index: 10;
}

.level-progress-container {
    margin-top: 8px;
}

.level-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 4px;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #ffd700);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.level-progress-text {
    display: block;
    color: #f4e4bc;
    font-size: 12px;
    text-align: center;
}

.battle-btn {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.battle-btn.prominent {
    font-size: 28px;
    padding: 18px 36px;
    margin-bottom: 25px;
    width: 100%;
    background: linear-gradient(135deg, #b8860b, #daa520);
    border: 3px solid #ffd700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 12px rgba(218, 165, 32, 0.3);
}

.battle-btn.prominent:hover {
    background: linear-gradient(135deg, #daa520, #b8860b);
    box-shadow: 0 8px 16px rgba(218, 165, 32, 0.4);
}

.battle-btn:disabled,
.battle-btn.disabled {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    color: #888;
    border-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.battle-btn:disabled:hover,
.battle-btn.disabled:hover {
    transform: none;
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    box-shadow: none;
}

.battle-progress {
    text-align: center;
}

.battle-progress label {
    display: block;
    margin-bottom: 15px;
    font-size: 20px;
    color: #f4e4bc;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.battle-progress progress {
    width: 100%;
    height: 24px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #d4af37;
}

.battle-progress progress::-webkit-progress-bar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.battle-progress progress::-webkit-progress-value {
    background: linear-gradient(90deg, #d4af37, #ffd700);
    border-radius: 8px;
}

.energy-timer {
    margin-top: 10px;
    font-size: 16px;
    color: #f4e4bc;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.previous-battles {
    grid-column: 1 / -1;
}

.previous-battles h2 {
    color: #f4e4bc;
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #d4af37;
    padding-bottom: 10px;
}

.previous-battles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.previous-battles li {
    list-style-type: none;
    margin: 0;
    padding: 10px;
}

.battle-item {
    background: linear-gradient(135deg, rgba(30, 35, 55, 0.95), rgba(42, 47, 69, 0.9));
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.battle-item:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.battle-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.battle-heroes {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: auto;
}

.battle-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.battle-hero-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.battle-hero-name {
    font-size: 12px;
    color: #d4af37;
    font-weight: bold;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battle-hero-items {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.battle-item-wrapper {
    position: relative;
    display: inline-block;
}

.battle-item-icon {
    width: 36px;
    height: 36px;
    display: block;
}

.item-level-mini {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(212, 175, 55, 0.95);
    color: #1a1d2e;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 2px;
    border-radius: 3px;
    min-width: 14px;
    text-align: center;
    line-height: 1;
}

.battle-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.battle-vs {
    color: #d4af37;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.battle-info-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.battle-result {
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 4px 12px;
    border-radius: 8px;
    white-space: nowrap;
}


.battle-time {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 4px;
    font-style: italic;
}

.reward-glim {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffd700;
    font-weight: 600;
}

.glim-icon {
    height: 20px;
    vertical-align: middle;
}

.energy-icon {
    height: 30px;
    vertical-align: middle;
}

.reward-score {
    font-weight: 600;
}

.reward-score.positive {
    color: #4caf50;
}

.reward-score.negative {
    color: #f44336;
}

.reward-xp {
    font-weight: 600;
    color: #d4af37;
}

.battle-win {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
}

.battle-loss {
    color: #f44336;
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
}

.battle-draw {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
    border: 2px solid #ff9800;
}

.battle-opponent {
    color: #f4e4bc;
    font-size: 16px;
    font-weight: 500;
}

.battle-date {
    color: rgba(244, 228, 188, 0.7);
    font-size: 14px;
}

.battle-empty, .battle-error {
    color: #f4e4bc;
    text-align: center;
    padding: 20px;
    font-style: italic;
    opacity: 0.7;
}

/* Shop Page Styles */
.shop-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.item-card {
    background: rgba(212, 175, 55, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.3);
}

.item-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 12px;
}

.item-card h3 {
    margin: 10px 0;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.item-card p {
    color: #f4e4bc;
    margin-bottom: 15px;
}

.item-card .price {
    font-weight: bold;
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.item-card .drop-rates {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.item-card .drop-rate-title {
    color: #d4af37;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.item-card .drop-rate {
    font-size: 12px;
}

.item-card .drop-rate.common {
    color: #b0b0b0;
}

.item-card .drop-rate.epic {
    color: #a335ee;
    font-weight: 500;
}

.item-card .drop-rate.legendary {
    color: #ff8000;
    font-weight: 600;
}

.shop-btn {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: #f4e4bc;
    border: 2px solid #4caf50;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 100px;
}

.shop-btn:hover {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.shop-btn:disabled,
.shop-btn.disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.shop-btn:disabled:hover,
.shop-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.quantity-controls label {
    color: #f4e4bc;
    font-size: 14px;
    font-weight: 500;
}

.quantity-controls input[type="number"] {
    width: 60px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #d4af37;
    border-radius: 4px;
    color: #f4e4bc;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-align: center;
}

.quantity-controls input[type="number"]:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.quantity-controls .max-btn {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #1a1a1a;
    border: 1px solid #ffd700;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-controls .max-btn:hover {
    background: linear-gradient(135deg, #daa520, #b8860b);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

/* Chest Opening Styles */
@keyframes chestEntrance {
    0% {
        transform: scale(0.3) translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes chestShake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-5deg) scale(1.05); }
    20% { transform: rotate(5deg) scale(1.05); }
    30% { transform: rotate(-5deg) scale(1.05); }
    40% { transform: rotate(5deg) scale(1.05); }
    50% { transform: rotate(-3deg) scale(1.03); }
    60% { transform: rotate(3deg) scale(1.03); }
    70% { transform: rotate(-2deg) scale(1.02); }
    80% { transform: rotate(2deg) scale(1.02); }
    90% { transform: rotate(-1deg) scale(1.01); }
}

@keyframes chestOpen {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
        filter: brightness(2);
    }
}

@keyframes particleBurst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.8), 0 0 80px rgba(212, 175, 55, 0.5), 0 0 120px rgba(212, 175, 55, 0.3);
    }
}

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

.chest-overlay {
    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: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

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

.chest-container {
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.95), rgba(42, 47, 69, 0.9));
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 600px;
    width: calc(100% - 20px);
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.chest-image {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #d4af37;
    animation: chestEntrance 0.8s ease-out;
    position: relative;
    transition: all 0.5s ease;
}

.chest-image.shaking {
    animation: chestShake 1s ease-in-out;
}

.chest-image.opening {
    animation: chestOpen 1s ease-out forwards;
}

.chest-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chest-image.shaking::before {
    opacity: 1;
    animation: glowPulse 1s ease-in-out;
}

.chest-image.opening::before {
    animation: particleBurst 1s ease-out forwards;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), rgba(212, 175, 55, 0.4), transparent);
    opacity: 1;
}

.reveal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.reveal-btn {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 100px;
}

.reveal-btn:hover {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.item-slots {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.chest-overlay .item-slots {
    display: grid;
    animation: fadeInUp 0.5s ease-out forwards;
}

.item-slot {
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Specific styling for chest opening item slots */
.chest-overlay .item-slot {
    position: relative;
    overflow: visible;
    aspect-ratio: 1;
    min-height: 100px;
    border-radius: 5px;
    justify-content: center;
}

.item-slot.hidden {
    background: #333;
}

.chest-overlay .item-back-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.item-slot.revealed {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
}

.item-slot.rarity-common.revealed {
    box-shadow: 0 0 15px rgba(176, 176, 176, 0.6);
}

.item-slot.rarity-epic.revealed {
    box-shadow: 0 0 25px rgba(163, 53, 238, 0.9), 0 0 50px rgba(163, 53, 238, 0.5);
    animation: epicPulse 2s ease-in-out infinite;
}

.item-slot.rarity-legendary.revealed {
    box-shadow: 0 0 30px rgba(255, 128, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8);
    animation: legendaryPulse 1.5s ease-in-out infinite;
}

/* Rarity glow overlays */
.rarity-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 5px;
    opacity: 0.3;
}

.rarity-glow.epic {
    background: radial-gradient(circle, rgba(163, 53, 238, 0.4) 0%, transparent 70%);
}

.rarity-glow.legendary {
    background: radial-gradient(circle, rgba(255, 128, 0, 0.5) 0%, transparent 70%);
    animation: legendaryGlowPulse 1s ease-in-out infinite;
}

/* Epic reveal animation */
@keyframes epicPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(163, 53, 238, 0.9), 0 0 50px rgba(163, 53, 238, 0.5);
    }
    50% {
        box-shadow: 0 0 35px rgba(163, 53, 238, 1), 0 0 70px rgba(163, 53, 238, 0.7);
    }
}

.epic-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #a335ee;
    border-radius: 5px;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
    animation: epicRingExpand 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes epicRingExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Legendary reveal animation */
@keyframes legendaryPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 128, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 45px rgba(255, 128, 0, 1), 0 0 90px rgba(255, 215, 0, 1);
        transform: scale(1.05);
    }
}

@keyframes legendaryGlowPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.legendary-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffd700 0%, #ff8000 50%, transparent 100%);
    border-radius: 50%;
    animation: legendaryParticleExplode 1.5s ease-out forwards;
    pointer-events: none;
    box-shadow: 0 0 8px #ffd700;
}

@keyframes legendaryParticleExplode {
    0% {
        transform: translate(-50%, -50%) translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) 
                   translate(
                       calc(cos(var(--angle)) * var(--distance)), 
                       calc(sin(var(--angle)) * var(--distance))
                   ) 
                   scale(0.2);
        opacity: 0;
    }
}

.legendary-shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 3px solid #ff8000;
    border-radius: 5px;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
    animation: legendaryShockwave 0.8s ease-out forwards;
    pointer-events: none;
    box-shadow: 0 0 20px #ffd700;
}

@keyframes legendaryShockwave {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Initial revealing state */
.item-slot.revealing {
    animation: revealBounce 0.5s ease-out;
}

@keyframes revealBounce {
    0% {
        transform: scale(0.8) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.revealed-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.close-btn {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 100px;
    margin: 0 auto;
    display: block;
}

.close-btn:hover {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Combine Interface Styles */
.combine-overlay {
    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;
}

.combine-container {
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.95), rgba(42, 47, 69, 0.9));
    padding: 5px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.combine-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.combine-item {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #666;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.combine-item:hover {
    border-color: #d4af37;
}

.combine-item.selected {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
    background: rgba(212, 175, 55, 0.1);
}

.combine-item-image {
    width: 50px;
    height: 50px;
}

.combine-item-level {
    font-size: 10px;
    color: #ffd700;
    font-weight: bold;
    margin-top: 2px;
}

.combine-action-btn {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #151927;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.combine-action-btn:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.4);
}

.combine-action-btn.disabled {
    background: #666;
    color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Leaderboard Page Styles */
.season-timer-section {
    background: linear-gradient(135deg, rgba(21, 25, 39, 0.95), rgba(42, 47, 69, 0.9));
    padding: 25px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.season-timer-section h2 {
    color: #ffd700;
    font-size: 28px;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.season-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-display {
    background: rgba(0, 0, 0, 0.4);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    text-align: center;
}

.timer-label {
    display: block;
    color: #f4e4bc;
    font-size: 16px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.timer-value {
    display: block;
    color: #ffd700;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    font-family: 'Courier New', 'Monaco', monospace;
    min-width: 200px;
}

.reward-item {
    color: #f4e4bc;
    font-size: 15px;
    padding: 8px 12px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.reward-item strong {
    color: #ffd700;
}

.glim-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 4px;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.6));
}

.leaderboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 0.8fr 3fr 1fr 1fr 1.2fr;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    align-items: center;
    color: #f4e4bc;
    transition: all 0.3s ease;
}

.leaderboard-row:hover:not(.table-header) {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.leaderboard-row.table-header {
    font-weight: bold;
    background: rgba(212, 175, 55, 0.2);
    border-bottom: 2px solid #d4af37;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.leaderboard-row.current-user {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.3), rgba(255, 215, 0, 0.2), rgba(212, 175, 55, 0.3));
    border-left: 4px solid #d4af37;
    border-right: 4px solid #d4af37;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.leaderboard-row.current-user:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), rgba(255, 215, 0, 0.3), rgba(212, 175, 55, 0.4));
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.leaderboard-row span {
    color: inherit;
}

/* Leaderboard player profile */
.leaderboard-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    object-fit: cover;
    margin-left: -4px;
}

.leaderboard-player-level {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #000000 !important;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: -20px;
    margin-top: 14px;
    border: 1px solid #ffd700;
}

/* Visual Battle Arena Styles */
.battle-arena {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.arena-background {
    position: relative;
    width: 80%;
    max-width: 1200px;
    min-height: 650px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    border: 5px solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.hero-position {
    position: relative;
    width: 300px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-name-label {
    color: #d4af37;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.attacker-position {
    order: 1;
}

.defender-position {
    order: 3;
}

.battle-effects {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.effect-text {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: effectFade 1.5s ease-out forwards;
    pointer-events: none;
}

.turn-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #d4af37;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.battle-controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Animations */
@keyframes attackShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes damageFlash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5) sepia(1) saturate(2); }
}

@keyframes deathFade {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: brightness(1) grayscale(0);
    }
    20% {
        transform: scale(1.05) rotate(-2deg);
        filter: brightness(1.3) sepia(0.8) saturate(2);
    }
    40% {
        transform: scale(0.95) rotate(2deg);
    }
    60% {
        transform: scale(1) rotate(-1deg);
        filter: brightness(0.8) grayscale(0.3);
    }
    100% {
        transform: scale(0.85) translateY(10px) rotate(0deg);
        opacity: 0.3;
        filter: brightness(0.4) grayscale(1);
    }
}

@keyframes effectFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes criticalPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes stunFlash {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

@keyframes bloodSplatter {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

@keyframes bloodParticle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--end-x), var(--end-y)) scale(0.5);
    }
}

@keyframes stunPulse {
    0%, 100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 10px #ffff00);
    }
    50% {
        transform: scale(1.4);
        filter: drop-shadow(0 0 20px #ffff00);
    }
}

/* Battle Results Page Styles */
.battle-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.battle-results-header h1 {
    color: #f4e4bc;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.battle-info {
    color: #d4af37;
    font-size: 18px;
    margin-bottom: 20px;
}

.battle-result-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.result-modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    border: 5px solid #d4af37;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    margin: auto;
}

.result-modal-content h2 {
    color: #f4e4bc;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.result-modal-content p {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.result-text {
    color: #ccc;
    font-size: 16px;
    margin-top: 20px;
    line-height: 1.5;
}

.battle-rewards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.reward-glim {
    color: #d4af37;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-glim .glim-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

.reward-score {
    color: #4ecdc4;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Item Selection Modal */

/* CSS Variables for Modal Padding */
:root {
    --modal-padding-desktop: 25px;
    --modal-padding-tablet: 20px;
    --modal-padding-mobile: 15px;
    --modal-padding-small: 12px;
}

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

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    border: 3px solid #d4af37;
    max-width: 600px;
    width: calc(100% - 20px);
    margin: 0 10px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Modal size variants */
.modal-content.modal-sm {
    max-width: 400px;
}

.modal-content.modal-md {
    max-width: 600px; /* default */
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-content.modal-xl {
    max-width: 1200px;
}

.modal-content.modal-full {
    max-width: 100%;
    width: calc(100% - 20px);
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px;
}

/* Modal utility classes */
.modal-content.no-padding .modal-body {
    padding: 0;
}

.modal-content.compact .modal-header,
.modal-content.compact .modal-body,
.modal-content.compact .modal-footer {
    padding: 15px;
}

.modal-body.scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-body.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--modal-padding-desktop);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    gap: 15px;
}

.modal-header h2 {
    color: #ffd700;
    font-size: 24px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.modal-close:hover {
    background: linear-gradient(135deg, #3a3a3a, #2c2c2c);
    border-color: #d4af37;
    color: #ffd700;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.modal-close:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: var(--modal-padding-desktop);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Name Change Modal Styles */
.name-change-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.name-change-form label {
    color: #f4e4bc;
    font-weight: bold;
    font-size: 16px;
}

.name-change-form input {
    padding: 12px 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #f4e4bc;
    font-size: 16px;
    transition: all 0.3s ease;
}

.name-change-form input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.name-validation-message {
    min-height: 20px;
    font-size: 14px;
    margin-top: 5px;
}

.name-validation-message.error {
    color: #ff6b6b;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Enemy Selection Modal Styles */
#enemy-selection-modal {
    display: none;
}

#enemy-selection-modal.show {
    display: flex;
}

#enemy-selection-modal.fullscreen {
    padding: 0;
}

#enemy-selection-modal .modal-content {
    max-width: 1200px;
    width: calc(100% - 20px);
    max-height: 90vh;
}

#enemy-selection-modal .modal-content.fullscreen {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
}

#enemy-selection-modal .modal-body.fullscreen {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--modal-padding-desktop);
}

.enemy-selection-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

.enemy-selection-left {
    display: flex;
    flex-direction: column;
}

.enemy-selection-right {
    display: flex;
    flex-direction: column;
}

.section-title {
    color: #ffd700;
    font-size: 24px;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.enemy-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 10px;
}

.enemy-card-container {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 15px;
    background: rgba(21, 25, 39, 0.6);
    position: relative;
    height: fit-content;
}

.enemy-card-container:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(42, 47, 69, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.enemy-card-container.selected {
    border-color: #d4af37;
    background: rgba(42, 47, 69, 0.95);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
}

.enemy-card-container .card {
    margin: 0 auto;
    max-width: 200px;
}

.enemy-info {
    color: #f4e4bc;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.enemy-player-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.enemy-profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    object-fit: cover;
}

.enemy-player-level {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #151927;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: -16px;
    margin-top: 20px;
    border: 1px solid #ffd700;
}

.enemy-info h3 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.enemy-info p {
    margin: 5px 0;
    font-size: 14px;
}

.enemy-info .score-label {
    color: #d4af37;
    font-weight: bold;
}

.glim-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

/* Hydra Challenge Card Styles */
.enemy-card-container.hydra-challenge {
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.3) 0%, rgba(75, 0, 130, 0.4) 50%, rgba(139, 0, 0, 0.3) 100%);
    border: 3px solid rgba(186, 85, 211, 0.6);
    position: relative;
    overflow: hidden;
}

.enemy-card-container.hydra-challenge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 340deg,
        rgba(186, 85, 211, 0.3) 340deg 360deg
    );
    animation: hydra-glow 3s linear infinite;
    z-index: -1;
}

@keyframes hydra-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.enemy-card-container.hydra-challenge:hover {
    border-color: rgba(186, 85, 211, 0.9);
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.5) 0%, rgba(75, 0, 130, 0.6) 50%, rgba(139, 0, 0, 0.5) 100%);
    box-shadow: 0 8px 30px rgba(186, 85, 211, 0.5);
}

.enemy-card-container.hydra-challenge.selected {
    border-color: #ba55d3;
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.6) 0%, rgba(75, 0, 130, 0.7) 50%, rgba(139, 0, 0, 0.6) 100%);
    box-shadow: 0 0 35px rgba(186, 85, 211, 0.8);
}

.hydra-info h3 {
    color: #e066ff;
    font-size: 20px;
}

.hydra-label {
    background: linear-gradient(90deg, #8b008b, #ba55d3);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    display: inline-block;
    margin: 5px 0;
    text-transform: uppercase;
}

.hydra-progress {
    color: #dda0dd;
    font-size: 13px;
}

.glim-icon-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.modal-footer {
    padding: var(--modal-padding-desktop);
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-footer .battle-btn {
    min-width: 120px;
}

.modal-footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-footer button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Make modal hero focus reusable */
#modal-hero-focus {
    display: flex;
    flex-direction: column;
}

#modal-hero-focus .hero-card {
    margin-bottom: 20px;
}

#modal-item-slots .item-slot {
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .enemy-selection-layout {
        grid-template-columns: 350px 1fr;
        gap: 20px;
    }

    .enemy-selection-left {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Battle page responsive */
@media (max-width: 900px) {
    .battle-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .battle-left {
        order: 1;
    }
    
    .battle-right {
        order: 2;
    }
    
    .hero-focus {
        max-width: 100%;
    }
    
    /* Enemy selection responsive - stack vertically */
    .enemy-selection-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .enemy-selection-left {
        max-width: 100%;
        order: 1;
    }
    
    .enemy-selection-right {
        order: 2;
    }
}

@media (max-width: 600px) {
    .page-content {
        padding: 15px;
    }

    .battle-layout {
        gap: 20px;
    }

    .hero-focus {
        padding: 15px;
        overflow: hidden;
    }

    .user-stats,
    .battle-progress,
    .shop-section {
        overflow: hidden;
    }

    .item-slots {
        gap: 15px;
        padding: 15px;
        flex-wrap: wrap;
    }

    .item-slot {
        flex: 0 0 auto;
    }
    
    .slot-content {
        width: 60px;
        height: 60px;
    }
    
    .user-stats,
    .battle-progress {
        padding: 15px;
    }
    
    .previous-battles h2 {
        font-size: 20px;
    }
    
    .enemy-selection-layout {
        gap: 15px;
    }

    #enemy-selection-modal .modal-body.fullscreen {
        padding: var(--modal-padding-mobile);
    }

    .enemy-list {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 20px;
    }
}

/* Modal Responsive Breakpoints */

/* Tablet breakpoint - 768px */
@media (max-width: 768px) {
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--modal-padding-tablet);
    }

    .modal-header h2 {
        font-size: 20px;
    }

    /* Adjust large modals on tablets */
    .modal-content.modal-lg,
    .modal-content.modal-xl {
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }

    /* Hero modal responsive */
    .hero-modal-content {
        max-width: calc(100% - 20px);
    }

    .hero-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

/* Mobile breakpoint - 480px (covers Pixel 7 at 412px) */
@media (max-width: 480px) {
    .page-content {
        padding: 12px;
    }

    .hero-focus {
        padding: 12px;
        border-width: 2px;
        overflow: hidden;
    }

    .hero-focus::before,
    .user-stats::before,
    .shop-section::before {
        display: none;
    }

    .user-stats,
    .battle-progress,
    .shop-section {
        padding: 12px;
        border-width: 2px;
        overflow: hidden;
    }

    .battle-layout,
    .shop-content {
        gap: 15px;
    }

    .item-slots {
        gap: 10px;
        padding: 10px;
        flex-wrap: wrap;
    }

    .slot-content {
        width: 60px;
        height: 60px;
    }

    .modal-content {
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        margin: 0 8px;
        border-radius: 12px;
        border-width: 2px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--modal-padding-mobile);
    }

    .modal-body > * {
        max-width: 100%;
    }

    .modal-header {
        gap: 10px;
    }

    .modal-header h2 {
        font-size: 18px;
        line-height: 1.2;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* Profile modal responsive */
    .profile-modal-content {
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
    }

    .profile-modal-content .modal-body {
        padding: 10px;
    }

    .profile-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 2px;
    }

    .profile-option {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }

    /* Hero modal responsive */
    .hero-modal-content {
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
    }

    .hero-modal-content .modal-body {
        padding: 10px;
    }

    .hero-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
        padding: 2px;
    }

    .hero-modal-card {
        padding: 8px;
    }

    .hero-modal-card .card {
        width: 110px;
    }

    /* Enemy selection modal responsive */
    #enemy-selection-modal .modal-body.fullscreen {
        padding: var(--modal-padding-small);
    }

    .enemy-selection-layout {
        gap: 15px;
    }

    .section-title {
        font-size: 18px;
    }

    /* Chest container responsive */
    .chest-container {
        padding: var(--modal-padding-mobile);
        border-radius: 12px;
        width: calc(100% - 16px);
    }

    /* Chest item slots grid responsive */
    .item-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .chest-overlay .item-slot {
        min-height: 80px;
    }
}

/* Extra small screens - 380px */
@media (max-width: 380px) {
    .modal-content {
        width: calc(100% - 12px);
        max-width: calc(100% - 12px);
        margin: 0 6px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--modal-padding-small);
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    /* Profile modal responsive */
    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Chest container responsive */
    .chest-container {
        padding: var(--modal-padding-small);
        width: calc(100% - 12px);
    }

    /* Chest item slots grid responsive */
    .item-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .chest-overlay .item-slot {
        min-height: 70px;
    }
}

/* Item Detail Page Styles */
.item-detail-back {
    margin-bottom: 20px;
}

.back-btn {
    background: linear-gradient(135deg, rgba(30, 35, 50, 0.9) 0%, rgba(42, 47, 69, 0.9) 100%);
    color: #d4af37;
    border: 2px solid rgba(212, 175, 55, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    border-color: #d4af37;
    color: #ffd700;
    background: linear-gradient(135deg, rgba(30, 35, 50, 1) 0%, rgba(42, 47, 69, 1) 100%);
}

.item-detail-container {
    background: linear-gradient(135deg, rgba(30, 35, 50, 0.95) 0%, rgba(20, 25, 40, 0.95) 100%);
    border: 3px solid rgba(212, 175, 55, 0.5);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: #f4e4bc;
}

.item-detail-header {
    text-align: center;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.item-detail-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.item-detail-image {
    width: 128px;
    height: 128px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.5));
}

.item-detail-title {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin: 10px 0;
}

.item-detail-type {
    font-size: 18px;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 5px 0;
}

.item-detail-description {
    font-size: 16px;
    color: #c4b4a4;
    font-style: italic;
    margin-top: 10px;
}

.item-detail-ownership {
    margin-top: 20px;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    text-align: center;
}

.ownership-label {
    font-size: 14px;
    color: #d4af37;
    margin-bottom: 5px;
}

.ownership-value {
    font-size: 20px;
    color: #ffd700;
    font-weight: bold;
}

.item-levels-section {
    margin-top: 30px;
}

.levels-section-title {
    font-size: 28px;
    color: #ffd700;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.item-level-card {
    background: rgba(42, 47, 69, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.item-level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.7);
}

.item-level-card.current-level {
    background: rgba(212, 175, 55, 0.2);
    border: 3px solid #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.item-level-card.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.level-number {
    font-size: 24px;
    color: #ffd700;
    font-weight: bold;
}

.level-requirement {
    font-size: 14px;
    color: #c4b4a4;
}

.level-requirement-value {
    color: #d4af37;
    font-weight: bold;
}

.level-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.level-status.current {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.level-status.unlocked {
    background: rgba(56, 239, 125, 0.2);
    color: #38ef7d;
    border: 1px solid #38ef7d;
}

.level-status.locked {
    background: rgba(150, 150, 150, 0.2);
    color: #999;
    border: 1px solid #666;
}

.level-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.stat-item-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-icon-detail {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.stat-name {
    font-size: 14px;
    color: #c4b4a4;
    flex: 1;
}

.stat-value {
    font-size: 18px;
    color: #ffd700;
    font-weight: bold;
}

.no-item-found {
    text-align: center;
    padding: 60px 20px;
}

.no-item-found h2 {
    font-size: 32px;
    color: #ffd700;
    margin-bottom: 15px;
}

.no-item-found p {
    font-size: 18px;
    color: #c4b4a4;
}

/* Stats Table */
.stats-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(42, 47, 69, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

.stats-table thead {
    background: rgba(21, 25, 39, 0.9);
}

.stats-table th {
    padding: 15px 10px;
    text-align: left;
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    white-space: nowrap;
}

.stats-table th:first-child {
    padding-left: 20px;
}

.stat-icon-header {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

.stats-table-row {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.2s ease;
}

.stats-table-row:hover {
    background: rgba(212, 175, 55, 0.1);
}

.stats-table-row.current-level-row {
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid #d4af37;
}

.stats-table-row.current-level-row:hover {
    background: rgba(212, 175, 55, 0.3);
}

.stats-table-row.locked-row {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.stats-table td {
    padding: 12px 10px;
    color: #f4e4bc;
    font-size: 14px;
}

.stats-table td:first-child {
    padding-left: 20px;
}

.level-cell {
    font-weight: bold;
    color: #ffd700;
    min-width: 120px;
}

.current-badge {
    display: inline-block;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.locked-badge {
    display: inline-block;
    font-size: 14px;
    margin-left: 8px;
    vertical-align: middle;
}

.requirement-cell {
    color: #d4af37;
    min-width: 100px;
}

.stat-cell {
    text-align: center;
    font-weight: 600;
    color: #ffd700;
    min-width: 70px;
}

/* Responsive table */
@media (max-width: 1200px) {
    .stats-table {
        font-size: 12px;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .stats-table-container {
        overflow-x: scroll;
    }
    
    .stats-table {
        min-width: 800px;
    }
}

/* Landing Page Styles */
.landing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

.landing-page * {
    max-width: 100%;
}

.landing-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95) 0%, rgba(44, 44, 44, 0.95) 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #d4af37;
}

.landing-title {
    font-size: 56px;
    font-weight: 700;
    color: #d4af37;
    margin: 0 0 16px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.landing-subtitle {
    font-size: 24px;
    color: #f4e4bc;
    margin: 0 0 40px 0;
    font-weight: 400;
}

.landing-connect {
    margin-top: 40px;
}

.landing-prompt {
    font-size: 20px;
    color: #f4e4bc;
    margin-bottom: 24px;
}

.btn-landing-connect,
.btn-landing-connect-footer {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    border: none;
    padding: 18px 48px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-landing-connect:hover,
.btn-landing-connect-footer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.7);
}

.btn-landing-connect:active,
.btn-landing-connect-footer:active {
    transform: translateY(-1px);
}

.btn-landing-connect img {
    height: 24px;
    width: 24px;
}

.landing-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.landing-section {
    background: rgba(21, 28, 43, 0.85);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.landing-section h2 {
    color: #d4af37;
    font-size: 32px;
    margin: 0 0 16px 0;
}

.landing-section p, 
.landing-section li {
    color: #f4e4bc;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.landing-feature {
    background: rgba(21, 28, 43, 0.85);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.landing-feature:hover {
    transform: translateY(-4px);
    border-color: #d4af37;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.landing-feature h3 {
    color: #d4af37;
    font-size: 24px;
    margin: 16px 0 12px 0;
}

.landing-feature p {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.landing-feature-items {
    grid-column: 1 / -1;
    max-width: 100%;
    overflow: visible;
}

.landing-feature-items .leaderboard-table.compact {
    font-size: 14px;
}

.landing-feature-items .leaderboard-table.compact .leaderboard-row {
    padding: 8px 12px;
    gap: 8px;
}

.landing-feature-items .leaderboard-table.compact .glim-icon {
    height: 16px;
    margin-left: 2px;
}

.landing-items-showcase {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    z-index: 10000;
    overflow: visible;
}

.landing-items-showcase h3 {
    color: #d4af37;
    font-size: 20px;
    margin: 0 0 16px 0;
    text-align: center;
}

.landing-heroes-showcase {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    z-index: 10000;
    overflow: visible;
}

.landing-heroes-showcase h3 {
    color: #d4af37;
    font-size: 20px;
    margin: 0 0 16px 0;
    text-align: center;
}

.landing-heroes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.landing-heroes-grid .card {
    width: 260px;
    max-width: 100%;
    height: 380px;
    transition: transform 0.3s ease;
    flex-shrink: 1;
}

.landing-heroes-grid .card:hover {
    transform: scale(1.05);
}

.landing-items-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: static;
    width: 100%;
}

/* Allow tooltips to overflow the scrollable container */
.landing-items-grid::-webkit-scrollbar {
    width: 8px;
}

.landing-items-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.landing-items-grid::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 4px;
}

.landing-items-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.7);
}

.landing-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 1;
}

.landing-item:hover {
    transform: scale(1.1);
    z-index: 10001;
}

.landing-item .item-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.landing-item:hover .item-tooltip {
    display: block;
}

.landing-item .tooltip-stats {
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding-top: 8px;
    margin-top: 8px;
}

.landing-item .tooltip-stats div {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f4e4bc;
    margin-bottom: 4px;
    white-space: nowrap;
}

.landing-instructions {
    background: rgba(21, 28, 43, 0.9);
    border: 2px solid #d4af37;
}

.landing-steps {
    color: #f4e4bc;
    font-size: 18px;
    line-height: 1.8;
    padding-left: 24px;
}

.landing-steps li {
    margin-bottom: 16px;
}

.landing-steps strong {
    color: #d4af37;
}

.landing-nft-required {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
    border: 2px solid #d4af37;
}

.landing-nft-required h2 {
    color: #d4af37;
}

.landing-nft-required p strong {
    color: #ffd700;
}

/* No Hero NFT Section */
.landing-no-hero {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(255, 107, 107, 0.2) 100%);
    border: 2px solid #dc3545;
    max-width: 700px;
    margin: 0 auto 32px auto;
}

.landing-no-hero h2 {
    color: #ff6b6b;
    font-size: 32px;
    margin-bottom: 16px;
}

.no-hero-message {
    font-size: 18px;
    color: #f4e4bc;
    margin-bottom: 24px;
    line-height: 1.6;
}

.no-hero-message strong {
    color: #ffd700;
}

.hero-purchase-info {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.hero-purchase-info h3 {
    color: #d4af37;
    font-size: 22px;
    margin-bottom: 16px;
}

.hero-purchase-info ol {
    padding-left: 24px;
    margin: 0;
}

.hero-purchase-info li {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.hero-purchase-info li strong {
    color: #ffd700;
    display: block;
    margin-bottom: 8px;
}

.btn-purchase {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
    color: #1a1a2e;
}

.btn-purchase-nmkr {
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-purchase-nmkr:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.nmkr-button {
    height: 50px;
    width: auto;
    display: block;
}

.drop-rate-info {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #f4e4bc;
    text-align: center;
}

.drop-rate-info .gold-foil {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    font-weight: bold;
}

.hero-preview-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

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

.preview-label {
    font-size: 14px;
    font-weight: bold;
    color: #f4e4bc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-label.gold-foil {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.hero-preview-images {
    display: flex;
    gap: 8px;
}

.hero-preview-img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease;
}

.hero-preview-img:hover {
    transform: scale(1.1);
}

.hero-preview-img.gold {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.gold-foil-bonus {
    text-align: center;
    color: #ffd700;
    font-size: 14px;
    margin: 10px 0 20px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.purchase-button-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Shop page hero mint section */
.shop-hero-mint {
    background: rgba(212, 175, 55, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.shop-hero-mint .drop-rate-info {
    text-align: center;
    color: #f4e4bc;
    margin-bottom: 15px;
}

.refresh-heroes-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    flex-flow: wrap;
}

body.payment-popup-active {
    position: relative;
}

body.payment-popup-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    pointer-events: none;
}

.policy-id-info {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.policy-id-info strong {
    color: #d4af37;
}

.policy-id {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    color: #f4e4bc;
    word-break: break-all;
}

.btn-copy-policy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy-policy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.4);
}

.hero-check-again {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-check-again p {
    color: #f4e4bc;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-disconnect {
    background: transparent;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.btn-disconnect:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* Hero Selection UI */
.landing-hero-select {
    background: linear-gradient(135deg, rgba(56, 239, 125, 0.15) 0%, rgba(17, 153, 142, 0.15) 100%);
    border: 2px solid #38ef7d;
    max-width: 900px;
    margin: 0 auto 32px auto;
}

.landing-hero-select h2 {
    color: #38ef7d;
    font-size: 32px;
    margin-bottom: 16px;
    text-align: center;
}

.hero-select-message {
    font-size: 18px;
    color: #f4e4bc;
    text-align: center;
    margin-bottom: 24px;
}

.hero-select-message strong {
    color: #38ef7d;
}

.hero-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.hero-select-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-select-card:hover {
    border-color: #d4af37;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.hero-select-card.selected {
    border-color: #38ef7d;
    box-shadow: 0 0 20px rgba(56, 239, 125, 0.5);
}

.hero-select-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.hero-select-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-select-info {
    text-align: center;
    flex-grow: 1;
}

.hero-select-info h3 {
    color: #d4af37;
    font-size: 18px;
    margin: 0 0 8px 0;
}

.hero-asset-name {
    color: #888;
    font-size: 12px;
    margin: 0 0 8px 0;
    font-family: monospace;
}

.hero-stats-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hero-stats-preview span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f4e4bc;
    font-size: 14px;
}

.btn-select-hero {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-select-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.hero-select-card.selected .btn-select-hero {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.hero-select-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Card Wrapper for Switch Button */
.hero-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-switch-hero {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(244, 208, 63, 0.2) 100%);
    color: #f4e4bc;
    border: 1px solid rgba(212, 175, 55, 0.5);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-switch-hero:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(244, 208, 63, 0.3) 100%);
    transform: translateY(-2px);
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Hero Selection Modal */
.hero-modal-content {
    max-width: 900px;
    width: calc(100% - 20px);
    overflow: hidden;
}

.hero-modal-content .modal-body {
    overflow-x: hidden;
}

.hero-modal-subtitle {
    color: #888;
    text-align: center;
    margin-bottom: 20px;
}

.hero-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 4px;
}

.hero-modal-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-modal-card:hover:not(.current) {
    border-color: #d4af37;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.hero-modal-card.current {
    border-color: #38ef7d;
    background: rgba(56, 239, 125, 0.1);
    cursor: default;
}

.hero-modal-card .card {
    width: 180px;
    height: auto;
    margin-bottom: 12px;
    position: relative;
}

.hero-modal-card .card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.hero-modal-card .current-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #38ef7d;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
}

/* Hero count badge - similar to uncombined-badge for items */
.hero-count-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #6366f1;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid #818cf8;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.6);
    z-index: 10;
}

.hero-modal-info {
    text-align: center;
    width: 100%;
    margin-bottom: 12px;
}

.hero-modal-info h4 {
    color: #d4af37;
    font-size: 16px;
    margin: 0 0 4px 0;
}

.gold-bonus-label {
    color: #d4af37;
    font-size: 11px;
    margin: 4px 0 0 0;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.hero-nft-name {
    color: #666;
    font-size: 11px;
    margin: 0;
    font-family: monospace;
}

.btn-select-modal-hero {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-select-modal-hero:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.btn-select-modal-hero:disabled {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    cursor: default;
}

@media (max-width: 600px) {
    .hero-modal-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .hero-modal-card {
        padding: 12px;
    }
    
    .hero-modal-card .card {
        width: 140px;
    }
}

.landing-alpha-notice {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(244, 208, 63, 0.1) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.landing-alpha-notice h2 {
    color: #d4af37;
}

.landing-alpha-notice ul {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.8;
    padding-left: 24px;
}

.landing-alpha-notice li {
    margin-bottom: 8px;
}

.landing-footer {
    text-align: center;
    padding: 48px 20px;
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95) 0%, rgba(44, 44, 44, 0.95) 100%);
    border-radius: 12px;
    border: 2px solid #d4af37;
}

.landing-footer p {
    font-size: 24px;
    color: #f4e4bc;
    margin: 0 0 24px 0;
    font-weight: 600;
}

/* ==================== */
/* Site Footer          */
/* ==================== */

.site-footer {
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95), rgba(44, 44, 44, 0.95));
    padding: 32px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: #f4e4bc;
}

.footer-branding {
    text-align: center;
}

.footer-brand-text {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.footer-social {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(21, 28, 43, 0.8);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 10px;
}

.footer-social-link:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.footer-social-icon {
    width: 32px;
    height: 32px;
    filter: brightness(0) saturate(100%) invert(85%) sepia(22%) saturate(648%) hue-rotate(356deg) brightness(95%) contrast(91%);
}

.footer-social-link:hover .footer-social-icon {
    filter: brightness(0) saturate(100%) invert(71%) sepia(61%) saturate(411%) hue-rotate(358deg) brightness(93%) contrast(85%);
}

.footer-legal {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
}

.footer-link {
    color: #f4e4bc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #d4af37;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-separator {
    color: rgba(212, 175, 55, 0.5);
    font-weight: 300;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .site-footer {
        padding: 24px 16px;
    }

    .footer-content {
        gap: 20px;
    }

    .footer-brand-text {
        font-size: 24px;
    }

    .footer-social {
        gap: 16px;
    }

    .footer-social-link {
        width: 42px;
        height: 42px;
        padding: 8px;
    }

    .footer-social-icon {
        width: 20px;
        height: 20px;
    }

    .footer-legal {
        font-size: 13px;
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .site-footer {
        padding: 20px 12px;
    }

    .footer-brand-text {
        font-size: 20px;
    }

    .footer-social {
        gap: 12px;
    }

    .footer-social-link {
        width: 38px;
        height: 38px;
        padding: 6px;
    }

    .footer-social-icon {
        width: 18px;
        height: 18px;
    }

    .footer-legal {
        font-size: 12px;
        gap: 8px;
    }
}

/* ==================== */
/* Impressum Page       */
/* ==================== */

.impressum-container {
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95), rgba(44, 44, 44, 0.95));
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    color: #f4e4bc;
}

.impressum-container h1 {
    color: #d4af37;
    font-size: 42px;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    padding-bottom: 20px;
}

.impressum-container h2 {
    color: #d4af37;
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.impressum-container h3 {
    color: #f4e4bc;
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

.impressum-container h4 {
    color: #f4e4bc;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}

.impressum-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(21, 28, 43, 0.5);
    border-radius: 8px;
}

.impressum-section p {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.8;
    margin: 8px 0;
}

.back-to-home {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95), rgba(44, 44, 44, 0.95));
    border: 2px solid #d4af37;
    border-radius: 8px;
    color: #f4e4bc;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    border-color: #ffd700;
    color: #d4af37;
    background: linear-gradient(135deg, rgba(30, 35, 50, 1), rgba(42, 47, 69, 1));
}

/* Impressum Responsive */
@media (max-width: 768px) {
    .impressum-container {
        padding: 30px 20px;
    }

    .impressum-container h1 {
        font-size: 32px;
    }

    .impressum-container h2 {
        font-size: 24px;
    }

    .impressum-container h3 {
        font-size: 20px;
    }

    .impressum-section {
        padding: 15px;
    }

    .impressum-section p {
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .impressum-container {
        padding: 20px 15px;
    }

    .impressum-container h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .impressum-container h2 {
        font-size: 22px;
    }

    .impressum-container h3 {
        font-size: 18px;
    }

    .impressum-section {
        padding: 12px;
        margin-bottom: 20px;
    }

    .impressum-section p {
        font-size: 14px;
        line-height: 1.6;
    }

    .btn-back {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* ==================== */
/* Privacy Page         */
/* ==================== */

.policy-container {
    background: linear-gradient(135deg, rgba(21, 28, 43, 0.95), rgba(44, 44, 44, 0.95));
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    color: #f4e4bc;
}

.policy-container h1 {
    color: #d4af37;
    font-size: 42px;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    padding-bottom: 20px;
}

.policy-container .last-updated {
    text-align: center;
    color: #f4e4bc;
    font-size: 14px;
    margin-bottom: 30px;
    font-style: italic;
}

.policy-container h2 {
    color: #d4af37;
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.privacy-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(21, 28, 43, 0.5);
    border-radius: 8px;
}

.privacy-section p {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.8;
    margin: 8px 0;
}

.privacy-section ul {
    color: #f4e4bc;
    font-size: 16px;
    line-height: 1.8;
    margin: 10px 0;
    padding-left: 20px;
}

.privacy-section li {
    margin-bottom: 8px;
}

.privacy-section a {
    color: #d4af37;
    text-decoration: none;
}

.privacy-section a:hover {
    text-decoration: underline;
}

/* Privacy Responsive */
@media (max-width: 768px) {
    .policy-container {
        padding: 30px 20px;
    }

    .policy-container h1 {
        font-size: 32px;
    }

    .policy-container h2 {
        font-size: 24px;
    }

    .privacy-section {
        padding: 15px;
    }

    .privacy-section p,
    .privacy-section ul {
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .policy-container {
        padding: 20px 15px;
    }

    .policy-container h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .policy-container h2 {
        font-size: 22px;
    }

    .privacy-section {
        padding: 12px;
        margin-bottom: 20px;
    }

    .privacy-section p,
    .privacy-section ul {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Responsive Landing Page */
@media (max-width: 768px) {
    .landing-title {
        font-size: 36px;
    }

    .landing-subtitle {
        font-size: 18px;
    }

    .landing-hero {
        padding: 40px 20px;
    }

    .landing-section {
        padding: 24px;
    }

    .landing-section h2 {
        font-size: 24px;
    }

    .landing-features {
        grid-template-columns: 1fr;
    }

    .btn-landing-connect,
    .btn-landing-connect-footer {
        font-size: 18px;
        padding: 16px 32px;
    }
}

@media (max-width: 600px) {
    .landing-page {
        padding: 15px;
    }

    .landing-hero {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .landing-section {
        padding: 20px;
    }

    .landing-feature {
        padding: 20px;
    }

    .landing-heroes-grid {
        gap: 12px;
        padding: 10px;
    }

    .landing-heroes-grid .card {
        width: 200px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .landing-page {
        padding: 12px;
    }

    .landing-title {
        font-size: 28px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .landing-hero {
        padding: 20px 12px;
        margin-bottom: 20px;
        border-width: 2px;
    }

    .landing-section {
        padding: 15px;
        border-width: 1px;
    }

    .landing-section h2 {
        font-size: 20px;
    }

    .landing-section p {
        font-size: 16px;
    }

    .landing-feature {
        padding: 15px;
    }

    .landing-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .btn-landing-connect,
    .btn-landing-connect-footer {
        font-size: 16px;
        padding: 14px 24px;
    }

    .landing-items-grid,
    .landing-heroes-grid {
        gap: 8px;
        padding: 6px;
    }

    .landing-heroes-grid .card {
        width: 180px;
        height: auto;
    }

    .landing-item .item-image {
        width: 48px;
        height: 48px;
    }

    /* Override inline max-width styles on landing page elements */
    .landing-feature-items .leaderboard-table,
    .landing-feature-items > div {
        max-width: 100% !important;
    }
}

/* Onboarding Overlay */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    pointer-events: auto;
}

.battle-btn.prominent.onboarding-highlight {
    position: relative;
    z-index: 9999;
    animation: pulse-highlight 2s ease-in-out infinite;
}

@keyframes pulse-highlight {
    0%, 100% {
        box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.6),
                    0 6px 12px rgba(218, 165, 32, 0.3);
    }
    50% {
        box-shadow: 0 0 40px 15px rgba(255, 215, 0, 0.8),
                    0 8px 16px rgba(218, 165, 32, 0.5);
    }
}

/* Modal Onboarding Overlay */
.modal-onboarding-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100;
    pointer-events: auto;
    border-radius: 20px;
}

.enemy-card-container.hydra-challenge.onboarding-highlight {
    position: relative;
    z-index: 101;
    animation: pulse-highlight 2s ease-in-out infinite;
}

.item-slots.onboarding-highlight {
    position: relative;
    z-index: 9999;
    animation: pulse-highlight 2s ease-in-out infinite;
}

/* ==================== */
/* Header Responsive    */
/* ==================== */

@media (max-width: 900px) {
    .header {
        gap: 20px;
        padding: 5px 10px;
    }
    
    .nav-tab img {
        height: 40px;
    }
    
    .nav-tab span {
        font-size: 14px;
    }
    
    .wallet-connect-btn {
        padding: 10px 16px;
        font-size: 14px;
        margin-right: 10px;
    }
    
    /* Leaderboard responsive */
    .leaderboard-content {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-row {
        grid-template-columns: 0.6fr 2fr 1fr 1fr 1.2fr;
        gap: 8px;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Shop responsive */
    .shop-content {
        grid-template-columns: 1fr;
    }
    
    /* Battle history responsive */
    .battle-item-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .battle-info-section {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .header {
        gap: 10px;
        padding: 5px;
    }

    .nav-tab {
        padding: 6px;
    }

    .nav-tab img {
        height: 32px;
    }

    .nav-tab span {
        font-size: 12px;
    }

    .wallet-connect-btn {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    .header {
        gap: 8px;
        padding: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-tab {
        padding: 4px;
    }

    .nav-tab img {
        height: 28px;
    }

    .nav-tab span {
        font-size: 11px;
    }

    .wallet-connect-btn {
        padding: 6px 10px;
        font-size: 11px;
        margin-right: 4px;
    }
    
    /* Leaderboard responsive - hide win rate column */
    .leaderboard-row {
        grid-template-columns: 0.5fr 2fr 1fr 1fr;
        gap: 6px;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .leaderboard-row span:nth-child(5) {
        display: none;
    }
    
    .leaderboard-section {
        padding: 20px 15px;
    }
    
    /* Shop responsive */
    .shop-section {
        padding: 20px 15px;
    }
    
    .item-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .item-card img {
        width: 100%;
        height: auto;
        max-width: 120px;
    }
    
    /* Battle history responsive */
    .previous-battles {
        padding: 20px 15px;
    }
    
    .battle-hero-img {
        width: 60px;
        height: 60px;
    }
    
    .battle-item-icon {
        width: 28px;
        height: 28px;
    }
    
    .battle-center {
        min-width: 80px;
    }
    
    .battle-vs {
        font-size: 16px;
    }
    
    /* Enemy selection responsive */
    .enemy-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .enemy-card-container {
        padding: 10px;
    }
}

@media (max-width: 520px) {
    .header {
        gap: 5px;
        flex-wrap: wrap;
        padding: 8px 5px;
    }
    
    .nav-tab {
        padding: 4px;
    }
    
    .nav-tab img {
        height: 28px;
        margin-bottom: 0;
    }
    
    .nav-tab span {
        display: none;
    }
    
    .wallet-connect-btn {
        padding: 8px 10px;
        font-size: 11px;
        margin-left: 5px;
        margin-right: 5px;
    }
    
    /* Leaderboard responsive - minimal columns */
    .leaderboard-row {
        grid-template-columns: 0.5fr 2fr 1fr;
        gap: 5px;
        padding: 8px;
        font-size: 12px;
    }
    
    .leaderboard-row span:nth-child(4),
    .leaderboard-row span:nth-child(5) {
        display: none;
    }
    
    .leaderboard-section {
        padding: 15px 10px;
    }
    
    .leaderboard-section h2 {
        font-size: 18px;
    }
    
    /* Shop responsive - single column */
    .shop-section {
        padding: 15px 10px;
    }
    
    .shop-section h2 {
        font-size: 18px;
    }
    
    .item-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .item-card {
        padding: 10px;
    }
    
    .item-card img {
        width: 100%;
        max-width: 150px;
        height: auto;
    }
    
    .item-card h3 {
        font-size: 14px;
    }
    
    .item-card .price {
        font-size: 14px;
    }
    
    /* Battle history responsive */
    .previous-battles {
        padding: 15px 10px;
    }
    
    .previous-battles h2 {
        font-size: 20px;
    }
    
    .battle-item {
        padding: 10px;
    }
    
    .battle-heroes {
        gap: 10px;
    }
    
    .battle-hero-img {
        width: 50px;
        height: 50px;
    }
    
    .battle-hero-name {
        font-size: 10px;
        max-width: 70px;
    }
    
    .battle-item-icon {
        width: 24px;
        height: 24px;
    }
    
    .battle-center {
        min-width: 60px;
    }
    
    .battle-vs {
        font-size: 14px;
    }
    
    .battle-result {
        font-size: 14px;
        padding: 3px 8px;
    }
    
    .battle-time {
        font-size: 10px;
    }
    
    /* Enemy selection responsive - single column */
    .enemy-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .enemy-card-container {
        padding: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    body {
        padding: 10px;
    }
    
    .header {
        margin: -10px -10px 10px -10px;
        gap: 3px;
    }
    
    .nav-tab img {
        height: 24px;
    }
    
    .wallet-connect-btn {
        padding: 6px 8px;
        font-size: 10px;
        white-space: nowrap;
    }
    
    /* Leaderboard responsive - ultra compact */
    .leaderboard-row {
        grid-template-columns: 0.4fr 1.5fr 1fr;
        padding: 6px;
        font-size: 11px;
    }
    
    .leaderboard-section {
        padding: 10px 8px;
    }
    
    /* Shop responsive */
    .shop-section {
        padding: 10px 8px;
    }
    
    /* Battle history responsive - stack vertically */
    .previous-battles {
        padding: 10px 8px;
    }
    
    .battle-item-content {
        flex-direction: column;
        align-items: center;
    }
    
    .battle-heroes {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .battle-hero-img {
        width: 45px;
        height: 45px;
    }
    
    .battle-item-icon {
        width: 20px;
        height: 20px;
    }
}

/* ============================================================================
   REFERRAL SYSTEM STYLES
   ============================================================================ */

.referral-banner {
    background: linear-gradient(135deg, #4a9eff, #2a7fd9);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.referral-banner p {
    margin: 5px 0;
}

.referral-banner strong {
    color: #f4e4bc;
}

.referral-section {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #3a3a4e;
}

.referral-section h2 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.section-description {
    color: #bbb;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.referral-code-display {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.referral-code-display input {
    flex: 1;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    border-radius: 5px;
    color: #f4e4bc;
    font-family: monospace;
    font-size: 0.95rem;
}

.referral-code-hint {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
}

.referral-code-hint strong {
    color: #d4af37;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #3a3a4e;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #d4af37;
}

.stat-card h3 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f4e4bc;
    display: block;
    margin: 10px 0;
}

.stat-card .stat-label {
    color: #888;
    font-size: 0.85rem;
}

.progress-text {
    color: #f4e4bc;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.progress-bar-container {
    background: #1a1a2e;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #3a3a4e;
}

.progress-bar {
    background: linear-gradient(90deg, #4a9eff, #2a7fd9);
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
}

.referral-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.referral-table thead {
    background: #1a1a2e;
}

.referral-table th {
    padding: 12px;
    text-align: left;
    color: #d4af37;
    font-weight: 600;
    border-bottom: 2px solid #3a3a4e;
}

.referral-table td {
    padding: 12px;
    border-bottom: 1px solid #2a2a3e;
    color: #f4e4bc;
}

.referral-table tr:hover {
    background: #252538;
}

.badge {
    background: #4a9eff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.reward-card {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #3a3a4e;
    text-align: center;
    transition: transform 0.2s;
}

.reward-card:hover {
    transform: translateY(-3px);
    border-color: #d4af37;
}

.reward-card-img {
    width: 100%;
    max-width: 150px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.reward-card h3 {
    color: #d4af37;
    margin: 10px 0;
    font-size: 1.1rem;
}

.reward-stat {
    color: #bbb;
    font-size: 0.9rem;
    margin: 5px 0;
}

.reward-date {
    color: #888;
    font-size: 0.85rem;
    margin: 5px 0;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
}

.status-badge.status-pending {
    background: #f39c12;
    color: white;
}

.status-badge.status-distributed {
    background: #2ecc71;
    color: white;
}

/* Admin page styles */
.admin-login {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border-radius: 10px;
    border: 1px solid #3a3a4e;
    text-align: center;
}

.admin-login h2 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 15px;
}

.admin-login p {
    color: #bbb;
    margin-bottom: 20px;
}

.admin-login-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-login-form input {
    flex: 1;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    border-radius: 5px;
    color: #f4e4bc;
    font-size: 1rem;
}

.rewards-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.rewards-table thead {
    background: #1a1a2e;
}

.rewards-table th {
    padding: 12px;
    text-align: left;
    color: #d4af37;
    font-weight: 600;
    border-bottom: 2px solid #3a3a4e;
}

.rewards-table td {
    padding: 12px;
    border-bottom: 1px solid #2a2a3e;
    color: #f4e4bc;
}

.rewards-table tr:hover {
    background: #252538;
}

.btn.distribute {
    background: #2ecc71;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn.distribute:hover {
    background: #27ae60;
}

.wallet-address {
    font-family: monospace;
    color: #4a9eff;
    font-size: 0.9rem;
}

.page-title {
    color: #d4af37;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Referral info box on battle page */
.referral-info-box {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(42, 127, 217, 0.1));
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
}

.referral-info-header {
    margin-bottom: 10px;
}

.referral-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a9eff;
}

.referral-info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-info-text {
    margin: 0;
    font-size: 0.9rem;
    color: #b8b8d1;
}

.referral-progress-info {
    padding: 8px 12px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 6px;
    text-align: center;
}

#referral-progress-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
}

.btn-referral-link {
    padding: 10px 15px;
    background: linear-gradient(135deg, #4a9eff, #2a7fd9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-referral-link:hover {
    background: linear-gradient(135deg, #5aaeff, #3a8fe9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}