/* Design System - MTG Collection Premium */
:root {
    --bg-dark: #0b0e14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-purple: #8a2be2;
    --accent-gold: #d4af37;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --mana-blue: #007bff;
    --mana-red: #dc3545;
    --mana-green: #28a745;
    --mana-black: #343a40;
    --mana-white: #f8f9fa;
}

body {
    background: radial-gradient(circle at top, #1a1a2e 0%, var(--bg-dark) 100%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Marcellus', serif;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navbar Premium */
.navbar {
    background: rgba(11, 14, 20, 0.8) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--accent-gold);
    padding: 1rem 0;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.nav-link:hover {
    color: var(--accent-gold) !important;
    transform: translateY(-2px);
}

/* MTG Card Visuals */
.mtg-card-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    background: transparent;
    cursor: pointer;
}

.mtg-card-item:hover {
    transform: scale(1.05) translateY(-10px);
    z-index: 10;
}

.mtg-card-img {
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border: 2px solid transparent;
    transition: border 0.3s;
}

.mtg-card-item:hover .mtg-card-img {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px var(--accent-purple);
}

/* Mana Progress Bar */
.progress {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--accent-gold);
}

.progress-bar-mana {
    background: linear-gradient(90deg, var(--accent-purple), #00d2ff);
    box-shadow: 0 0 15px var(--accent-purple);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), #4b0082);
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-purple);
}

.btn-outline-warning {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s;
}

.btn-outline-warning:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Premium Form Styles */
.form-control, .form-select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
    transition: all 0.3s !important;
}

.form-control:focus, .form-select:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
}

.form-label, label {
    color: var(--accent-gold) !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Custom Table for dark mode */
.table {
    color: var(--text-main);
    background: transparent !important;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table thead th {
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
    transform: scale(1.01);
}

.table td {
    border: none;
    padding: 1.2rem 1rem;
    vertical-align: middle;
}

.table tr td:first-child { border-radius: 10px 0 0 10px; }
.table tr td:last-child { border-radius: 0 10px 10px 0; }

/* Footer */
footer, .footer {
    border-top: 1px solid var(--accent-gold) !important;
    background: var(--bg-dark) !important;
    padding: 4rem 0 !important;
    margin-top: 10rem !important;
    color: var(--text-muted) !important;
    position: relative !important;
    width: 100% !important;
    z-index: 100 !important;
    display: block !important;
    clear: both !important;
    bottom: auto !important;
}

footer .container {
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding-top: 2rem;
}

/* --- Library & Gallery Premium --- */
.library-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    padding: 2rem;
    max-width: 1700px;
    margin: 0 auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-clear-link {
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 1.2rem;
}

.btn-clear-link:hover {
    color: var(--mana-red);
    transform: rotate(-90deg);
}

.filter-sidebar {
    padding: 2rem;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    border-left: 3px solid var(--accent-gold);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.filter-label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
    font-family: 'Marcellus', serif;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 5px;
}

.custom-multiselect-container {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 5px;
}

.custom-multiselect {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) rgba(0,0,0,0.1);
}

.custom-multiselect::-webkit-scrollbar {
    width: 6px;
}

.custom-multiselect::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-item.checked {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    flex-grow: 1;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-main);
}

.checkbox-item.checked label {
    color: #fff;
    font-weight: 600;
}

/* Premium Search Bar */
.premium-search-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.premium-search-wrapper:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 12px 12px 45px;
    outline: none;
}

/* Mini Search for Filters */
.mini-search-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s;
}

.mini-search-wrapper:focus-within {
    border-color: var(--accent-gold);
}

.mini-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--accent-gold);
    opacity: 0.7;
}

.mini-search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 10px 8px 30px;
    font-size: 0.85rem;
    outline: none;
}

.custom-multiselect {
    max-height: 250px;
    overflow-y: auto;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) transparent;
}

.custom-multiselect::-webkit-scrollbar {
    width: 5px;
}

