/* ==========================================
   MODALS STYLES - GAME STYLE
   ========================================== */

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.3), 0 15px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal-content.modal-xlarge {
    max-width: 1000px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 36px;
    text-align: center;
    background: rgba(244, 67, 54, 0.8);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.close-modal:hover {
    background: #f44336;
    transform: scale(1.1);
}

.modal-content h2 {
    margin-bottom: 12px;
    padding-right: 30px;
}

/* ==========================================
   EXPEDITION MODAL
   ========================================== */
.expedition-locations {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.location-card {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.location-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.location-card.selected {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
}

.location-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.location-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.location-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.location-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.expedition-modifiers {
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    padding: 20px;
}

.expedition-modifiers h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.modifiers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modifier-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 0.85rem;
}

.modifier-item .modifier-icon {
    font-size: 1.1rem;
}

.no-modifiers {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modifier Selection Styles */
.modifiers-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    text-align: center;
}

.modifiers-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modifier-selection-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modifier-selection-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(79, 195, 247, 0.3);
}

.modifier-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

.modifier-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4fc3f7;
    flex-shrink: 0;
}

.modifier-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.modifier-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.modifier-name {
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.modifier-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.expedition-start-btn {
    width: 100%;
    margin-top: 20px;
}

/* ==========================================
   NEW EXPEDITION MODAL - VISUAL STYLE
   ========================================== */
.modal-expedition {
    max-width: 700px;
    background: linear-gradient(180deg, #0d1b3e 0%, #1a237e 50%, #0d47a1 100%);
    border: 3px solid rgba(100, 180, 255, 0.4);
    padding: 25px;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #e53935;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}

.close-modal-btn:hover {
    background: #f44336;
    transform: scale(1.1);
}

.expedition-title {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.expedition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

/* Destination Cards */
.destination-card {
    position: relative;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 3px solid transparent;
}

.destination-card.caverna {
    background: 
        linear-gradient(180deg, rgba(74, 20, 140, 0.5) 0%, rgba(49, 27, 146, 0.7) 100%),
        url('../images/destinations/caverna.png');
    background-size: cover, cover;
    background-position: center, center 40%;
    border-color: rgba(156, 39, 176, 0.6);
}

.destination-card.oceano {
    background: 
        linear-gradient(180deg, rgba(2, 119, 189, 0.4) 0%, rgba(1, 87, 155, 0.7) 100%),
        url('../images/destinations/oceano.png');
    background-size: cover, cover;
    background-position: center, center 40%;
    border-color: rgba(3, 169, 244, 0.6);
}

.destination-card.floresta {
    background: 
        linear-gradient(180deg, rgba(46, 125, 50, 0.4) 0%, rgba(27, 94, 32, 0.7) 100%),
        url('../images/destinations/floresta.png');
    background-size: cover, cover;
    background-position: center, center 40%;
    border-color: rgba(76, 175, 80, 0.6);
}

.destination-card.canions {
    background: 
        linear-gradient(180deg, rgba(230, 81, 0, 0.4) 0%, rgba(191, 54, 12, 0.6) 100%),
        url('../images/destinations/canions.png');
    background-size: cover, cover;
    background-position: center, center 40%;
    border-color: rgba(255, 152, 0, 0.6);
}

.destination-card.vulcao {
    background: 
        linear-gradient(180deg, rgba(255, 87, 34, 0.5) 0%, rgba(183, 28, 28, 0.7) 100%);
    background-size: cover;
    background-position: center;
    border-color: rgba(255, 87, 34, 0.6);
}

.destination-card.geleira {
    background: 
        linear-gradient(180deg, rgba(79, 195, 247, 0.5) 0%, rgba(33, 150, 243, 0.7) 100%);
    background-size: cover;
    background-position: center;
    border-color: rgba(79, 195, 247, 0.6);
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.destination-card.selected {
    border-color: #4fc3f7;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.5), inset 0 0 30px rgba(79, 195, 247, 0.1);
}

.destination-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
}

/* Exclusive Badge */
.exclusive-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, #ffd700 0%, #ffab00 100%);
    color: #000;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Destination Image area (placeholder) */
.destination-image {
    height: 50px;
    margin-bottom: 8px;
}

.destination-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 3px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.destination-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.destination-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.75rem;
}

.meta-time, .meta-rarity {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,0.9);
}

/* Modifiers Section */
.expedition-modifiers {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.expedition-modifiers h4 {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

/* Expedition Button */
.btn-expedition {
    width: 100%;
    padding: 12px 25px;
    font-size: 1rem;
    background: linear-gradient(180deg, #4fc3f7 0%, #0288d1 100%);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 6px 20px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.btn-expedition:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 10px 25px rgba(0,0,0,0.4);
}

.btn-expedition:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(180deg, #78909c 0%, #546e7a 100%);
}

/* Responsive */
@media (max-width: 600px) {
    .expedition-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-expedition {
        padding: 15px;
    }
    
    .destination-image {
        height: 50px;
    }
}

/* ==========================================
   EXPEDITION RESULT MODAL
   ==========================================*/
.expedition-result {
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.result-location {
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.result-creature-container {
    margin: 4px 0;
}

.result-creature-card {
    display: inline-block;
    width: 160px;
}

.result-creature-card .creature-card {
    transform: scale(0.75);
    margin: 0 auto;
}

.result-creature-card .creature-card:hover {
    transform: scale(0.77);
}

.result-rarity-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 4px 0;
}

.result-rarity-text.comum { color: var(--rarity-comum); }
.result-rarity-text.raro { color: var(--rarity-raro); }
.result-rarity-text.epico { color: var(--rarity-epico); }
.result-rarity-text.lendario { 
    color: var(--rarity-lendario);
    animation: legendaryPulse 1.5s ease infinite;
}

@keyframes legendaryPulse {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px rgba(255, 152, 0, 0.9);
        transform: scale(1.05);
    }
}

.result-stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 4px 0;
    font-size: 0.9rem;
}

.result-stats p {
    margin: 0;
}

.result-bonus {
    margin: 6px 0;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.result-bonus p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    font-size: 0.85rem;
}

#expedition-result-modal .modal-content {
    max-height: 95vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

#expedition-result-modal h2 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

#claim-creature-btn {
    margin-top: 8px;
    width: 100%;
    max-width: 280px;
    align-self: center;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* ==========================================
   CREATURE DETAIL MODAL - ENHANCED
   ========================================== */
.creature-detail {
    padding: 0;
    text-align: center;
    font-family: 'Quicksand', 'Nunito', sans-serif;
}

.creature-detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* Card Container with 3D effect */
.creature-detail-card-container {
    perspective: 1200px;
    margin-bottom: 10px;
    animation: cardEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) rotateY(-15deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0);
    }
}

.creature-detail-card {
    position: relative;
    width: 180px;
    height: 245px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(79, 195, 247, 0.25);
    transform: rotateX(5deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
    animation: cardFloat 4s ease-in-out infinite;
}

.creature-detail-card:hover {
    transform: rotateX(0deg) scale(1.08) rotateY(5deg);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(79, 195, 247, 0.5);
}

@keyframes cardFloat {
    0%, 100% { transform: rotateX(5deg) translateY(0); }
    50% { transform: rotateX(5deg) translateY(-10px); }
}

/* Card Rarity Glow Effects */
.creature-detail-card.rarity-comum {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(158, 158, 158, 0.3);
}
.creature-detail-card.rarity-raro {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(33, 150, 243, 0.4);
}
.creature-detail-card.rarity-epico {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(156, 39, 176, 0.5);
    animation: cardFloat 3s ease-in-out infinite, epicGlow 2s ease-in-out infinite alternate;
}
.creature-detail-card.rarity-lendario {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 152, 0, 0.6);
    animation: cardFloat 3s ease-in-out infinite, legendaryGlow 1.5s ease-in-out infinite alternate;
}
.creature-detail-card.rarity-mitico {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 70px rgba(233, 30, 99, 0.7);
    animation: cardFloat 3s ease-in-out infinite, mythicGlow 1s ease-in-out infinite alternate;
}

@keyframes epicGlow {
    from { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(156, 39, 176, 0.4); }
    to { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 70px rgba(156, 39, 176, 0.7); }
}
@keyframes legendaryGlow {
    from { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 152, 0, 0.5); }
    to { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 90px rgba(255, 193, 7, 0.8); }
}
@keyframes mythicGlow {
    from { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 70px rgba(233, 30, 99, 0.6); }
    to { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 100px rgba(233, 30, 99, 1); }
}

.creature-detail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creature-detail-card .placeholder-icon {
    font-size: 6rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #1a2a4a 0%, #0d1929 100%);
}

/* Creature Name - Enhanced Typography */
.creature-detail-name {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 10px 0 8px;
    background: linear-gradient(135deg, #ffffff 0%, #81d4fa 30%, #ffffff 50%, #4fc3f7 70%, #ffffff 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 4s ease-in-out infinite, fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    letter-spacing: 1px;
    filter: drop-shadow(0 2px 4px rgba(79, 195, 247, 0.4));
}

@keyframes shimmerText {
    0% { background-position: 100% center; }
    50% { background-position: 0% center; }
    100% { background-position: 100% center; }
}

/* Badges - Enhanced */
.creature-detail-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.detail-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.detail-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.detail-badge:hover::before {
    left: 100%;
}

.detail-badge.type {
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.detail-badge.type.Terra { background: linear-gradient(135deg, var(--type-terra) 0%, #5d4037 100%); }
.detail-badge.type.Água { background: linear-gradient(135deg, var(--type-agua) 0%, #1565c0 100%); }
.detail-badge.type.Floresta { background: linear-gradient(135deg, var(--type-floresta) 0%, #2e7d32 100%); }
.detail-badge.type.Voador { background: linear-gradient(135deg, var(--type-voador) 0%, #b0bec5 100%); color: #333; }
.detail-badge.type.Fogo { background: linear-gradient(135deg, var(--type-fogo) 0%, #d84315 100%); }
.detail-badge.type.Gelo { background: linear-gradient(135deg, var(--type-gelo) 0%, #0277bd 100%); }
.detail-badge.type.Místico { background: linear-gradient(135deg, var(--type-mistico) 0%, #6a1b9a 100%); }

.detail-badge.rarity {
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.detail-badge.rarity-comum { background: linear-gradient(135deg, #9e9e9e 0%, #616161 100%); }
.detail-badge.rarity-raro { background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%); }
.detail-badge.rarity-epico { background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%); }
.detail-badge.rarity-lendario { background: linear-gradient(135deg, #ff9800 0%, #e65100 100%); }
.detail-badge.rarity-mitico { background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%); }

/* Owned Count */
.creature-detail-owned {
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(46, 125, 50, 0.3) 100%);
    border-radius: 20px;
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 15px 3px rgba(76, 175, 80, 0.2); }
}

/* Stats Section - Enhanced */
.creature-detail-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.detail-stat {
    background: linear-gradient(145deg, rgba(26, 42, 74, 0.9) 0%, rgba(13, 25, 41, 0.95) 100%);
    padding: 15px 30px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid rgba(79, 195, 247, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(10px);
}

.detail-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 10%, var(--primary), transparent 90%);
    opacity: 0.8;
}

.detail-stat::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.detail-stat:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(79, 195, 247, 0.5);
    box-shadow: 0 15px 40px rgba(79, 195, 247, 0.25);
}

.detail-stat.attack::before { background: linear-gradient(90deg, transparent 10%, #ff7043, transparent 90%); }
.detail-stat.defense::before { background: linear-gradient(90deg, transparent 10%, #42a5f5, transparent 90%); }

.detail-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.detail-stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    display: block;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.detail-stat.attack .detail-stat-value { 
    color: #ff7043; 
    text-shadow: 0 0 20px rgba(255, 112, 67, 0.4);
}
.detail-stat.defense .detail-stat-value { 
    color: #42a5f5;
    text-shadow: 0 0 20px rgba(66, 165, 245, 0.4);
}

.detail-stat-label {
    font-size: 0.7rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 8px;
}

/* Description Section - Enhanced */
.creature-detail-description {
    background: linear-gradient(145deg, rgba(26, 42, 74, 0.7) 0%, rgba(13, 25, 41, 0.85) 100%);
    padding: 18px 20px;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
    text-align: left;
    margin: 20px 0;
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.creature-detail-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.05) 0%, transparent 50%);
    border-radius: 16px;
    pointer-events: none;
}

.creature-detail-description h4 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #81d4fa;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.creature-detail-description p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-style: italic;
    font-size: 0.95rem;
    font-family: 'Quicksand', sans-serif;
    padding-left: 5px;
    letter-spacing: 0.3px;
}

/* Power Total - Enhanced */
.creature-detail-power {
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.15) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 2px solid rgba(79, 195, 247, 0.35);
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both, powerGlow 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.15);
}

@keyframes powerGlow {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(79, 195, 247, 0.15);
        border-color: rgba(79, 195, 247, 0.35);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(79, 195, 247, 0.3);
        border-color: rgba(79, 195, 247, 0.5);
    }
}

.creature-detail-power-label {
    font-size: 0.85rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.creature-detail-power-value {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #81d4fa 0%, #4fc3f7 50%, #29b6f6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(79, 195, 247, 0.3));
}

/* Actions */
.creature-detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.creature-detail-actions .btn {
    min-width: 150px;
}

/* ==========================================
   BATTLE MODAL
   ========================================== */
.battle-arena {
    padding: 10px 0;
}

.battle-header {
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.battle-vs {
    font-size: 1.2rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: var(--danger);
    letter-spacing: 2px;
}

.battle-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
}

.battle-team {
    flex: 1;
}

.battle-team h4 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.battle-team.player h4 {
    color: var(--primary-light);
}

.battle-team.enemy h4 {
    color: var(--danger);
}

.battle-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.battle-divider {
    width: 2px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
    margin: 0 30px;
}

.battle-log {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    max-height: 100px;
    overflow-y: auto;
}

.battle-log h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.battle-log-entries {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Nunito', sans-serif;
}

.log-entry.damage {
    border-left: 3px solid var(--danger);
}

.log-entry.heal {
    border-left: 3px solid var(--success);
}

.log-entry.victory {
    border-left: 3px solid gold;
    background: rgba(255, 215, 0, 0.1);
}

.log-entry.defeat {
    border-left: 3px solid var(--danger);
    background: rgba(231, 76, 60, 0.1);
}

.battle-result {
    text-align: center;
    padding: 15px;
}

.battle-result h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.battle-result.victory h3 {
    color: gold;
}

.battle-result.defeat h3 {
    color: var(--danger);
}

.battle-result.draw h3 {
    color: #ffc107;
}

/* ==========================================
   NEW 5v5 BATTLE SYSTEM
   ========================================== */
.battle-field-5v5 {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
}

.battle-side {
    flex: 0 0 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.battle-side.player-side {
    background: linear-gradient(180deg, rgba(100, 216, 255, 0.2) 0%, rgba(100, 216, 255, 0.1) 100%);
    border: 2px solid rgba(100, 216, 255, 0.3);
}

.battle-side.enemy-side {
    background: linear-gradient(180deg, rgba(244, 67, 54, 0.2) 0%, rgba(244, 67, 54, 0.1) 100%);
    border: 2px solid rgba(244, 67, 54, 0.3);
}

.battle-side h4 {
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.battle-score {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Nunito', sans-serif;
}

.battle-confrontations {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.confrontation-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.confrontation-row.active {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.confrontation-row.player-win {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.3) 0%, transparent 50%, transparent 100%);
    border-left: 3px solid #4caf50;
}

.confrontation-row.enemy-win {
    background: linear-gradient(90deg, transparent 0%, transparent 50%, rgba(244, 67, 54, 0.3) 100%);
    border-right: 3px solid #f44336;
}

.confrontation-card {
    flex: 1;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.confrontation-card.player-card {
    justify-content: flex-start;
}

.confrontation-card.enemy-card {
    justify-content: flex-end;
}

.confrontation-card.empty {
    justify-content: center;
    opacity: 0.5;
}

.conf-creature {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.confrontation-card.enemy-card .conf-creature {
    flex-direction: row-reverse;
}

.conf-name {
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Nunito', sans-serif;
}

.confrontation-card.enemy-card .conf-name {
    text-align: right;
}

.conf-mode {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conf-mode.attack {
    color: #fff;
    background: rgba(255, 152, 0, 0.6);
}

.conf-mode.defense {
    color: #fff;
    background: rgba(33, 150, 243, 0.6);
}

.conf-stat {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
}

.confrontation-result {
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

.vs-icon {
    opacity: 0.4;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.result-win {
    color: #4caf50;
    font-size: 0.85rem;
    font-weight: 700;
}

.result-lose {
    color: #f44336;
    font-size: 0.85rem;
    font-weight: 700;
}

.result-draw {
    color: #ffc107;
    font-size: 0.75rem;
    font-weight: 700;
}

.empty-slot {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

/* Battle type badges */
.battle-type {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.battle-type.ranked {
    background: linear-gradient(180deg, #ffd700 0%, #ff9800 100%);
    color: #000;
}

.battle-type.friendly {
    background: linear-gradient(180deg, #4fc3f7 0%, #0288d1 100%);
    color: #fff;
}

.rewards-notice, .no-rewards-notice {
    display: block;
    font-size: 0.75rem;
    font-family: 'Nunito', sans-serif;
}

.rewards-notice {
    color: #81c784;
}

.no-rewards-notice {
    color: #ffb74d;
}

.battle-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.battle-type-badge.ranked {
    background: linear-gradient(180deg, #ffd700 0%, #ff9800 100%);
    color: #000;
}

.battle-type-badge.friendly {
    background: linear-gradient(180deg, #4fc3f7 0%, #0288d1 100%);
    color: #fff;
}

.friendly-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
}

.friendly-notice span {
    color: #ffc107;
    font-weight: 600;
}

.friendly-notice p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.battle-rewards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0;
}

.battle-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.battle-reward.neutral .reward-value {
    color: #ffc107;
}

.battle-reward .reward-icon {
    font-size: 1.5rem;
}

/* ==========================================
   FRIEND PROFILE MODAL
   ========================================== */
.friend-profile {
    text-align: center;
    padding: 20px 0;
}

.friend-profile-header {
    margin-bottom: 30px;
}

.friend-profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.friend-profile-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.friend-profile-score {
    color: var(--text-secondary);
}

.friend-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.friend-stat {
    background: var(--bg-input);
    padding: 15px;
    border-radius: var(--border-radius-sm);
}

.friend-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    color: var(--primary-light);
    display: block;
}

.friend-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.friend-profile-team {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 20px;
}

.friend-profile-team h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.friend-team-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.friend-profile-actions {
    margin-top: 25px;
}

/* ==========================================
   CONFIRMATION MODAL
   ========================================== */
.confirm-modal-content {
    text-align: center;
    padding: 20px 0;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.confirm-message {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

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

.confirm-actions .btn {
    min-width: 120px;
}

/* ==========================================
   LOADING STATES
   ========================================== */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-input);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: var(--text-secondary);
}

/* ==========================================
   RESPONSIVE MODALS
   ========================================== */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .expedition-locations {
        grid-template-columns: 1fr;
    }
    
    .creature-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .creature-detail-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .battle-field {
        flex-direction: column;
        gap: 20px;
    }
    
    .battle-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
    
    .friend-profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   WELCOME / TUTORIAL MODAL
   ========================================== */
.modal-welcome {
    max-width: 620px;
    background: linear-gradient(180deg, #1a237e 0%, #0d47a1 50%, #01579b 100%);
    border: 3px solid rgba(100, 200, 255, 0.4);
    padding: 0;
    overflow: hidden;
    max-height: 85vh;
}

.welcome-header {
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    padding: 18px 20px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.welcome-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.welcome-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.welcome-content {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.welcome-section:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(5px);
}

.welcome-icon {
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.welcome-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #64b5f6;
}

.welcome-text p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.35;
}

.welcome-footer {
    padding: 12px 20px 15px;
    background: rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.welcome-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.welcome-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4fc3f7;
}

.welcome-footer .btn {
    width: 100%;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 600px) {
    .modal-welcome {
        margin: 10px;
    }
    
    .welcome-header {
        padding: 20px 15px 15px;
    }
    
    .welcome-header h2 {
        font-size: 1.4rem;
    }
    
    .welcome-content {
        padding: 15px;
        gap: 12px;
    }
    
    .welcome-section {
        padding: 12px;
    }
    
    .welcome-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .welcome-text h4 {
        font-size: 0.9rem;
    }
    
    .welcome-text p {
        font-size: 0.8rem;
    }
}

/* ==========================================
   CARD VS CARD BATTLE ANIMATION
   ========================================== */

.card-battle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-battle-overlay.active {
    display: flex;
    opacity: 1;
}

.card-battle-overlay.exiting {
    opacity: 0;
}

.card-battle-round {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
    animation: pulseGlow 1s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

.card-battle-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.battle-card-wrapper {
    transform: translateX(-200px) scale(0.5);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.battle-card-wrapper.enemy-wrapper {
    transform: translateX(200px) scale(0.5);
}

.battle-card-wrapper.entered {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.battle-card-wrapper.winner .battle-card {
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.8), 0 0 60px rgba(76, 175, 80, 0.4);
    animation: winnerPulse 0.5s ease-in-out;
}

.battle-card-wrapper.loser .battle-card {
    opacity: 0.6;
    filter: grayscale(50%);
    transform: scale(0.95);
}

@keyframes winnerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.battle-card {
    width: 180px;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 35, 0.95) 100%);
    border: 4px solid #666;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.battle-card-type {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.battle-card-sprite {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.battle-card-sprite img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.battle-card-sprite .placeholder {
    font-size: 4rem;
    opacity: 0.5;
}

.battle-card-name {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
}

.battle-card-stat {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    font-size: 1.3rem;
}

.battle-card-stat .stat-mode {
    font-size: 1.5rem;
}

.battle-card-stat .stat-original {
    font-weight: bold;
    color: white;
}

.battle-card-stat .stat-arrow {
    font-size: 1rem;
}

.battle-card-stat .stat-final {
    font-weight: bold;
    font-size: 1.5rem;
}

.battle-card-stat .stat-final.strong {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    animation: statBoost 0.5s ease-out;
}

.battle-card-stat .stat-final.weak {
    color: #f44336;
}

@keyframes statBoost {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.advantage-badge {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    border-top: 2px solid #4caf50;
    animation: advantagePulse 0.8s ease-in-out infinite;
}

.disadvantage-badge {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: #f44336;
    background: rgba(244, 67, 54, 0.2);
    border-top: 2px solid #f44336;
}

@keyframes advantagePulse {
    0%, 100% { background: rgba(76, 175, 80, 0.2); }
    50% { background: rgba(76, 175, 80, 0.4); }
}

.battle-vs-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.battle-vs-center .vs-text {
    font-size: 3rem;
    font-weight: bold;
    color: #ff5722;
    text-shadow: 0 0 20px rgba(255, 87, 34, 0.5);
}

.battle-vs-center .type-matchup {
    font-size: 1.5rem;
    color: #aaa;
}

.battle-vs-center.advantage-active {
    animation: advantageShake 0.5s ease-in-out;
}

.battle-vs-center.advantage-active .vs-text {
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

@keyframes advantageShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.battle-result-text {
    margin-top: 30px;
    font-size: 2.5rem;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.battle-result-text.visible {
    opacity: 1;
    transform: scale(1);
}

.battle-result-text.player {
    color: #4caf50;
    text-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
}

.battle-result-text.enemy {
    color: #f44336;
    text-shadow: 0 0 30px rgba(244, 67, 54, 0.8);
}

.battle-result-text.draw {
    color: #ff9800;
    text-shadow: 0 0 30px rgba(255, 152, 0, 0.8);
}

/* Responsive */
@media (max-width: 600px) {
    .card-battle-arena {
        flex-direction: column;
        gap: 15px;
    }
    
    .battle-card-wrapper {
        transform: translateY(-100px) scale(0.8);
    }
    
    .battle-card-wrapper.enemy-wrapper {
        transform: translateY(100px) scale(0.8);
    }
    
    .battle-card {
        width: 150px;
    }
    
    .battle-vs-center {
        flex-direction: row;
    }
    
    .battle-vs-center .vs-text {
        font-size: 2rem;
    }
    
    .battle-result-text {
        font-size: 1.8rem;
    }
}

/* ==========================================
   BATTLE RESULT OVERLAY - VICTORY/DEFEAT
   ========================================== */
.battle-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.battle-result-overlay.active {
    display: flex;
    opacity: 1;
}

.battle-result-overlay.fade-out {
    opacity: 0;
}

.result-animation {
    text-align: center;
    animation: resultEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes resultEnter {
    0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.result-animation .result-text {
    font-size: 5rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 20px;
    animation: resultPulse 0.8s ease-in-out infinite;
}

.result-animation.victory .result-text {
    color: #4caf50;
    text-shadow: 
        0 0 20px rgba(76, 175, 80, 0.8),
        0 0 40px rgba(76, 175, 80, 0.6),
        0 0 60px rgba(76, 175, 80, 0.4),
        0 4px 0 #2e7d32;
}

.result-animation.defeat .result-text {
    color: #f44336;
    text-shadow: 
        0 0 20px rgba(244, 67, 54, 0.8),
        0 0 40px rgba(244, 67, 54, 0.6),
        0 0 60px rgba(244, 67, 54, 0.4),
        0 4px 0 #b71c1c;
}

.result-animation.draw .result-text {
    color: #ffc107;
    text-shadow: 
        0 0 20px rgba(255, 193, 7, 0.8),
        0 0 40px rgba(255, 193, 7, 0.6),
        0 0 60px rgba(255, 193, 7, 0.4),
        0 4px 0 #f57c00;
}

@keyframes resultPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.result-animation .result-score {
    font-size: 2.5rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: scoreFadeIn 0.5s ease-out 0.3s both;
}

@keyframes scoreFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive for result overlay */
@media (max-width: 600px) {
    .result-animation .result-text {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .result-animation .result-score {
        font-size: 1.8rem;
    }
}
