/* Clean and Modern Clash Royale Deck Builder */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', 'Roboto Mono', 'JetBrains Mono', monospace;
    background: #0a0a0f;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 79px, rgba(0, 255, 255, 0.03) 81px, rgba(0, 255, 255, 0.03) 82px, transparent 84px),
        linear-gradient(transparent 79px, rgba(0, 255, 255, 0.03) 81px, rgba(0, 255, 255, 0.03) 82px, transparent 84px);
    background-size: 84px 84px;
    pointer-events: none;
    z-index: -1;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Layout Container */
.main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 50px 30px;
    background: rgba(10, 10, 15, 0.95);
    border-radius: 20px;
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 50%, #ffff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 30px rgba(0, 255, 255, 0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        filter: brightness(1) saturate(1);
    }
    to {
        filter: brightness(1.2) saturate(1.3);
    }
}

.header p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: #64ffda;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
    font-family: 'Roboto Mono', monospace;
}

/* Section Styles */
section {
    margin-bottom: 24px;
    padding: 32px;
    background: rgba(10, 10, 15, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

section:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(0, 255, 255, 0.2);
}

section h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 28px;
    text-align: center;
    color: #00ffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.4);
    font-family: 'Orbitron', monospace;
}

/* Deck Container */
.deck-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.deck-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 350px;
}

.deck-slot {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.8);
    border-radius: 16px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 2rem;
    color: rgba(0, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 0 20px rgba(0, 255, 255, 0.1),
        0 0 20px rgba(0, 0, 0, 0.3);
}

.deck-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.deck-slot:hover {
    transform: translateY(-6px) scale(1.05);
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.deck-slot:hover::before {
    opacity: 1;
}

.deck-slot.filled {
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid #ff00ff;
    box-shadow: 
        0 0 25px rgba(255, 0, 255, 0.4),
        0 0 50px rgba(255, 0, 255, 0.2),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.deck-slot.animate-fill {
    animation: cardFill 0.4s ease-out;
}

@keyframes cardFill {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.card-in-deck {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.deck-card-image {
    width: 70%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.deck-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.deck-card-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', monospace;
}

.card-in-deck .card-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    color: #e2e8f0;
    line-height: 1.2;
    letter-spacing: 0.02em;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 8px rgba(226, 232, 240, 0.6);
}

.card-in-deck .card-cost {
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff0080 0%, #ff8000 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 15px rgba(255, 0, 128, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Deck Stats */
.deck-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    text-align: center;
    padding: 24px 28px;
    background: rgba(10, 10, 15, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(100, 255, 218, 0.4);
    min-width: 130px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 20px rgba(100, 255, 218, 0.1),
        inset 0 1px 0 rgba(100, 255, 218, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.2), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: #64ffda;
    box-shadow: 
        0 0 30px rgba(100, 255, 218, 0.3),
        0 0 60px rgba(100, 255, 218, 0.1),
        inset 0 1px 0 rgba(100, 255, 218, 0.2);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #64ffda 0%, #00ffff 50%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.6);
    font-family: 'Orbitron', monospace;
}

.stat-label {
    font-size: 0.85rem;
    color: #64ffda;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Roboto Mono', monospace;
}

/* Analysis Section */
.analysis-container {
    background: rgba(10, 10, 15, 0.8);
    border-radius: 16px;
    padding: 28px;
    border: 2px solid rgba(255, 128, 0, 0.4);
    box-shadow: 
        0 0 20px rgba(255, 128, 0, 0.1),
        inset 0 0 20px rgba(255, 128, 0, 0.05);
}

.weakness {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.4);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
    font-size: 1rem;
    color: #ff6b6b;
    line-height: 1.6;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
    box-shadow: 
        0 0 15px rgba(255, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 0, 0, 0.1);
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.no-analysis {
    text-align: center;
    color: #64ffda;
    font-style: italic;
    font-size: 1.1rem;
    padding: 24px;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
}

/* Search Container */
.search-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 18px 55px 18px 24px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 25px;
    background: rgba(10, 10, 15, 0.8);
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
}

.search-box input::placeholder {
    color: rgba(0, 255, 255, 0.6);
    font-weight: 400;
}

.search-box input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    background: rgba(10, 10, 15, 0.95);
    text-shadow: 0 0 10px rgba(226, 232, 240, 0.8);
}

.search-box button {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
    border-radius: 50%;
    color: #742a2a;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(252, 129, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.search-box button:hover {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 4px 12px rgba(229, 62, 62, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-box.has-text button {
    display: flex;
}

/* Filter Container */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 14px 24px;
    border: 2px solid rgba(100, 255, 218, 0.4);
    border-radius: 20px;
    background: rgba(10, 10, 15, 0.8);
    color: #64ffda;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 
        0 0 15px rgba(100, 255, 218, 0.1),
        inset 0 1px 0 rgba(100, 255, 218, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.2), transparent);
    transition: left 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #64ffda;
    color: #ffffff;
    box-shadow: 
        0 0 25px rgba(100, 255, 218, 0.4),
        0 0 50px rgba(100, 255, 218, 0.2),
        inset 0 0 20px rgba(100, 255, 218, 0.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%);
    border-color: #ff00ff;
    color: #ffffff;
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.4),
        0 0 60px rgba(255, 0, 255, 0.2),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.filter-separator {
    width: 2px;
    height: 25px;
    background: linear-gradient(to bottom, transparent, #64ffda, transparent);
    margin: 0 8px;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.4);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 18px;
    width: 100%;
}