.custom-multiselect::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    color: #cbd5e0;
    font-size: 0.95rem;
    transition: color 0.2s;
    cursor: pointer;
}

.checkbox-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-gold);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.checkbox-item input[type="checkbox"]:checked {
    background: var(--accent-gold);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--bg-dark);
    font-weight: bold;
    font-size: 14px;
    left: 2px;
    top: -2px;
}

.btn-ritual {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000 !important;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-ritual:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Gallery Header */
.gallery-header {
    padding: 1.5rem 2rem;
}

.magic-title {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
    background: linear-gradient(to right, #fff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon.active, .btn-icon:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* MTG Card Grid */
.mtg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2.5rem;
}

.mtg-card-inner {
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(20, 24, 33, 0.8);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.mtg-card-inner:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(138, 43, 226, 0.2);
    border-color: var(--accent-gold);
}

.card-image-container {
    position: relative;
    aspect-ratio: 63/88;
    overflow: hidden;
    background: #000;
}

.mtg-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mtg-card-inner:hover .mtg-card-img {
    transform: scale(1.1);
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    background: linear-gradient(45deg, #1a1a2e, #16213e);
}

.card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lang-badge {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    border: 1px solid var(--glass-border);
}

.rarity-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.rarity-badge.rare { background: linear-gradient(135deg, #c5a14d, #d4af37); color: #000; }
.rarity-badge.mythic { background: linear-gradient(135deg, #d45c1a, #ff4500); color: #fff; }
.rarity-badge.uncommon { background: linear-gradient(135deg, #707883, #a0a0a0); color: #fff; }
.rarity-badge.common { background: #1a1718; color: #fff; border: 1px solid #fff; }

.card-hover-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transition: bottom 0.3s;
}

.mtg-card-inner:hover .card-hover-actions {
    bottom: 0;
}

.btn-action-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-action-glass:hover {
    background: var(--accent-gold);
    color: #000;
    transform: scale(1.1);
}

.card-footer-info {
    padding: 1.2rem;
    background: rgba(0,0,0,0.3);
}

.card-name-text {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0;
}

.card-sub-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.set-text {
    color: var(--accent-gold);
    font-weight: bold;
}

.mana-symbol {
    display: inline-block;
    background: #333;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 10px;
    font-weight: bold;
    margin: 0 1px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.empty-state {
    margin-top: 3rem;
    text-align: center;
}

/* Organized List View Styles */
.list-items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mtg-list-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem !important;
    gap: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(20, 24, 33, 0.6) !important;
}

.mtg-list-item:hover {
    background: rgba(212, 175, 55, 0.05) !important;
    border-color: var(--accent-gold);
    transform: translateX(10px);
    box-shadow: -5px 0 20px rgba(212, 175, 55, 0.1);
}

.item-preview {
    flex-shrink: 0;
}

.list-card-preview {
    width: 60px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s;
    cursor: zoom-in;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.list-card-preview:hover {
    transform: scale(4.5) translateX(45px);
    z-index: 100;
    box-shadow: 0 15px 45px rgba(0,0,0,0.9);
}

.item-main-info {
    flex: 2;
    min-width: 250px;
}

.item-name {
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin: 0;
    font-family: 'Marcellus', serif;
}

.item-details {
    flex: 2;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.detail-box {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.item-mana {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.mana-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin: 0 2px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
}

.mana-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: flex-end;
    min-width: 80px;
}

.item-type {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tiny-lang {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
}

.btn-action-round {
    width: 38px;
    height: 38px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    position: relative;
    z-index: 20;
}

.item-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    margin-left: 2rem !important;
    position: relative !important;
    z-index: 10 !important;
}

.btn-action-round:hover {
    transform: scale(1.1) rotate(10deg);
}

.btn-action-round.view:hover { color: var(--accent-gold) !important; border-color: var(--accent-gold) !important; box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important; }
.btn-action-round.add:hover { color: #2ecc71 !important; border-color: #2ecc71 !important; box-shadow: 0 0 10px rgba(46, 204, 113, 0.3) !important; }

.rarity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.rarity-dot.rare { background: linear-gradient(135deg, #c5a14d, #d4af37); }
.rarity-dot.mythic { background: linear-gradient(135deg, #d45c1a, #ff4500); }
.rarity-dot.uncommon { background: linear-gradient(135deg, #707883, #a0a0a0); }
.rarity-dot.common { background: #1a1718; border: 1px solid #fff; }

@media (max-width: 1200px) {
    .library-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 1050;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border-left: none;
        border-right: 3px solid var(--accent-gold);
        border-radius: 0 15px 15px 0;
        max-height: none;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
        background: rgba(11, 14, 20, 0.95);
        backdrop-filter: blur(20px);
    }

    .filter-sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.7);
        z-index: 1040;
        display: none;
        backdrop-filter: blur(5px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-filter-btn {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--accent-gold);
        color: #000;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.5), 0 0 15px rgba(212, 175, 55, 0.4);
        border: 2px solid white;
        transition: all 0.3s;
    }

    .mobile-filter-btn:hover {
        transform: scale(1.1);
    }

    .gallery-header {
        padding: 1rem;
    }

    .magic-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .mtg-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .card-footer-info {
        padding: 0.8rem;
    }

    .card-name-text {
        font-size: 0.9rem;
    }

    .mtg-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.2rem !important;
    }

    .item-main-info {
        min-width: unset;
        width: 100%;
    }

    .item-details {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }

    .item-mana {
        width: 100%;
        justify-content: flex-start;
    }

    .list-card-preview:hover {
        transform: scale(3) translateY(-20px);
        margin-left: 50px;
    }
}

/* --- Sets Page Styles --- */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.set-card {
    background: rgba(20, 24, 33, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    overflow: hidden;
}

.set-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.3s;
}

.set-card:hover {
    transform: translateY(-5px);
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.set-card:hover::before {
    opacity: 1;
}

.set-icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.set-icon-wrapper i, .set-icon-wrapper i::before {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 2.2rem !important;
    display: block !important;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)) !important;
}

.set-card:hover .set-icon-wrapper {
    background: rgba(212, 175, 55, 0.3) !important;
    border-color: var(--accent-gold);
}

.set-card:hover .set-icon-wrapper i {
    color: var(--accent-gold) !important;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6)) !important;
}

.set-info {
    flex: 1;
}

.set-name {
    display: block;
    font-family: 'Marcellus', serif;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.set-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.set-code {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.mobile-filter-btn {
    display: none;
}

/* --- Epic Booster Experience --- */
.booster-experience {
    perspective: 2000px;
}

.booster-pack-wrapper {
    width: 300px;
    height: 420px;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.booster-pack-wrapper:hover {
    transform: scale(1.05) rotateY(10deg);
}

.booster-pack {
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.booster-pack-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.2);
}

.pack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.click-prompt {
    margin-top: 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--accent-gold);
    animation: booster-pulse 2s infinite;
}

.pack-opening {
    animation: openPackAnim 0.8s forwards;
}

@keyframes openPackAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); filter: brightness(2); }
    100% { transform: scale(0); opacity: 0; }
}

.mtg-card-grid-booster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.mtg-card-booster-container {
    width: 240px;
    height: 335px;
    perspective: 1000px;
}

.mtg-card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.mtg-card-flipper.is-flipped {
    transform: rotateY(180deg);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.card-back {
    background: #111;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.mtg-back-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.mtg-back-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.card-front {
    transform: rotateY(180deg);
}

.mythic-glow {
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.6), 0 0 50px rgba(255, 69, 0, 0.3) !important;
    border-color: #ff4500 !important;
}

.rare-glow {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5) !important;
    border-color: var(--accent-gold) !important;
}

@keyframes booster-pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--accent-gold); }
    100% { opacity: 0.5; }
}