.card {
    background: rgba(10, 10, 15, 0.9);
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(100, 255, 218, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(100, 255, 218, 0.1),
        inset 0 1px 0 rgba(100, 255, 218, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(0, 255, 255, 0.1) 50%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #64ffda;
    box-shadow: 
        0 0 30px rgba(100, 255, 218, 0.3),
        0 0 60px rgba(100, 255, 218, 0.1),
        inset 0 0 20px rgba(100, 255, 218, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card.selected {
    border-color: #ff00ff;
    box-shadow: 
        0 0 35px rgba(255, 0, 255, 0.4),
        0 0 70px rgba(255, 0, 255, 0.2),
        inset 0 0 25px rgba(255, 0, 255, 0.1);
    background: rgba(10, 10, 15, 0.95);
    transform: translateY(-4px);
}

.card.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.8);
}

.card-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-rarity {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

/* Rarity Colors */
.rarity-common .card-rarity {
    background: #6c757d;
}

.rarity-rare .card-rarity {
    background: #fd7e14;
}

.rarity-epic .card-rarity {
    background: #6f42c1;
}

.rarity-legendary .card-rarity {
    background: #dc3545;
}

.rarity-champion .card-rarity {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
}

.card-image {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 
        inset 0 0 20px rgba(0, 255, 255, 0.1),
        0 0 15px rgba(0, 255, 255, 0.1);
}

.card-image img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
    filter: brightness(1.1) saturate(1.2);
}

.card:hover .card-image img {
    transform: scale(1.1);
    filter: brightness(1.3) saturate(1.4) drop-shadow(0 0 10px rgba(0, 255, 255, 0.6));
}

.card-fallback {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff00ff 0%, #00ffff 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 25px rgba(255, 0, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', monospace;
}

.card-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 8px rgba(226, 232, 240, 0.6);
}

.card-cost {
    background: linear-gradient(135deg, #ff0080 0%, #ff8000 100%);
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.4),
        0 0 40px rgba(255, 0, 128, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 350px 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header {
        padding: 30px 15px;
        margin-bottom: 25px;
    }
    
    section {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .deck-slots {
        grid-template-columns: repeat(4, 1fr);
        max-width: 320px;
        gap: 12px;
    }
    
    .deck-stats {
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px 20px;
        min-width: 100px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .filter-container {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .deck-slots {
        grid-template-columns: repeat(2, 1fr);
        max-width: 200px;
        gap: 10px;
    }
    
    .deck-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-separator {
        width: 80%;
        height: 2px;
        margin: 5px 0;
    }
    
    .card {
        padding: 12px;
    }
    
    .card-image {
        height: 80px;
    }
    
    .card-fallback {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}
/* Sort buttons - same style as filter buttons */
.sort-btn {
    padding: 14px 24px;
    border: 2px solid rgba(100, 255, 218, 0.4);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sort-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s ease;
}

.sort-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #64ffda;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    box-shadow:
        0 5px 20px rgba(100, 255, 218, 0.3),
        0 0 40px rgba(100, 255, 218, 0.1);
}

.sort-btn:hover::before {
    left: 100%;
}

.sort-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%);
    border-color: #ff00ff;
    color: #ffffff;
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.4),
        0 5px 20px rgba(255, 0, 255, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}



/* Responsive styles for sort buttons */
@media (max-width: 768px) {
    .sort-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}



/* Tower Troop Section */
.tower-troop-section {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tower-troop-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tower-troop-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tower-troop-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tower-troop-selector label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
}

.tower-troop-selector select {
    padding: 12px 16px;
    border: 2px solid rgba(100, 255, 218, 0.4);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tower-troop-selector select:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.tower-troop-selector select option {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
}

.tower-troop-display {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.tower-troop-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(100, 255, 218, 0.1);
    border: 2px solid rgba(100, 255, 218, 0.3);
}

.tower-troop-image-container img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tower-troop-info {
    flex: 1;
}

.tower-troop-info h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tower-troop-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Responsive styles for tower troop */
@media (max-width: 768px) {
    .tower-troop-display {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .tower-troop-image-container {
        align-self: center;
    }
}

