/* ========================================
   MTG Card Collection - Custom Theme
   Dark Fantasy Aesthetic
   ======================================== */

/* ========================================
   Mana Icons
   ======================================== */

.mana-icon,
.mana-icon-sm,
.mana-icon-lg {
    display: inline-block;
    vertical-align: middle;
    margin: 0 1px;
}

.mana-icon {
    width: 18px;
    height: 18px;
}

.mana-icon-sm {
    width: 14px;
    height: 14px;
}

.mana-icon-lg {
    width: 24px;
    height: 24px;
}

/* Mana cost container */
.mana-cost {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

/* ========== ROOT VARIABLES ========== */
:root {
    /* MTG Color Palette */
    --mtg-black: #1a1a1a;
    --mtg-dark-gray: #2a2a2a;
    --mtg-gray: #3a3a3a;
    --mtg-light-gray: #4a4a4a;
    --mtg-purple: #6b46c1;
    --mtg-dark-purple: #553c9a;
    --mtg-purple-light: #8b5cf6;
    --mtg-gold: #d4af37;
    --mtg-gold-dark: #b8922e;
    --mtg-light-gold: #f4cf57;
    --mtg-white: #f5f5f5;
    --mtg-success: #22c55e;
    --mtg-danger: #ef4444;
    --mtg-info: #3b82f6;

    /* Rarity Colors */
    --rarity-common: #9e9e9e;
    --rarity-uncommon: #c0c0c0;
    --rarity-rare: #ffd700;
    --rarity-mythic: #ff6347;

    /* Fonts */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

/* ========== GLOBAL STYLES ========== */
body {
    background: linear-gradient(135deg, var(--mtg-black) 0%, var(--mtg-dark-gray) 100%);
    color: var(--mtg-white);
    font-family: var(--font-body);
    min-height: 100vh;
}

/* ========== GLOBAL FORM STYLES ========== */
.form-control {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control:focus {
    background: var(--mtg-dark-gray);
    border-color: var(--mtg-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    color: var(--mtg-white);
    outline: none;
}

.form-control::placeholder {
    color: #888;
}

.form-select {
    background-color: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-select:focus {
    background-color: var(--mtg-dark-gray);
    border-color: var(--mtg-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    color: var(--mtg-white);
    outline: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-label {
    color: var(--mtg-gold);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #888;
    font-size: 0.85rem;
}

/* Custom checkbox styling */
.form-check-input {
    background-color: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
}

.form-check-input:checked {
    background-color: var(--mtg-gold);
    border-color: var(--mtg-gold);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    border-color: var(--mtg-gold);
}

.form-check-label {
    color: var(--mtg-white);
}

/* ========== NAVIGATION ========== */
.mtg-navbar {
    background: linear-gradient(90deg, var(--mtg-dark-purple) 0%, var(--mtg-purple) 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mtg-gold) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    font-size: 1.8rem;
}

.brand-text {
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: var(--mtg-white) !important;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0 0.25rem;
    padding: 0.5rem 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--mtg-gold) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mtg-gold);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Navbar Search */
.nav-search-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-toggle {
    background: transparent;
    border: none;
    color: var(--mtg-white);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-search-toggle:hover {
    color: var(--mtg-gold);
}

.nav-search-toggle:focus {
    outline: none;
}

.nav-search-wrapper {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1100;
}

.nav-search-wrapper.active {
    width: 300px;
    opacity: 1;
    visibility: visible;
}

.nav-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid var(--mtg-purple);
    border-radius: 20px;
    background: var(--mtg-dark-gray);
    color: var(--mtg-white);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-search-input::placeholder {
    color: var(--mtg-light-gray);
}

.nav-search-input:focus {
    border-color: var(--mtg-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.nav-search-close {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--mtg-light-gray);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-search-close:hover {
    color: var(--mtg-white);
}

.nav-search-close:focus {
    outline: none;
}

/* Nav search dropdown positioning */
.nav-search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    border-radius: 6px;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .nav-search-item {
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-search-container {
        width: 100%;
    }

    .nav-search-toggle {
        display: none;
    }

    .nav-search-wrapper {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
    }

    .nav-search-wrapper.active {
        width: 100%;
    }

    .nav-search-input {
        border-radius: 4px;
    }

    .nav-search-close {
        display: none;
    }

    .nav-search-dropdown {
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        max-height: 60vh;
    }
}

/* ========== HERO SECTION ========== */
.hero-section {
    padding: 3rem 0 2rem;
    background: linear-gradient(180deg, rgba(107, 70, 193, 0.1) 0%, transparent 100%);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--mtg-white);
    opacity: 0.9;
}

/* ========== FILTERS SECTION ========== */
.filters-section {
    padding: 2rem 0;
    background: var(--mtg-dark-gray);
    border-top: 2px solid var(--mtg-purple);
    border-bottom: 2px solid var(--mtg-purple);
}

.filter-group {
    margin-bottom: 0;
}

.filter-label {
    color: var(--mtg-gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Ensure filter columns don't overflow */
.filters-section [class*="col-"] {
    overflow: hidden;
}

.filter-label i {
    margin-right: 0.3rem;
}

.filter-input,
.filter-select {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-input:focus,
.filter-select:focus {
    background: var(--mtg-light-gray);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.25);
}

.filter-select option {
    background: var(--mtg-gray);
    color: var(--mtg-white);
}

.filter-btn {
    padding: 0.6rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
}

.btn-primary:hover {
    background: var(--mtg-dark-purple);
    border-color: var(--mtg-dark-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.3);
}

.btn-secondary {
    background: var(--mtg-light-gray);
    border-color: var(--mtg-light-gray);
}

.btn-secondary:hover {
    background: var(--mtg-gray);
    border-color: var(--mtg-gray);
}

/* ========== RESULTS SECTION ========== */
.results-section {
    padding: 1.5rem 0 1rem;
}

.results-text {
    color: var(--mtg-white);
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

.results-text strong {
    color: var(--mtg-gold);
    font-weight: 700;
}

.filter-indicator {
    color: var(--mtg-gold);
    font-weight: 600;
    margin-left: 0.5rem;
}

.clear-filters {
    color: var(--mtg-purple);
    text-decoration: none;
    margin-left: 0.5rem;
    transition: color 0.2s ease;
}

.clear-filters:hover {
    color: var(--mtg-gold);
}

/* ========== CARDS SECTION ========== */
.cards-section {
    padding: 2rem 0 3rem;
}

/* Card Link Wrapper - Remove default link styling */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.mtg-card {
    background: var(--mtg-dark-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(107, 70, 193, 0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-link:hover .mtg-card {
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.6);
    border-color: var(--mtg-gold);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 139.5%; /* MTG card aspect ratio */
    background: var(--mtg-gray);
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-link:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
}

.card-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.card-flip-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--mtg-gold);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Rarity Badge - Compact Inline Style */
.rarity-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Rarity Colors - Better contrast for readability */
.rarity-common {
    background: rgba(158, 158, 158, 0.2);
    border: 1px solid rgba(158, 158, 158, 0.5);
    color: #d0d0d0;
}

.rarity-uncommon {
    background: rgba(192, 192, 192, 0.2);
    border: 1px solid rgba(192, 192, 192, 0.6);
    color: #e8e8e8;
}

.rarity-rare {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.6);
    color: #ffd700;
}

.rarity-mythic {
    background: rgba(255, 99, 71, 0.2);
    border: 1px solid rgba(255, 99, 71, 0.6);
    color: #ff6347;
}

/* ========== CARD INFO SECTION ========== */
.card-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Card Name - Most Prominent */
.card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

/* Mana Cost & Rarity Row */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mana-cost {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

/* Card Type */
.card-type {
    font-size: 0.85rem;
    color: var(--mtg-light-text);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

/* Power/Toughness */
.power-toughness {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(107, 70, 193, 0.12);
    border: 1px solid rgba(107, 70, 193, 0.35);
    color: var(--mtg-gold);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.power-toughness i {
    color: var(--mtg-purple);
    font-size: 0.7rem;
}

/* Card Footer Row */
.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
}

/* Card Set - Subtle Footer */
.card-set {
    font-size: 0.75rem;
    color: var(--mtg-light-text);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-set i {
    font-size: 0.7rem;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Card Status Icons */
.card-status-icons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
}

.status-icon.status-collection {
    background: rgba(40, 167, 69, 0.9);
    color: #fff;
}

.status-icon.status-wishlist {
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
}

/* Card Price Row */
.card-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-price {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.card-price-usd {
    background: rgba(40, 167, 69, 0.2);
    color: #4ade80;
}

.card-price-eur {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    border: 2px dashed var(--mtg-light-gray);
}

.no-results i {
    font-size: 4rem;
    color: var(--mtg-light-gray);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--mtg-white);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* ========== PAGINATION ========== */
.pagination-section {
    padding: 2rem 0 3rem;
}

.pagination {
    gap: 0.5rem;
}

.page-link {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
}

.page-item.disabled .page-link {
    background: var(--mtg-gray);
    border-color: var(--mtg-gray);
    color: var(--mtg-light-gray);
    opacity: 0.5;
}

/* ========== FOOTER ========== */
.mtg-footer {
    background: var(--mtg-dark-gray);
    border-top: 2px solid var(--mtg-purple);
    padding: 2rem 0;
    margin-top: auto;
}

.mtg-footer p {
    color: var(--mtg-white);
    opacity: 0.8;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .filters-section {
        padding: 1.5rem 0;
    }

    .filter-group {
        margin-bottom: 1rem;
    }

    .mtg-card {
        margin-bottom: 1rem;
    }
}

/* ========================================
   Authentication Pages
   ======================================== */

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--mtg-black) 0%, var(--mtg-dark-gray) 100%);
}

.auth-card {
    background: var(--mtg-dark-gray);
    border: 2px solid var(--mtg-purple);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(107, 70, 193, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin-bottom: 0.5rem;
}

.auth-title i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.auth-subtitle {
    color: var(--mtg-light-text);
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-card .form-label {
    color: var(--mtg-gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-card .form-control {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-text);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-card .form-control:focus {
    background: var(--mtg-dark-gray);
    border-color: var(--mtg-purple);
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.25);
    color: var(--mtg-text);
}

.auth-card .form-control::placeholder {
    color: #888;
}

.auth-card .form-select {
    background-color: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-text);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-card .form-select:focus {
    background-color: var(--mtg-dark-gray);
    border-color: var(--mtg-purple);
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.25);
    color: var(--mtg-text);
}

.auth-card .form-select option {
    background-color: var(--mtg-dark-gray);
    color: var(--mtg-text);
}

.auth-card textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.auth-card .form-text {
    color: var(--mtg-light-text);
    font-size: 0.875rem;
}

.auth-card .form-check-label {
    color: var(--mtg-text);
}

.auth-card .form-check-input {
    background-color: var(--mtg-gray);
    border-color: var(--mtg-light-gray);
}

.auth-card .form-check-input:checked {
    background-color: var(--mtg-purple);
    border-color: var(--mtg-purple);
}

.btn-auth {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.4);
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mtg-light-gray);
}

.auth-link {
    color: var(--mtg-purple);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--mtg-gold);
    text-decoration: underline;
}

/* Social Login */
.social-login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #888;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.social-login-divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--mtg-white);
    color: #333;
    border: 1px solid #ddd;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-google:hover {
    background: #f5f5f5;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-google .google-icon {
    flex-shrink: 0;
}

.btn-register {
    background: linear-gradient(135deg, var(--mtg-purple) 0%, var(--mtg-dark-purple) 100%);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
}

/* Form Errors */
.auth-card .invalid-feedback,
.auth-card .form-error-message {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ========================================
   Profile Page
   ======================================== */

.profile-section {
    min-height: calc(100vh - 200px);
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--mtg-black) 0%, var(--mtg-dark-gray) 100%);
}

.profile-card {
    background: var(--mtg-dark-gray);
    border: 2px solid var(--mtg-purple);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(107, 70, 193, 0.3);
}

.profile-header {
    background: linear-gradient(135deg, var(--mtg-purple) 0%, var(--mtg-dark-purple) 100%);
    padding: 3rem 2rem;
    text-align: center;
}

.profile-avatar {
    font-size: 5rem;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.profile-avatar .avatar-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--mtg-gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.profile-bio {
    color: var(--mtg-light-text);
    line-height: 1.6;
    margin: 0;
}

.favorite-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.favorite-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
}

.favorite-color-badge.color-w {
    border-color: #f8f6d8;
    background: rgba(248, 246, 216, 0.15);
}

.favorite-color-badge.color-u {
    border-color: #0e68ab;
    background: rgba(14, 104, 171, 0.15);
}

.favorite-color-badge.color-b {
    border-color: #150b00;
    background: rgba(21, 11, 0, 0.3);
}

.favorite-color-badge.color-r {
    border-color: #d3202a;
    background: rgba(211, 32, 42, 0.15);
}

.favorite-color-badge.color-g {
    border-color: #00733e;
    background: rgba(0, 115, 62, 0.15);
}

.profile-username {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.profile-member-since {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0;
}

.profile-content {
    padding: 2rem;
}

.profile-section-card {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-section-card:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.section-title i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--mtg-light-text);
    font-weight: 600;
}

.info-value {
    color: var(--mtg-text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    border: 1px solid var(--mtg-light-gray);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--mtg-light-text);
    font-size: 0.875rem;
}

/* Navbar Dropdown */
.navbar .dropdown-menu {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-purple);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar .dropdown-item {
    color: var(--mtg-text);
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.navbar .dropdown-item:hover {
    background: var(--mtg-purple);
    color: white;
}

.navbar .dropdown-item i {
    margin-right: 0.5rem;
    color: var(--mtg-gold);
}

.navbar .dropdown-divider {
    border-color: var(--mtg-light-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .profile-header {
        padding: 2rem 1rem;
    }

    .profile-avatar {
        font-size: 3.5rem;
    }

    .profile-username {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}


/* ========================================
   Card Detail Page
   ======================================== */

.card-detail-section {
    min-height: calc(100vh - 200px);
    padding: 2rem 0 4rem;
    background: linear-gradient(135deg, var(--mtg-black) 0%, var(--mtg-dark-gray) 100%);
}

.card-detail-container {
    background: var(--mtg-dark-gray);
    border-radius: 12px;
    border: 2px solid rgba(107, 70, 193, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Card Face Detail - 2 Column Layout */
.card-face-detail {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 2rem;
    align-items: start;
}

.card-face-detail.multi-face {
    border-bottom: 2px solid rgba(107, 70, 193, 0.3);
}

/* Left Column: Image + Set Info + Prices */
.card-detail-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

/* Card Image */
.card-detail-image {
    position: relative;
}

.card-detail-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(107, 70, 193, 0.4);
}

.card-detail-placeholder {
    background: var(--mtg-gray);
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--mtg-light-text);
    opacity: 0.5;
}

.card-detail-placeholder i {
    margin-bottom: 1rem;
}

/* Collection Owned Badge */
.card-detail-owned {
    margin-top: 0.5rem;
}

.owned-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.owned-badge.owned {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.owned-badge.owned i {
    color: #4caf50;
    font-size: 1.25rem;
}

.owned-badge.owned .owned-count {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #4caf50;
}

.owned-badge.owned .owned-label {
    color: var(--mtg-light-text);
}

.owned-badge.not-owned {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.owned-badge.not-owned i {
    color: var(--mtg-light-text);
    font-size: 1.25rem;
}

.owned-badge.not-owned .owned-count {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mtg-light-text);
}

.owned-badge.not-owned .owned-label {
    color: var(--mtg-light-text);
    opacity: 0.7;
}

/* Card Info Column */
.card-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-detail-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* Mana Cost & Rarity Meta Row */
.card-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(107, 70, 193, 0.3);
}

.card-detail-mana {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Type */
.card-detail-type {
    font-size: 1.1rem;
    color: var(--mtg-light-text);
    padding: 1rem;
    background: rgba(107, 70, 193, 0.1);
    border-left: 4px solid var(--mtg-purple);
    border-radius: 4px;
}

.card-detail-type strong {
    color: var(--mtg-gold);
}

/* Oracle Text (Card Abilities) */
.card-detail-oracle h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--mtg-gold);
    margin-bottom: 0.75rem;
}

.oracle-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(107, 70, 193, 0.2);
    color: var(--mtg-white);
    font-size: 1rem;
    line-height: 1.6;
}

/* Flavor Text */
.card-detail-flavor {
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--mtg-gold);
    border-radius: 4px;
    color: var(--mtg-light-text);
    font-size: 0.95rem;
    font-style: italic;
}

/* Stats Section */
.card-detail-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 6px;
    font-size: 0.95rem;
}

.stat-item i {
    color: var(--mtg-purple);
    font-size: 1rem;
}

.stat-item strong {
    color: var(--mtg-gold);
    min-width: 140px;
}

.stat-value {
    color: var(--mtg-white);
    font-weight: 600;
}

/* Set Information */
.card-detail-set {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.card-detail-set h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--mtg-gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-detail-legality h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.set-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.set-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--mtg-light-text);
}

.set-info-item strong {
    color: var(--mtg-white);
    min-width: 70px;
    font-weight: 500;
}

/* Legality Grid */
.legality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.legality-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legality-item strong {
    color: var(--mtg-white);
}

.legality-status {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Legality Status Colors */
.legality-legal {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.legality-legal .legality-status {
    color: #4caf50;
}

.legality-notlegal,
.legality-banned {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.legality-notlegal .legality-status,
.legality-banned .legality-status {
    color: #f44336;
}

.legality-restricted {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.legality-restricted .legality-status {
    color: #ff9800;
}

/* Face Separator for Double-Faced Cards */
.face-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-top: 2px solid rgba(107, 70, 193, 0.3);
    border-bottom: 2px solid rgba(107, 70, 193, 0.3);
    color: var(--mtg-gold);
    font-weight: 700;
    font-size: 1.1rem;
}

.face-separator i {
    font-size: 1.3rem;
    animation: rotate 2s linear infinite;
}

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

/* Responsive Design for Card Detail */
@media (max-width: 992px) {
    .card-face-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-detail-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .card-detail-name {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .card-detail-section {
        padding: 1rem 0 2rem;
    }

    .card-face-detail {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .card-detail-left {
        position: static;
        max-width: 350px;
        margin: 0 auto;
    }

    .card-detail-name {
        font-size: 1.75rem;
    }

    .legality-grid {
        grid-template-columns: 1fr;
    }

    .stat-item strong {
        min-width: 100px;
    }

    .owned-badge .owned-count {
        font-size: 1.5rem;
    }

    .prices-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   Set Cards (Set Overview Page)
   ======================================== */

/* Set Card - Reuses .mtg-card base styles */
.set-card {
    /* Inherits all .mtg-card styles */
}

/* Empty set card (not yet imported) */
.set-card-empty {
    opacity: 0.6;
    cursor: default;
}

.set-card-empty .set-icon-wrapper {
    filter: grayscale(50%);
}

.set-not-imported {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(108, 117, 125, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

.set-not-imported i {
    margin-right: 0.25rem;
}

/* Set Icon Wrapper - Similar to card-image-wrapper */
.set-icon-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio for set icons */
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.set-icon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.set-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.card-link:hover .set-icon {
    transform: scale(1.1);
}

.set-icon-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-text);
    opacity: 0.3;
}

/* Set Info Section */
.set-info {
    /* Inherits .card-info styles */
}

.set-name {
    /* Inherits .card-name styles */
    text-align: center;
}

/* Set Code Badge */
.set-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgba(107, 70, 193, 0.2);
    border: 1px solid rgba(107, 70, 193, 0.4);
    border-radius: 6px;
    color: var(--mtg-purple);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 auto;
}

.set-code-badge i {
    font-size: 0.75rem;
}

/* Set Metadata */
.set-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.set-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--mtg-light-text);
}

.set-meta-item i {
    color: var(--mtg-purple);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.set-meta-item span {
    color: var(--mtg-white);
}

/* Hover Effects for Set Cards */
.card-link:hover .set-card {
    /* Inherits hover from .card-link:hover .mtg-card */
}

/* Responsive Adjustments for Set Cards */
@media (max-width: 768px) {
    .set-icon-container {
        padding: 1.5rem;
    }

    .set-code-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .set-meta-item {
        font-size: 0.8rem;
    }
}

/* ========================================
   Collection Page Styles
   ======================================== */

/* Collection Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.15) 0%, rgba(212, 175, 55, 0.15) 100%);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(107, 70, 193, 0.4);
    border-color: rgba(107, 70, 193, 0.5);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(107, 70, 193, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--mtg-gold);
    flex-shrink: 0;
}

.stat-content {
    flex-grow: 1;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--mtg-gold);
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--mtg-light-text);
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Clickable stat card */
.stat-card-link {
    text-decoration: none;
    cursor: pointer;
}

.stat-card-link:hover {
    text-decoration: none;
    border-color: var(--mtg-gold);
}

.stat-card-link .stat-value {
    color: var(--mtg-gold);
}

.stat-card-link .stat-label {
    color: var(--mtg-light-text);
}

/* Collection action buttons */
.collection-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
}

.collection-action-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.collection-actions .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Collection Quick Action Buttons */
.collection-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--mtg-gold);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.quick-action-btn i {
    font-size: 1rem;
    opacity: 0.9;
}

.quick-action-btn.dropdown-toggle::after {
    margin-left: 0.5rem;
    opacity: 0.7;
}

.collection-quick-actions .dropdown-menu-dark {
    background: var(--mtg-darker);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.collection-quick-actions .dropdown-menu-dark .dropdown-item {
    color: var(--mtg-light-text);
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.collection-quick-actions .dropdown-menu-dark .dropdown-item:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mtg-gold);
}

.collection-quick-actions .dropdown-menu-dark .dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Foil quantity controls */
.foil-row {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.foil-display {
    color: var(--mtg-gold);
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.foil-display i {
    margin-right: 2px;
}

.foil-btn {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.foil-btn:disabled {
    opacity: 0.3;
}

/* Unused Cards Page */
.unused-summary-section {
    padding: 2rem 0;
}

.unused-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
}

.unused-stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mtg-purple), var(--mtg-dark-purple));
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--mtg-white);
}

.unused-stat-info {
    display: flex;
    flex-direction: column;
}

.unused-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mtg-gold);
    font-family: var(--font-heading);
    line-height: 1;
}

.unused-stat-label {
    font-size: 0.9rem;
    color: var(--mtg-light-gray);
    margin-top: 0.25rem;
}

.unused-cards-section {
    padding: 2rem 0;
}

.unused-cards-section .section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.unused-cards-section .section-header small {
    font-size: 0.85rem;
    font-weight: normal;
}

.price-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(40, 167, 69, 0.9);
    color: var(--mtg-white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--mtg-dark-gray);
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.2);
}

.empty-state i {
    font-size: 4rem;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--mtg-white);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--mtg-light-gray);
    margin: 0;
}

/* Collection Value Tracker */
.value-overview-section {
    padding: 2rem 0;
}

.value-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.value-stat-card.primary {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.3), rgba(40, 167, 69, 0.2));
    border-color: rgba(40, 167, 69, 0.5);
}

.value-stat-card.primary .value-stat-value {
    font-size: 2.5rem;
    color: #28a745;
}

.value-stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mtg-purple), var(--mtg-dark-purple));
    border-radius: 12px;
    font-size: 1.5rem;
    color: var(--mtg-white);
    flex-shrink: 0;
}

.value-stat-info {
    display: flex;
    flex-direction: column;
}

.value-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mtg-gold);
    font-family: var(--font-heading);
    line-height: 1;
}

.value-stat-label {
    font-size: 0.9rem;
    color: var(--mtg-light-gray);
    margin-top: 0.25rem;
}

.value-breakdown-section {
    padding: 2rem 0;
}

.value-panel {
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.value-panel .panel-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mtg-gold);
    padding: 1rem 1.25rem;
    margin: 0;
    background: rgba(107, 70, 193, 0.1);
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
}

.value-panel .panel-title i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.value-panel .panel-content {
    padding: 1.25rem;
}

.value-breakdown-item {
    margin-bottom: 1rem;
}

.value-breakdown-item:last-child {
    margin-bottom: 0;
}

.value-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.value-breakdown-value {
    font-weight: 700;
    color: var(--mtg-gold);
}

.value-breakdown-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.value-breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.value-breakdown-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
}

/* Valuable Cards List */
.valuable-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.valuable-card-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.valuable-card-item:hover {
    background: rgba(107, 70, 193, 0.2);
}

.valuable-card-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-purple);
    color: var(--mtg-white);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.valuable-card-image {
    width: 40px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.valuable-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder-mini {
    width: 100%;
    height: 100%;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
    font-size: 0.8rem;
}

.valuable-card-info {
    flex: 1;
    min-width: 0;
}

.valuable-card-name {
    display: block;
    color: var(--mtg-white);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.valuable-card-set {
    display: block;
    color: var(--mtg-light-gray);
    font-size: 0.75rem;
}

.valuable-card-quantity {
    color: var(--mtg-light-gray);
    font-size: 0.85rem;
    font-weight: 600;
}

.valuable-card-price {
    text-align: right;
    flex-shrink: 0;
}

.valuable-card-price .unit-price {
    display: block;
    color: var(--mtg-gold);
    font-weight: 700;
    font-size: 0.95rem;
}

.valuable-card-price .total-price {
    display: block;
    color: var(--mtg-light-gray);
    font-size: 0.75rem;
}

/* Collection Card Wrapper */
.collection-card-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.collection-card-wrapper .card-link {
    flex-grow: 1;
}

/* Quantity Badge */
.quantity-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(107, 70, 193, 0.95);
    color: var(--mtg-white);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quantity-badge i {
    font-size: 0.75rem;
}

/* Collection Actions */
.collection-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 0 0 10px 10px;
    margin-top: -10px;
    position: relative;
    z-index: 5;
}

.collection-actions .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.collection-actions .btn-outline-primary {
    border-color: rgba(107, 70, 193, 0.5);
    color: var(--mtg-purple);
}

.collection-actions .btn-outline-primary:hover {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
}

.collection-actions .btn-outline-danger {
    border-color: rgba(220, 53, 69, 0.5);
    color: #dc3545;
}

.collection-actions .btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: var(--mtg-white);
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--mtg-gold);
    font-size: 1rem;
}

/* Responsive Adjustments for Collection */
@media (max-width: 768px) {
    /* Global: Add spacing between columns on mobile when they stack */
    .row [class*="col-md-"],
    .row [class*="col-lg-"] {
        margin-bottom: 0.75rem;
    }

    .row [class*="col-md-"]:last-child,
    .row [class*="col-lg-"]:last-child {
        margin-bottom: 0;
    }

    /* Reduce spacing for stat cards specifically */
    .row [class*="col-md-"] .stat-card {
        margin-bottom: 0;
    }

    .stat-card {
        padding: 1rem;
        gap: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .collection-actions {
        gap: 0.3rem;
        padding: 0.5rem;
    }

    .collection-actions .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .quantity-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}


/* ========================================
   In Collection Badge (for card grid)
   ======================================== */

.in-collection-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(40, 167, 69, 0.95);
    color: var(--mtg-white);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.in-collection-badge i {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .in-collection-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }

    .in-collection-badge i {
        font-size: 0.75rem;
    }
}

/* In Wishlist Badge */
.in-wishlist-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(220, 53, 69, 0.95);
    color: var(--mtg-white);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Position wishlist badge below collection badge when both are shown */
.in-wishlist-badge.badge-bottom {
    top: 45px;
}

/* Priority Badge */
.priority-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.priority-badge.high {
    background: rgba(220, 53, 69, 0.95);
    color: white;
}

.priority-badge.medium {
    background: rgba(255, 193, 7, 0.95);
    color: black;
}

.priority-badge.low {
    background: rgba(23, 162, 184, 0.95);
    color: white;
}


/* ========================================
   Statistics Page
   ======================================== */

.stats-overview-section {
    padding: 2rem 0;
    background: linear-gradient(180deg, rgba(107, 70, 193, 0.1) 0%, transparent 100%);
}

.statistics-section {
    padding: 2rem 0 4rem;
}

.stats-panel {
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mtg-gold);
    padding: 1.25rem 1.5rem;
    margin: 0;
    background: rgba(107, 70, 193, 0.1);
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
}

.panel-title i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.panel-content {
    padding: 1.5rem;
}

/* Stat Bars */
.stat-bar-item {
    margin-bottom: 1.25rem;
}

.stat-bar-item:last-child {
    margin-bottom: 0;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-bar-value {
    font-size: 0.9rem;
    color: var(--mtg-light-text);
}

.stat-bar {
    height: 8px;
    background: var(--mtg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Rarity fills */
.rarity-fill-common {
    background: linear-gradient(90deg, #6b6b6b, #9e9e9e);
}

.rarity-fill-uncommon {
    background: linear-gradient(90deg, #8a8a8a, #c0c0c0);
}

.rarity-fill-rare {
    background: linear-gradient(90deg, #b8860b, #ffd700);
}

.rarity-fill-mythic {
    background: linear-gradient(90deg, #cc4125, #ff6347);
}

/* Color badges */
.color-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.color-w { background: rgba(248, 231, 185, 0.2); color: #f8e7b9; border: 1px solid rgba(248, 231, 185, 0.4); }
.color-u { background: rgba(14, 104, 171, 0.2); color: #0e68ab; border: 1px solid rgba(14, 104, 171, 0.4); }
.color-b { background: rgba(21, 11, 0, 0.3); color: #a88f7d; border: 1px solid rgba(168, 143, 125, 0.4); }
.color-r { background: rgba(211, 32, 42, 0.2); color: #d3202a; border: 1px solid rgba(211, 32, 42, 0.4); }
.color-g { background: rgba(0, 115, 62, 0.2); color: #00733e; border: 1px solid rgba(0, 115, 62, 0.4); }
.color-colorless { background: rgba(150, 150, 150, 0.2); color: #c0c0c0; border: 1px solid rgba(192, 192, 192, 0.4); }
.color-multicolor { background: linear-gradient(135deg, rgba(248, 231, 185, 0.2), rgba(0, 115, 62, 0.2)); color: var(--mtg-gold); border: 1px solid rgba(212, 175, 55, 0.4); }

/* Color fills */
.color-fill-w { background: linear-gradient(90deg, #c9b77f, #f8e7b9); }
.color-fill-u { background: linear-gradient(90deg, #0a4a7a, #0e68ab); }
.color-fill-b { background: linear-gradient(90deg, #3d2f24, #6b5344); }
.color-fill-r { background: linear-gradient(90deg, #8b1a1a, #d3202a); }
.color-fill-g { background: linear-gradient(90deg, #004d29, #00733e); }
.color-fill-colorless { background: linear-gradient(90deg, #6b6b6b, #a0a0a0); }
.color-fill-multicolor { background: linear-gradient(90deg, var(--mtg-purple), var(--mtg-gold)); }

/* Card Type Stats */
.type-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.type-stat-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.75rem;
    align-items: center;
}

.type-stat-icon {
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 70, 193, 0.2);
    border-radius: 8px;
    color: var(--mtg-purple);
    font-size: 1rem;
}

.type-stat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.type-stat-name {
    font-size: 0.85rem;
    color: var(--mtg-light-text);
    font-weight: 500;
}

.type-stat-count {
    font-size: 0.8rem;
    color: var(--mtg-gold);
    font-weight: 600;
}

.type-stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.type-stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mtg-purple), var(--mtg-gold));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Mana Curve */
.mana-curve {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    gap: 0.5rem;
    padding-top: 1rem;
}

.mana-curve-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.mana-curve-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--mtg-purple), var(--mtg-dark-purple));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: height 0.5s ease;
}

.mana-curve-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mtg-white);
    padding-top: 0.25rem;
}

.mana-curve-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mtg-gold);
    background: var(--mtg-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Set Stats */
.set-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.set-stat-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(107, 70, 193, 0.2);
}

.set-stat-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.set-stat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.set-name {
    font-weight: 600;
    color: var(--mtg-white);
}

.set-code {
    font-size: 0.8rem;
    color: var(--mtg-light-text);
}

.set-stat-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--mtg-light-text);
    margin-bottom: 0.5rem;
}

.set-completion {
    color: var(--mtg-gold);
    font-weight: 600;
}

.set-fill {
    background: linear-gradient(90deg, var(--mtg-purple), var(--mtg-gold));
}

/* Recent Cards Grid */
.recent-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.recent-card-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.recent-card-item:hover {
    transform: translateY(-4px);
}

.recent-card-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.2s ease;
}

.recent-card-item:hover .recent-card-img {
    box-shadow: 0 8px 16px rgba(107, 70, 193, 0.5);
}

.recent-card-placeholder {
    width: 100%;
    aspect-ratio: 5/7;
    background: var(--mtg-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
    font-size: 2rem;
}

.recent-card-info {
    text-align: center;
    margin-top: 0.5rem;
}

.recent-card-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mtg-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.recent-card-date {
    display: block;
    font-size: 0.7rem;
    color: var(--mtg-light-text);
}

.no-data {
    color: var(--mtg-light-text);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.no-data a {
    color: var(--mtg-purple);
}

.no-data a:hover {
    color: var(--mtg-gold);
}

/* Stats Toggle Link */
.stats-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mtg-light-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.stats-toggle-link:hover {
    color: var(--mtg-gold);
    text-decoration: none;
    border-bottom-color: var(--mtg-gold);
}

.stats-toggle-link.active {
    color: var(--mtg-gold);
}

.stats-toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.stats-toggle-link.active .stats-toggle-icon {
    transform: rotate(180deg);
}

/* Recent Additions List (for collection page) */
.recent-additions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-addition-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.recent-addition-item:hover {
    background: rgba(107, 70, 193, 0.25);
    color: inherit;
    text-decoration: none;
}

.recent-addition-item .recent-card-name {
    flex: 1;
    font-weight: 600;
    color: var(--mtg-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
    display: inline;
}

.recent-addition-item .recent-card-set {
    font-size: 0.75rem;
    color: var(--mtg-gold);
    background: rgba(255, 215, 0, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin: 0 0.75rem;
}

.recent-addition-item .recent-card-date {
    font-size: 0.75rem;
    color: var(--mtg-light-text);
    display: inline;
}

/* Bootstrap 4 gap fallback (g-4 doesn't exist in BS4) */
.row.g-4 > [class*="col"] {
    padding-bottom: 1.5rem;
}

.row.g-4 {
    margin-bottom: -1.5rem;
}

/* Bootstrap 4 flex gap fallbacks */
.d-flex.gap-2 > * {
    margin-right: 0.5rem;
}

.d-flex.gap-2 > *:last-child {
    margin-right: 0;
}

.d-flex.gap-3 > * {
    margin-right: 1rem;
}

.d-flex.gap-3 > *:last-child {
    margin-right: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Bootstrap gap fallback mobile */
    .row.g-4 > [class*="col"] {
        padding-bottom: 1.25rem;
    }

    .row.g-4 {
        margin-bottom: -1.25rem;
    }

    /* Hero section mobile spacing */
    .hero-section {
        padding: 2rem 1rem 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    /* Stats overview section mobile */
    .stats-overview-section {
        padding: 1.5rem 0;
    }

    /* Statistics section mobile */
    .statistics-section {
        padding: 1.5rem 0 3rem;
    }

    .statistics-section .row {
        gap: 1.25rem;
    }

    .statistics-section .col-lg-6,
    .statistics-section .col-12 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Panels mobile spacing */
    .stats-panel {
        margin-bottom: 0;
    }

    .panel-title {
        font-size: 1.1rem;
        padding: 1rem 1.25rem;
    }

    .panel-content {
        padding: 1.25rem;
    }

    /* Stat bars mobile */
    .stat-bar-item {
        margin-bottom: 1rem;
    }

    .stat-bar-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .stat-bar-value {
        font-size: 0.8rem;
    }

    /* Mana curve mobile */
    .mana-curve {
        height: 150px;
    }

    /* Set stats mobile */
    .set-stat-item {
        padding: 0.75rem 0;
    }

    .set-stat-header {
        margin-bottom: 0.25rem;
    }

    .set-name {
        font-size: 0.9rem;
    }

    /* Recent cards grid mobile */
    .recent-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .recent-card-name {
        max-width: 80px;
    }

    /* General container padding on mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* =====================================================
   DECK BUILDER STYLES
   ===================================================== */

/* Decks Section */
.decks-section {
    padding: 40px 0;
}

/* Deck Card (in list) */
.deck-card {
    background: var(--mtg-darker);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.deck-card:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.deck-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.deck-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--mtg-gold);
    margin: 0;
    flex: 1;
    margin-right: 10px;
}

.format-badge {
    background: rgba(197, 165, 114, 0.2);
    color: var(--mtg-gold);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.format-badge.format-commander {
    background: rgba(128, 0, 128, 0.3);
    color: #da70d6;
}

.format-badge.format-modern {
    background: rgba(0, 128, 128, 0.3);
    color: #40e0d0;
}

.format-badge.format-standard {
    background: rgba(0, 100, 0, 0.3);
    color: #90ee90;
}

.format-badge.format-legacy {
    background: rgba(139, 69, 19, 0.3);
    color: #deb887;
}

.format-badge.format-vintage {
    background: rgba(75, 0, 130, 0.3);
    color: #9370db;
}

.format-badge.format-pioneer {
    background: rgba(255, 140, 0, 0.3);
    color: #ffa500;
}

.format-badge.format-pauper {
    background: rgba(128, 128, 128, 0.3);
    color: #c0c0c0;
}

.format-badge.format-brawl {
    background: rgba(220, 20, 60, 0.3);
    color: #ff6b6b;
}

.format-badge.format-none {
    background: rgba(100, 100, 100, 0.3);
    color: #b0b0b0;
}

/* Deck Badges Container */
.deck-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Visibility Badge */
.visibility-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.visibility-badge.visibility-public {
    background: rgba(40, 167, 69, 0.3);
    color: #90ee90;
}

.visibility-badge.visibility-private {
    background: rgba(108, 117, 125, 0.3);
    color: #adb5bd;
}

/* Deck Card Link */
.deck-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.deck-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Deck Author Link */
.deck-author {
    color: var(--mtg-light-text);
    font-size: 1rem;
}

.deck-author a {
    color: var(--mtg-gold);
    text-decoration: none;
}

.deck-author a:hover {
    text-decoration: underline;
}

/* Public Decks Preview (on profile) */
.public-decks-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.public-deck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.public-deck-item:hover {
    border-color: var(--mtg-gold);
    background: rgba(197, 165, 114, 0.1);
    text-decoration: none;
    color: inherit;
}

.public-deck-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.public-deck-name {
    font-weight: 600;
    color: var(--mtg-gold);
}

.public-deck-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.public-deck-meta .card-count {
    color: var(--mtg-light-text);
}

.public-deck-item i.fa-chevron-right {
    color: var(--mtg-light-gray);
    font-size: 0.9rem;
}

/* Toggle Switch Container */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.toggle-container:hover {
    border-color: var(--mtg-gold);
}

.toggle-container input[type="checkbox"] {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--mtg-light-gray);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-container input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-container input[type="checkbox"]:checked {
    background: #28a745;
}

.toggle-container input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 0.9rem;
    color: var(--mtg-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-text i {
    color: var(--mtg-gold);
}

/* Visibility Toggle (create page) */
.visibility-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 8px;
}

.visibility-toggle .toggle-switch {
    position: relative;
    flex-shrink: 0;
}

.visibility-toggle input[type="checkbox"] {
    position: relative;
    width: 50px;
    height: 26px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--mtg-light-gray);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.visibility-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.visibility-toggle input[type="checkbox"]:checked {
    background: #28a745;
}

.visibility-toggle input[type="checkbox"]:checked::before {
    transform: translateX(24px);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toggle-title {
    font-weight: 600;
    color: var(--mtg-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-title i {
    color: var(--mtg-gold);
}

.toggle-description {
    font-size: 0.85rem;
    color: var(--mtg-light-text);
}

/* Deck Settings Panel */
.deck-settings-panel {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.deck-settings-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--mtg-gold);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.deck-settings-title i {
    margin-right: 0.5rem;
}

.deck-settings-field {
    margin-bottom: 1rem;
}

.deck-settings-field > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mtg-light-text);
    margin-bottom: 0.5rem;
}

.deck-settings-panel .form-control {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    font-size: 0.9rem;
}

.deck-settings-panel .form-control:focus {
    background: var(--mtg-gray);
    border-color: var(--mtg-gold);
    color: var(--mtg-white);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Visibility Checkbox */
.deck-visibility-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    transition: border-color 0.2s;
    margin: 0;
}

.deck-visibility-option:hover {
    border-color: var(--mtg-gold);
}

.deck-visibility-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #28a745;
    cursor: pointer;
}

.deck-visibility-option .visibility-label {
    font-size: 0.9rem;
    color: var(--mtg-white);
}

.deck-visibility-option .visibility-label i {
    color: var(--mtg-gold);
    margin-right: 0.5rem;
}

.deck-settings-panel .btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

/* Deck Settings Modal - Complete Rewrite */
.deck-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.deck-settings-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.deck-settings-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-gold);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.deck-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.deck-settings-header h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--mtg-gold);
    margin: 0;
}

.deck-settings-header h4 i {
    margin-right: 0.5rem;
}

.deck-settings-close {
    background: none;
    border: none;
    color: var(--mtg-light-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-settings-close:hover {
    color: var(--mtg-white);
}

.deck-settings-body {
    padding: 1.5rem;
}

.deck-settings-field {
    margin-bottom: 1.25rem;
}

.deck-settings-field:last-child {
    margin-bottom: 0;
}

.deck-settings-field > label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mtg-light-text);
    margin-bottom: 0.5rem;
}

.deck-settings-field .form-control {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
}

.deck-settings-field .form-control:focus {
    background: var(--mtg-gray);
    border-color: var(--mtg-gold);
    color: var(--mtg-white);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.deck-settings-field .text-muted {
    color: var(--mtg-light-text);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}

/* Toggle Switch */
.deck-settings-toggle {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
}

.deck-settings-toggle input[type="checkbox"] {
    display: none;
}

.deck-settings-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    margin: 0;
}

.deck-settings-toggle .toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--mtg-light-gray);
    border-radius: 13px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.deck-settings-toggle .toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.deck-settings-toggle input[type="checkbox"]:checked + .toggle-label .toggle-switch {
    background: #28a745;
}

.deck-settings-toggle input[type="checkbox"]:checked + .toggle-label .toggle-switch::after {
    transform: translateX(24px);
}

.deck-settings-toggle .toggle-text {
    color: var(--mtg-white);
    font-size: 0.95rem;
}

.deck-settings-toggle .toggle-text i {
    color: var(--mtg-gold);
    margin-right: 0.5rem;
}

.deck-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--mtg-light-gray);
    background: rgba(0, 0, 0, 0.2);
}

.deck-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.deck-stat {
    color: var(--mtg-light);
    font-size: 0.9rem;
}

.deck-stat i {
    color: var(--mtg-gold);
    margin-right: 5px;
}

.deck-description {
    color: var(--mtg-light);
    font-size: 0.9rem;
    opacity: 0.8;
    flex: 1;
    margin-bottom: 10px;
}

.deck-meta {
    margin-bottom: 15px;
}

.deck-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Form Section */
.form-section {
    padding: 40px 0;
}

.form-card {
    background: var(--mtg-darker);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    padding: 30px;
}

.format-rules-list {
    font-size: 0.85rem;
    margin-top: 10px;
    padding-left: 20px;
}

.format-rules-list li {
    margin-bottom: 5px;
}

/* Deck Editor */
.deck-editor {
    min-height: calc(100vh - 200px);
}

.deck-editor-header {
    background: var(--mtg-darker);
    border-bottom: 1px solid rgba(197, 165, 114, 0.2);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.deck-editor-title {
    font-family: 'Cinzel', serif;
    color: var(--mtg-gold);
    margin: 0;
    font-size: 1.5rem;
    display: inline-block;
    margin-right: 15px;
}

.deck-editor-main {
    padding-top: 20px;
    padding-bottom: 40px;
}

.deck-editor-panel {
    height: calc(100vh - 250px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Card Browser */
.card-browser {
    background: var(--mtg-darker);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.browser-header {
    padding: 15px;
    border-bottom: 1px solid rgba(197, 165, 114, 0.2);
}

.browser-header h4 {
    font-family: 'Cinzel', serif;
    color: var(--mtg-gold);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.browser-header .search-form {
    margin-bottom: 10px;
}

.browser-info {
    color: var(--mtg-light);
    opacity: 0.7;
}

.available-cards-grid {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    align-content: start;
}

.available-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.available-card:hover {
    transform: scale(1.05);
}

.available-card .card-image-container {
    position: relative;
}

.available-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.available-card .card-placeholder {
    aspect-ratio: 488/680;
    background: var(--mtg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.available-card .card-placeholder i {
    font-size: 2rem;
    color: var(--mtg-light);
    opacity: 0.3;
}

.available-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 8px;
}

.available-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay-info {
    text-align: center;
    margin-bottom: 10px;
}

.card-overlay .card-name {
    display: block;
    color: var(--mtg-gold);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-overlay .availability {
    display: block;
    color: var(--mtg-light);
    font-size: 0.75rem;
}

.card-overlay .availability.unavailable {
    color: #ff6b6b;
}

.add-buttons {
    display: flex;
    gap: 5px;
}

.add-buttons .btn {
    font-size: 0.75rem;
    padding: 5px 10px;
}

.browser-pagination {
    padding: 10px;
    border-top: 1px solid rgba(197, 165, 114, 0.2);
}

.no-cards-message {
    text-align: center;
    padding: 30px;
    color: var(--mtg-light);
    opacity: 0.7;
    grid-column: 1 / -1;
}

/* Deck Panel */
.deck-panel {
    background: var(--mtg-darker);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.deck-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid rgba(197, 165, 114, 0.2);
}

.deck-section:last-of-type {
    border-bottom: none;
}

.sideboard-section {
    flex: 0 0 auto;
    max-height: 250px;
}

.deck-section-header {
    padding: 15px;
    border-bottom: 1px solid rgba(197, 165, 114, 0.1);
}

.deck-section-header h4 {
    font-family: 'Cinzel', serif;
    color: var(--mtg-gold);
    margin: 0;
    font-size: 1rem;
}

.count-badge {
    background: rgba(197, 165, 114, 0.2);
    color: var(--mtg-gold);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-left: 10px;
}

.deck-cards-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.deck-card-row {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 5px;
    transition: background 0.2s ease;
}

.deck-card-row:hover {
    background: rgba(197, 165, 114, 0.1);
}

.deck-card-quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
}

.deck-card-quantity-controls .btn {
    padding: 2px 6px;
    font-size: 0.75rem;
}

.quantity-value {
    min-width: 20px;
    text-align: center;
    color: var(--mtg-gold);
    font-weight: 600;
}

.deck-card-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.deck-card-details .deck-card-name {
    color: var(--mtg-light);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-card-details .deck-card-mana {
    flex-shrink: 0;
}

.deck-card-actions {
    display: flex;
    gap: 5px;
}

.deck-card-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.deck-panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(197, 165, 114, 0.2);
}

/* Deck Show Page */
.deck-meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.deck-count, .sideboard-count {
    color: var(--mtg-light);
}

.validation-section {
    padding: 20px 0 0;
}

.deck-contents-section {
    padding: 40px 0;
}

.deck-statistics-section {
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.2);
}

.deck-statistics-section .section-header {
    color: var(--mtg-gold);
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deck-section-panel {
    background: var(--mtg-darker);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.deck-section-panel .section-title {
    font-family: 'Cinzel', serif;
    color: var(--mtg-gold);
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-count-badge {
    background: rgba(197, 165, 114, 0.2);
    color: var(--mtg-gold);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.deck-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.deck-card-item {
    position: relative;
    text-align: center;
}

.deck-card-quantity {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--mtg-gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 1;
}

.deck-card-image img {
    width: 100%;
    border-radius: 8px;
}

.deck-card-info {
    margin-top: 8px;
}

.deck-card-info .deck-card-name {
    display: block;
    color: var(--mtg-light);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sideboard-panel {
    background: rgba(0, 0, 0, 0.3);
}

.sideboard-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sideboard-card-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sideboard-quantity {
    color: var(--mtg-gold);
    font-weight: 600;
    min-width: 30px;
}

.sideboard-name {
    flex: 1;
    color: var(--mtg-light);
}

.sideboard-mana {
    flex-shrink: 0;
}

.deck-actions-section {
    padding: 0 0 40px;
}

/* Alert small variant */
.alert-sm {
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* Responsive Deck Editor */
@media (max-width: 991px) {
    .deck-editor-panel {
        height: auto;
        max-height: 500px;
        margin-bottom: 20px;
    }

    .available-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 576px) {
    .deck-card-row {
        flex-wrap: wrap;
    }

    .deck-card-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 5px;
    }

    .available-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* ========================================
   Enhanced Profile Page
   ======================================== */

.profile-stats-card {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--mtg-gold);
    margin-bottom: 1.5rem;
}

.stats-title i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.stats-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.stats-subtitle i {
    color: var(--mtg-purple);
    margin-right: 0.5rem;
}

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-box {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--mtg-purple);
    transform: translateY(-2px);
}

.stat-box .stat-icon {
    font-size: 2rem;
    color: var(--mtg-purple);
    margin-bottom: 0.5rem;
}

.stat-box .stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mtg-gold);
}

.stat-box .stat-label {
    font-size: 0.85rem;
    color: var(--mtg-light-text);
    margin-top: 0.25rem;
}

/* Rarity Breakdown */
.rarity-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rarity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.rarity-row:last-child {
    border-bottom: none;
}

.rarity-count {
    font-weight: 600;
    color: var(--mtg-gold);
}

/* Color Breakdown */
.color-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--mtg-light-gray);
}

.color-row:last-child {
    border-bottom: none;
}

.color-row .mana-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.mana-w { background: #f9faf4; color: #1a1a1a; }
.mana-u { background: #0e68ab; color: white; }
.mana-b { background: #1a1a1a; color: white; border: 1px solid #444; }
.mana-r { background: #d3202a; color: white; }
.mana-g { background: #00733e; color: white; }
.mana-c { background: #ccc2c0; color: #1a1a1a; }

.color-name {
    flex: 1;
    color: var(--mtg-text);
}

.color-count {
    font-weight: 600;
    color: var(--mtg-gold);
}

/* Top Sets */
.top-sets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.set-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--mtg-gray);
    border-radius: 6px;
}

.set-code {
    background: var(--mtg-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.set-name {
    flex: 1;
    color: var(--mtg-text);
}

.set-count {
    color: var(--mtg-gold);
    font-weight: 600;
}

/* Profile Links */
.profile-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    color: var(--mtg-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.profile-link:hover {
    border-color: var(--mtg-purple);
    color: var(--mtg-gold);
    transform: translateX(5px);
}

.profile-link i {
    color: var(--mtg-purple);
    width: 20px;
    text-align: center;
}

.profile-link-danger {
    border-color: rgba(220, 53, 69, 0.3);
}

.profile-link-danger:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.profile-link-danger i {
    color: #dc3545;
}

.profile-link-warning {
    border-color: rgba(255, 193, 7, 0.3);
}

.profile-link-warning:hover {
    border-color: #ffc107;
    color: #ffc107;
}

.profile-link-warning i {
    color: #ffc107;
}

/* Deck Stats Info */
.deck-stats-info .info-row {
    padding: 0.5rem 0;
}

.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Responsive Profile Stats */
@media (max-width: 991px) {
    .stats-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid-large {
        grid-template-columns: 1fr;
    }

    .stat-box .stat-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   FRIENDS & LOANS SECTION (Themed)
   ======================================== */

/* Content Section */
.content-section {
    padding: 2rem 0;
}

/* Pending Requests Section - highlighted */
.pending-requests-section {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, transparent 100%);
    border-left: 4px solid #ffc107;
    padding-left: 1rem;
    margin-left: -1rem;
}

/* Sent Requests Section */
.sent-requests-section {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.03) 0%, transparent 100%);
}

/* Section Header */
.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.section-header h2 {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    margin: 0;
    font-size: 1.4rem;
}

.section-header h2 i {
    margin-right: 0.5rem;
}

.section-description {
    color: #888;
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
    width: 100%;
}

.results-count {
    color: #888;
    font-size: 0.9rem;
}

/* Friend Card (deck-card style) */
.friend-card {
    background: var(--mtg-darker, #1a1a1a);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.friend-card:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.friend-card.pending {
    border-left: 3px solid #ffc107;
}

.friend-card.sent {
    border-left: 3px solid #17a2b8;
}

.friend-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.friend-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.friend-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-card-avatar i {
    font-size: 2.5rem;
    color: var(--mtg-gold);
    opacity: 0.6;
}

.friend-card-info {
    flex: 1;
    min-width: 0;
}

.friend-card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    color: var(--mtg-white);
}

.friend-card-name a {
    color: var(--mtg-gold);
    text-decoration: none;
    transition: color 0.2s;
}

.friend-card-name a:hover {
    color: var(--mtg-light-gold);
}

.friend-card-meta {
    font-size: 0.85rem;
    color: #888;
    display: block;
}

.friend-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Friend Avatar Hero (for collection page) */
.friend-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.friend-avatar-hero {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--mtg-gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.friend-avatar-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-avatar-hero i {
    font-size: 4rem;
    color: var(--mtg-gold);
    opacity: 0.6;
}

/* Friend Select Card (for offer page) */
.friend-select-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--mtg-darker, #1a1a1a);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

.friend-select-card:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: inherit;
    text-decoration: none;
}

.friend-select-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.friend-select-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-select-avatar i {
    font-size: 3.5rem;
    color: var(--mtg-gold);
    opacity: 0.6;
}

.friend-select-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.friend-select-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--mtg-white);
    font-size: 1.1rem;
}

.friend-select-action {
    font-size: 0.85rem;
    color: var(--mtg-gold);
}

/* Loan Card Item */
.loan-card-item {
    background: var(--mtg-darker, #1a1a1a);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

.loan-card-item:hover {
    border-color: var(--mtg-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.loan-card-item.pending {
    border-left: 3px solid #ffc107;
}

.loan-card-item.sent {
    border-left: 3px solid #17a2b8;
}

.loan-card-item .loan-card-image {
    width: 80px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.loan-card-item .loan-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loan-card-item .loan-card-image .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-gray);
    color: #666;
    font-size: 1.5rem;
}

.loan-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.loan-card-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--mtg-white);
}

.loan-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.loan-card-meta .loan-quantity {
    background: var(--mtg-purple);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.loan-card-meta .loan-type {
    font-size: 0.85rem;
    color: #888;
}

.loan-card-meta .loan-type.request {
    color: #ffc107;
}

.loan-card-meta .loan-type.offer {
    color: #28a745;
}

.loan-message {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-bottom: 0.25rem;
}

.loan-date {
    color: #666;
    font-size: 0.8rem;
}

.loan-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* Loan List (compact view) */
.loan-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loan-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.loan-list-item:hover {
    background: var(--mtg-light-gray);
}

.loan-list-image {
    width: 45px;
    height: 63px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.loan-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loan-list-image .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-light-gray);
    color: #666;
}

.loan-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.loan-list-name {
    font-weight: 600;
    color: var(--mtg-white);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loan-list-meta {
    font-size: 0.8rem;
    color: #888;
}

.loan-list-actions {
    flex-shrink: 0;
}

/* Loan Card Display (grid card) */
.loan-card-display {
    background: var(--mtg-darker, #1a1a1a);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.loan-card-display:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.loan-card-display.borrowed {
    border: 2px solid #28a745;
}

.loan-card-display .card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 488 / 680;
    overflow: hidden;
}

.loan-card-display .card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loan-card-display .card-info {
    padding: 1rem;
}

.loan-card-display .card-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    color: var(--mtg-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loan-card-display .loan-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.loan-card-display .loan-qty-badge {
    background: var(--mtg-purple);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.loan-card-display .loan-to,
.loan-card-display .loan-from {
    font-size: 0.85rem;
    color: #888;
}

.loan-card-display .loan-since {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

.loan-card-display .card-actions {
    padding: 0 1rem 1rem;
}

/* Small no-results */
.no-results.small {
    padding: 2rem 1rem;
}

.no-results.small i {
    font-size: 2rem;
}

/* Navigation Badge */
.nav-link-with-badge {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Dropdown Badge */
.dropdown-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    background: #1a1a2e;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    color: #e0e0e0;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(107, 70, 193, 0.3);
    color: #d4af37;
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

.dropdown-divider {
    border-top-color: rgba(212, 175, 55, 0.2);
    margin: 0.25rem 0;
}

/* Pending Request Card (improved) */
.pending-request-card {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.pending-request-card:hover {
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.15);
    transform: translateY(-2px);
}

.pending-request-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 193, 7, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pending-request-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pending-request-avatar i {
    font-size: 3rem;
    color: #ffc107;
    opacity: 0.7;
}

.pending-request-info {
    flex: 1;
    min-width: 0;
}

.pending-request-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--mtg-white);
    margin: 0 0 0.25rem 0;
}

.pending-request-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.pending-request-meta i {
    color: #ffc107;
}

.pending-request-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.pending-request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

/* Sent Request Card */
.sent-request-card {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.sent-request-card:hover {
    border-color: rgba(23, 162, 184, 0.5);
}

.sent-request-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(23, 162, 184, 0.5);
}

.sent-request-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sent-request-avatar i {
    font-size: 2rem;
    color: #17a2b8;
    opacity: 0.7;
}

.sent-request-info {
    flex: 1;
    min-width: 0;
}

.sent-request-name {
    font-weight: 600;
    color: var(--mtg-white);
    margin: 0;
}

.sent-request-meta {
    font-size: 0.85rem;
    color: #888;
}

.sent-request-badge {
    display: inline-block;
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.sent-request-actions {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .pending-request-card,
    .sent-request-card {
        flex-direction: column;
        text-align: center;
    }

    .pending-request-actions,
    .sent-request-actions {
        flex-direction: row;
        width: 100%;
    }

    .pending-request-actions .btn,
    .sent-request-actions .btn {
        flex: 1;
    }
}

/* Friend Item */
.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.friend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.friend-info a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mtg-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-avatar i {
    font-size: 2rem;
    color: var(--mtg-white);
    opacity: 0.6;
}

.friend-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.friend-username {
    font-weight: 600;
    color: var(--mtg-white);
    font-size: 1rem;
}

.friend-stats {
    font-size: 0.85rem;
    color: #aaa;
}

.friend-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Friend Request/Offer Card */
.friend-offer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--mtg-gray);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    text-align: center;
}

.friend-offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background: var(--mtg-light-gray);
    color: inherit;
    text-decoration: none;
}

.friend-offer-card .friend-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
}

.friend-offer-card .friend-avatar i {
    font-size: 3rem;
}

.friend-offer-card .friend-name {
    font-weight: 600;
    color: var(--mtg-white);
    margin-bottom: 0.5rem;
}

.friend-offer-card .friend-action {
    font-size: 0.85rem;
    color: var(--mtg-gold);
}

.friend-offer-card .friend-action i {
    margin-right: 0.25rem;
}

/* User Search Results */
.user-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.user-result:last-child {
    margin-bottom: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--mtg-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 2rem;
    color: var(--mtg-white);
    opacity: 0.6;
}

.user-details .username {
    font-weight: 600;
    color: var(--mtg-white);
}

.user-details .user-stat {
    font-size: 0.85rem;
    color: #aaa;
}

/* Pending Request Item */
.pending-request {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.pending-request:last-child {
    margin-bottom: 0;
}

.request-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
}

/* Friend Collection View */
.collection-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--mtg-gray);
}

.collection-header .friend-avatar {
    width: 64px;
    height: 64px;
}

.collection-header .friend-avatar i {
    font-size: 3rem;
}

.collection-info h2 {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    margin: 0 0 0.25rem 0;
}

.collection-info .collection-stats {
    color: #aaa;
    font-size: 0.9rem;
}

/* Loan Items */
.loans-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loan-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    gap: 1rem;
}

.loan-card-image {
    width: 60px;
    height: 84px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.loan-card-image.small {
    width: 45px;
    height: 63px;
}

.loan-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loan-card-image .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-light-gray);
    color: #666;
}

.loan-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.loan-card-name {
    font-weight: 600;
    color: var(--mtg-white);
}

.loan-quantity {
    color: var(--mtg-gold);
    font-weight: 500;
}

.loan-type {
    font-size: 0.85rem;
    color: #aaa;
}

.loan-type.request {
    color: #ffc107;
}

.loan-type.offer {
    color: #28a745;
}

.loan-message {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.loan-date {
    font-size: 0.8rem;
    color: #666;
}

.loan-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Loan Cards Grid (for lent/borrowed detail pages) */
.loans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.loan-card {
    background: var(--mtg-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.loan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.loan-card.borrowed {
    border: 2px solid #28a745;
}

.loan-card-image-large {
    position: relative;
    width: 100%;
    aspect-ratio: 488 / 680;
    overflow: hidden;
}

.loan-card-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loan-card-image-large .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-light-gray);
    color: #666;
    font-size: 3rem;
}

.borrowed-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.loan-card-body {
    padding: 1rem;
}

.loan-card-title {
    font-weight: 600;
    color: var(--mtg-white);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.loan-card-details {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.loan-quantity-badge {
    background: var(--mtg-purple);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.loan-lender,
.loan-borrower {
    font-size: 0.85rem;
    color: #aaa;
}

.loan-lender i,
.loan-borrower i {
    margin-right: 0.25rem;
}

.loan-card-footer {
    padding: 0 1rem 1rem;
}

/* Offer Info */
.offer-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #7dd3fc;
}

.offer-info i {
    margin-right: 0.5rem;
}

/* Empty State */
.friends-section .empty-state,
.loans-section .empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.friends-section .empty-state.small,
.loans-section .empty-state.small {
    padding: 1.5rem 1rem;
}

.friends-section .empty-state i,
.loans-section .empty-state i {
    font-size: 3rem;
    color: var(--mtg-light-gray);
    margin-bottom: 1rem;
}

.friends-section .empty-state.small i,
.loans-section .empty-state.small i {
    font-size: 2rem;
}

.friends-section .empty-state p,
.loans-section .empty-state p {
    color: #888;
    margin-bottom: 1rem;
}

/* Card Loan Badge in Deck Editor */
.card-loan-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
}

.card-loan-badge.borrowed-indicator {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.card-loan-badge.lent-indicator {
    background: rgba(107, 70, 193, 0.9);
    color: white;
    top: auto;
    bottom: 0.5rem;
}

.availability-breakdown {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Borrowed card row in deck */
.deck-card-row.borrowed-card {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.deck-card-borrowed-badge {
    color: #28a745;
    margin-left: 0.5rem;
    font-size: 0.85rem;
}

/* Request Card Button */
.request-card-form {
    margin-top: 0.75rem;
}

.request-card-btn {
    width: 100%;
}

/* Friend Collection Cards */
.friend-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.friend-collection-card {
    background: var(--mtg-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.friend-collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.friend-collection-card .card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 488 / 680;
    overflow: hidden;
}

.friend-collection-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-collection-card .card-image .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-light-gray);
    color: #666;
    font-size: 2rem;
}

.friend-collection-card .card-body {
    padding: 0.75rem;
}

.friend-collection-card .card-name {
    font-weight: 600;
    color: var(--mtg-white);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-collection-card .card-quantity {
    font-size: 0.85rem;
    color: var(--mtg-gold);
}

/* Responsive */
@media (max-width: 768px) {
    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .friend-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .friend-info,
    .friend-info a {
        flex-direction: column;
    }

    .friend-actions {
        width: 100%;
        justify-content: center;
    }

    .loan-item {
        flex-direction: column;
        text-align: center;
    }

    .loan-actions {
        width: 100%;
        justify-content: center;
    }

    .loans-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ========================================
   OFFER MODE STYLES
   ======================================== */

/* Offer Mode Banner */
.offer-mode-banner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.offer-mode-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.offer-mode-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 1rem;
}

.offer-mode-info i {
    font-size: 1.25rem;
}

.offer-mode-info strong {
    color: #d4edda;
}

/* Offer Button on Cards */
.offer-card-btn {
    transition: all 0.2s ease;
}

.offer-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Offer Modal */
#offerModal .modal-content {
    background-color: #1a1a2e !important;
    border: 1px solid var(--mtg-gold);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

#offerModal .modal-body,
#offerModal .modal-header,
#offerModal .modal-footer {
    background-color: #1a1a2e;
}

#offerModal .modal-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--mtg-gold);
}

#offerModal .modal-header .btn-close {
    filter: invert(1);
}

#offerModal .modal-title {
    font-family: var(--font-heading);
}

#offerModal .modal-title i {
    color: #28a745;
}

#offerModal .modal-body {
    color: var(--mtg-white);
}

#offerModal .modal-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.offer-modal-info {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.offer-modal-info strong {
    color: var(--mtg-gold);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.quantity-selector .btn {
    padding: 0.375rem 0.75rem;
    flex-shrink: 0;
}

.quantity-selector input {
    text-align: center;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Form controls in modal */
#offerModal .form-label {
    color: var(--mtg-gold);
    font-weight: 500;
}

#offerModal .form-control,
#offerModal .form-select {
    background-color: var(--mtg-gray);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--mtg-white);
}

#offerModal .form-control:focus,
#offerModal .form-select:focus {
    background-color: var(--mtg-gray);
    border-color: var(--mtg-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    color: var(--mtg-white);
}

#offerModal .form-control::placeholder {
    color: #888;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .offer-mode-content {
        flex-direction: column;
        text-align: center;
    }
    
    .offer-mode-info {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Modal Backdrop Fix */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-backdrop.show {
    opacity: 1;
}

#offerModal.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ========================================
   COLLECTION IMPORT STYLES
   ======================================== */

/* Import Form Card */
.import-form-card,
.import-help-card {
    background: var(--mtg-gray);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.import-form-card .card-header,
.import-help-card .card-header {
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1rem 1.25rem;
}

.import-form-card .card-header h3,
.import-help-card .card-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    font-size: 1.1rem;
}

.import-form-card .card-header h3 i,
.import-help-card .card-header h3 i {
    margin-right: 0.5rem;
}

.import-form-card .card-body,
.import-help-card .card-body {
    padding: 1.5rem;
}

/* Import Textarea */
.import-textarea {
    background: var(--mtg-dark) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: var(--mtg-white) !important;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.import-textarea:focus {
    border-color: var(--mtg-gold) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

.import-textarea::placeholder {
    color: #666 !important;
}

/* Format Example */
.format-example {
    background: var(--mtg-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #8bc34a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    margin: 0;
}

/* Help Card Styling */
.import-help-card h5 {
    color: var(--mtg-gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.import-help-card ol,
.import-help-card ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
    color: #bbb;
}

.import-help-card li {
    margin-bottom: 0.25rem;
}

.import-help-card code {
    background: rgba(212, 175, 55, 0.2);
    color: var(--mtg-gold);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Result Stat Cards */
.result-stat-card {
    background: var(--mtg-gray);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-stat-card.success {
    border-color: rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, transparent 100%);
}

.result-stat-card.info {
    border-color: rgba(23, 162, 184, 0.3);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, transparent 100%);
}

.result-stat-card.warning {
    border-color: rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, transparent 100%);
}

.result-stat-card.danger {
    border-color: rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
}

.result-stat-card.muted {
    opacity: 0.6;
}

.result-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.result-stat-card.success .result-stat-icon {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.result-stat-card.info .result-stat-icon {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
}

.result-stat-card.warning .result-stat-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.result-stat-card.danger .result-stat-icon {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.result-stat-card.muted .result-stat-icon {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.result-stat-content h3 {
    margin: 0;
    font-size: 1.75rem;
    font-family: var(--font-heading);
    color: var(--mtg-white);
}

.result-stat-content p {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
}

/* Import Summary Table */
.import-summary {
    background: var(--mtg-gray);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.import-summary h4 {
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.import-summary h4 i {
    margin-right: 0.5rem;
}

.import-summary .table {
    margin: 0;
}

.import-summary .table thead th {
    border-color: rgba(212, 175, 55, 0.2);
    color: var(--mtg-gold);
    font-weight: 500;
}

.import-summary .table tbody td {
    border-color: rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Import Errors */
.import-errors h4 {
    color: var(--mtg-white);
    margin-bottom: 1rem;
}

.import-errors h4 i {
    margin-right: 0.5rem;
}

.import-errors .accordion-item {
    background: var(--mtg-gray);
    border: 1px solid rgba(220, 53, 69, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.import-errors .accordion-button {
    background: var(--mtg-gray);
    color: var(--mtg-white);
    box-shadow: none;
}

.import-errors .accordion-button:not(.collapsed) {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.import-errors .accordion-button::after {
    filter: invert(1);
}

.import-errors .accordion-body {
    background: var(--mtg-dark);
}

.error-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #bbb;
}

.error-list li {
    margin-bottom: 0.25rem;
}

.error-list strong {
    color: #dc3545;
}

/* Sets Not Found Badge Container */
.sets-not-found {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .result-stat-card {
        padding: 1rem;
    }

    .result-stat-content h3 {
        font-size: 1.5rem;
    }

    .import-textarea {
        font-size: 0.8rem;
    }
}

/* ============================
   Card Prices Section
   ============================ */

.card-detail-prices {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.card-detail-prices h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--mtg-gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading State */
.prices-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mtg-light-text);
    padding: 0.5rem;
    font-size: 0.85rem;
}

.prices-loading i {
    color: var(--mtg-gold);
    font-size: 1rem;
}

/* Prices Grid */
.prices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Price Category */
.price-category {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 0.75rem;
}

.price-category h4 {
    color: var(--mtg-white);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.price-category h4 i {
    color: var(--mtg-gold);
    font-size: 0.75rem;
}

/* Price Items */
.price-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.price-label {
    color: var(--mtg-light-text);
    font-size: 0.75rem;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: #4ade80;
}

/* Tix Price */
.price-tix {
    margin-top: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.price-tix .price-label {
    color: #60a5fa;
}

.price-tix .price-label i {
    margin-right: 0.35rem;
}

.price-tix .price-value {
    color: #60a5fa;
}

/* Disclaimer */
.prices-disclaimer {
    display: block;
    margin-top: 0.75rem;
    color: var(--mtg-light-text);
    font-size: 0.7rem;
    text-align: center;
    opacity: 0.7;
}

.prices-disclaimer i {
    margin-right: 0.2rem;
}

/* Error State */
.prices-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
    padding: 0.75rem;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
}

.prices-error i {
    font-size: 1rem;
}

/* ============================
   Wishlist Page Styles
   ============================ */

.wishlist-section {
    padding: 3rem 0;
    min-height: 60vh;
}

.wishlist-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wishlist-header .page-title {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.wishlist-header .page-subtitle {
    color: var(--mtg-light-text);
    margin-bottom: 1rem;
}

.wishlist-header .count-badge {
    background: var(--mtg-gray);
    color: var(--mtg-gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.empty-wishlist {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--mtg-gray);
    border-radius: 12px;
    margin-top: 2rem;
}

.empty-wishlist .empty-icon {
    font-size: 4rem;
    color: var(--mtg-light-text);
    margin-bottom: 1rem;
}

.empty-wishlist h3 {
    color: var(--mtg-white);
    margin-bottom: 0.5rem;
}

.empty-wishlist p {
    color: var(--mtg-light-text);
    margin-bottom: 1.5rem;
}

.priority-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.priority-tab {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.priority-tab:hover {
    border-color: var(--mtg-gold);
}

.priority-tab.active {
    background: var(--mtg-gold);
    color: var(--mtg-black);
    border-color: var(--mtg-gold);
}

.priority-tab .tab-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.wishlist-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wishlist-card-footer {
    background: var(--mtg-gray);
    padding: 0.75rem;
    border-radius: 0 0 10px 10px;
    margin-top: -10px;
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-top: none;
}

.wishlist-card-notes {
    background: var(--mtg-dark);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--mtg-light-text);
    margin-bottom: 0.5rem;
}

.wishlist-card-meta {
    font-size: 0.75rem;
    color: var(--mtg-light-text);
    margin-bottom: 0.5rem;
}

.wishlist-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wishlist-card-actions .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.priority-select {
    width: auto;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    background: var(--mtg-dark);
    border-color: var(--mtg-light-gray);
    color: var(--mtg-white);
}

@media (max-width: 768px) {
    .wishlist-header .page-title {
        font-size: 1.75rem;
    }

    .priority-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

/* ============================
   Profile Customize Styles
   ============================ */

.current-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--mtg-gold);
}

.no-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--mtg-light-text);
}

.text-gold {
    color: var(--mtg-gold);
    font-family: var(--font-heading);
}

.favorite-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.color-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.color-checkbox-item:has(input:checked) {
    border-color: var(--mtg-gold);
    background: rgba(212, 175, 55, 0.1);
}

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

.color-checkbox-item label {
    margin: 0;
    cursor: pointer;
    color: var(--mtg-white);
}

/* ============================
   Style Guide Page
   ============================ */

.style-guide-toc {
    background: var(--mtg-gray);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.style-guide-toc .section-title {
    color: var(--mtg-gold);
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
}

.toc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.toc-item {
    background: var(--mtg-dark);
    color: var(--mtg-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--mtg-light-gray);
    transition: all 0.3s ease;
}

.toc-item:hover {
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
    text-decoration: none;
}

.style-guide-panel {
    background: var(--mtg-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.style-guide-panel h4 {
    color: var(--mtg-gold);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.style-guide-divider {
    border-color: rgba(107, 70, 193, 0.2);
    margin: 1.5rem 0;
}

/* Color Swatches */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.color-swatch {
    text-align: center;
}

.swatch-color {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.swatch-gold { background: var(--mtg-gold); }
.swatch-purple { background: var(--mtg-purple); }
.swatch-dark { background: var(--mtg-black); }
.swatch-gray { background: var(--mtg-gray); }
.swatch-success { background: #28a745; }
.swatch-danger { background: #dc3545; }
.swatch-warning { background: #ffc107; }
.swatch-info { background: #17a2b8; }

.swatch-label {
    display: block;
    color: var(--mtg-white);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.color-swatch code {
    font-size: 0.75rem;
    color: var(--mtg-light-text);
}

/* Button & Badge Rows */
.button-row,
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Spacing List */
.spacing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spacing-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--mtg-light-text);
}

.spacing-list li:last-child {
    border-bottom: none;
}

.spacing-list code {
    background: var(--mtg-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--mtg-gold);
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .style-guide-panel {
        padding: 1.5rem;
    }

    .color-swatches {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Select2 Dark Theme Customization
   ======================================== */

/* Main container */
.select2-container--classic .select2-selection--single {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    height: auto;
    padding: 0.5rem 0.75rem;
}

.select2-container--classic .select2-selection--single:focus {
    border-color: var(--mtg-gold);
}

.select2-container--classic.select2-container--open .select2-selection--single {
    border-color: var(--mtg-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Selected text */
.select2-container--classic .select2-selection--single .select2-selection__rendered {
    color: var(--mtg-white);
    padding: 0;
    line-height: 1.5;
}

.select2-container--classic .select2-selection--single .select2-selection__placeholder {
    color: #888;
}

/* Arrow */
.select2-container--classic .select2-selection--single .select2-selection__arrow {
    background: transparent;
    border-left: none;
    height: 100%;
}

.select2-container--classic .select2-selection--single .select2-selection__arrow b {
    border-color: #888 transparent transparent transparent;
}

.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--mtg-gold) transparent;
}

/* Clear button */
.select2-container--classic .select2-selection--single .select2-selection__clear {
    color: #888;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.select2-container--classic .select2-selection--single .select2-selection__clear:hover {
    color: var(--mtg-gold);
}

/* Dropdown */
.select2-container--classic .select2-dropdown {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.select2-container--classic .select2-dropdown--above {
    border-radius: 6px 6px 0 0;
}

.select2-container--classic .select2-dropdown--below {
    border-radius: 0 0 6px 6px;
}

/* Search box */
.select2-container--classic .select2-search--dropdown {
    padding: 0.75rem;
    background: var(--mtg-black);
}

.select2-container--classic .select2-search--dropdown .select2-search__field {
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 4px;
    color: var(--mtg-white);
    padding: 0.5rem 0.75rem;
}

.select2-container--classic .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--mtg-gold);
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.25);
}

/* Results list */
.select2-container--classic .select2-results__options {
    max-height: 300px;
}

.select2-container--classic .select2-results__option {
    padding: 0.6rem 1rem;
    color: var(--mtg-white);
    transition: background 0.15s;
}

.select2-container--classic .select2-results__option--highlighted,
.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--mtg-purple);
    color: white;
}

.select2-container--classic .select2-results__option--selected {
    background: var(--mtg-gray);
    color: var(--mtg-gold);
}

.select2-container--classic .select2-results__option--selectable {
    cursor: pointer;
}

/* "No results" message */
.select2-container--classic .select2-results__message {
    color: #888;
    padding: 0.75rem 1rem;
}

/* Make sure dropdown is above other elements */
.select2-container--open .select2-dropdown {
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .select2-container--classic .select2-results__options {
        max-height: 200px;
    }
}

/* ========================================
   Private Messaging System Styles
   ======================================== */

/* Conversations List */
.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--mtg-gray);
    border-radius: 8px;
    text-decoration: none;
    color: var(--mtg-white);
    transition: background 0.2s, transform 0.2s;
}

.conversation-item:hover {
    background: var(--mtg-light-gray);
    color: var(--mtg-white);
    text-decoration: none;
    transform: translateX(4px);
}

.conversation-item.unread {
    background: linear-gradient(135deg, var(--mtg-gray) 0%, rgba(107, 70, 193, 0.2) 100%);
    border-left: 3px solid var(--mtg-purple);
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--mtg-dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--mtg-gold);
    flex-shrink: 0;
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

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

.conversation-name {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--mtg-purple);
    border-radius: 50%;
    display: inline-block;
}

.conversation-time {
    font-size: 0.8rem;
    color: #888;
    flex-shrink: 0;
}

.conversation-preview {
    font-size: 0.9rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-you {
    color: #888;
}

.conversation-badge {
    flex-shrink: 0;
}

.conversation-badge .badge {
    background: var(--mtg-purple);
    color: white;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
}

/* Conversation Header Section */
.conversation-header-section {
    background: var(--mtg-dark-gray);
    padding: 1rem 0;
    border-bottom: 1px solid var(--mtg-gray);
    position: sticky;
    top: 0;
    z-index: 100;
}

.conversation-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conversation-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--mtg-gold);
}

.conversation-user-details {
    display: flex;
    flex-direction: column;
}

.conversation-user-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--mtg-white);
}

.conversation-user-link {
    font-size: 0.85rem;
    color: var(--mtg-gold);
}

.conversation-user-link:hover {
    color: var(--mtg-light-gold);
}

/* Messages Thread */
.messages-thread-section {
    padding: 1.5rem 0;
    min-height: calc(100vh - 400px);
}

.messages-container {
    display: flex;
    flex-direction: column !important;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    background: var(--mtg-dark-gray);
    border-radius: 12px;
}

.message-date-divider {
    text-align: center;
    margin: 1rem 0;
}

.message-date-divider span {
    background: var(--mtg-gray);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #888;
}

.message-bubble-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 75%;
}

.message-bubble-wrapper.sent {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-bubble-wrapper.received {
    margin-right: auto;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
}

.message-bubble-wrapper.sent .message-bubble {
    background: var(--mtg-purple);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble-wrapper.received .message-bubble {
    background: var(--mtg-gray);
    color: var(--mtg-white);
    border-bottom-left-radius: 4px;
}

.message-content {
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.message-status {
    font-size: 0.7rem;
    opacity: 0.7;
}

.message-status .fa-check-double {
    color: #4fc3f7;
}

.message-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.message-bubble-wrapper:hover .message-actions {
    opacity: 1;
}

.message-actions .btn {
    padding: 0.25rem;
    font-size: 0.8rem;
}

.no-messages {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.no-messages i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Message Input */
.message-input-section {
    background: var(--mtg-dark-gray);
    padding: 1rem 0;
    border-top: 1px solid var(--mtg-gray);
    position: sticky;
    bottom: 0;
}

.message-form {
    width: 100%;
}

.message-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: var(--mtg-gray);
    border-radius: 24px;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
}

.message-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: var(--mtg-white) !important;
    resize: none;
    min-height: 24px;
    max-height: 150px;
    padding: 0.5rem 0;
    line-height: 1.4;
}

.message-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

.message-input::placeholder {
    color: #888;
}

.message-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Dropdown menu dark theme */
.dropdown-menu-dark {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-gray);
}

.dropdown-menu-dark .dropdown-item {
    color: var(--mtg-white);
}

.dropdown-menu-dark .dropdown-item:hover {
    background: var(--mtg-purple);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .message-bubble-wrapper {
        max-width: 90%;
    }

    .messages-container {
        max-height: 50vh;
    }

    .conversation-user-name {
        font-size: 1rem;
    }
}

/* Dropdown menu styling for dark theme */
.dropdown-menu {
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-menu .dropdown-item {
    color: var(--mtg-white);
    padding: 0.5rem 1rem;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: var(--mtg-purple);
    color: white;
}

.dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* ========================================
   Sample Hand Generator
   ======================================== */

.sample-hand-section {
    padding: 2rem 0;
    background: var(--mtg-dark-gray);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.sample-hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sample-hand-header .section-header {
    margin-bottom: 0;
}

.sample-hand-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sample-hand-display {
    min-height: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sample-hand-placeholder {
    color: var(--mtg-light-gray);
    font-size: 1.1rem;
    text-align: center;
}

.sample-hand-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--mtg-gold);
    opacity: 0.5;
}

.sample-hand-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sample-hand-card {
    width: 130px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.sample-hand-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    z-index: 10;
}

.sample-hand-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.sample-hand-card .card-placeholder {
    width: 130px;
    height: 182px;
    background: var(--mtg-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
    border-radius: 10px;
}

.sample-hand-card .card-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sample-hand-card .card-placeholder span {
    font-size: 0.7rem;
    text-align: center;
    padding: 0 0.5rem;
}

.sample-hand-info {
    margin-top: 1rem;
    color: var(--mtg-gold);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .sample-hand-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sample-hand-card {
        width: 100px;
    }

    .sample-hand-card .card-placeholder {
        width: 100px;
        height: 140px;
    }
}

/* ==============================================
   Goldfish Mode
   ============================================== */

.goldfish-section {
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.goldfish-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.goldfish-header .section-subtitle {
    color: var(--mtg-light-gray);
    margin: 0;
}

.goldfish-start {
    text-align: center;
    padding: 2rem;
}

.goldfish-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

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

.turn-label {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
    text-transform: uppercase;
}

.turn-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mtg-gold);
    font-family: var(--font-heading);
    line-height: 1;
}

.goldfish-stats {
    display: flex;
    gap: 1.5rem;
}

.goldfish-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--mtg-light-text);
}

.goldfish-stat i {
    color: var(--mtg-purple);
}

.goldfish-stat.mana-stat i {
    color: var(--mtg-gold);
}

.goldfish-stat span {
    font-weight: 700;
    color: var(--mtg-white);
}

.goldfish-actions {
    display: flex;
    gap: 0.5rem;
}

.goldfish-zone {
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.zone-title {
    color: var(--mtg-gold);
    font-size: 1rem;
    margin: 0 0 1rem 0;
    font-family: var(--font-heading);
}

.zone-title small {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
    font-weight: normal;
}

.zone-title i {
    margin-right: 0.5rem;
    color: var(--mtg-purple);
}

.zone-empty {
    color: var(--mtg-light-gray);
    text-align: center;
    font-style: italic;
    margin: 0;
    padding: 1rem;
}

.goldfish-hand,
.goldfish-battlefield {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 80px;
}

.goldfish-card {
    width: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.goldfish-card.playable:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.goldfish-card.unplayable {
    opacity: 0.6;
    cursor: not-allowed;
}

.goldfish-card.battlefield-card {
    cursor: default;
}

.goldfish-card.battlefield-card:hover {
    transform: none;
    box-shadow: none;
}

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

.goldfish-card .card-placeholder {
    width: 100px;
    height: 140px;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
    font-size: 0.7rem;
    text-align: center;
    padding: 0.5rem;
}

.card-type-badge {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--mtg-white);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.card-type-badge.land {
    background: rgba(139, 69, 19, 0.9);
}

@media (max-width: 768px) {
    .goldfish-status-bar {
        flex-direction: column;
        text-align: center;
    }

    .goldfish-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .goldfish-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .goldfish-card {
        width: 80px;
    }

    .goldfish-card .card-placeholder {
        width: 80px;
        height: 112px;
    }
}

/* ==============================================
   Basic Lands Section (Deck Editor)
   ============================================== */

.basic-lands-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--mtg-border-radius);
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.basic-lands-header {
    margin-bottom: 1rem;
}

.basic-lands-header h4 {
    color: var(--mtg-gold);
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-family: var(--mtg-font-heading);
}

.basic-lands-header small {
    color: var(--mtg-light-gray);
    font-size: 0.75rem;
}

.basic-lands-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.basic-land-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--mtg-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.basic-land-btn:hover {
    border-color: var(--mtg-gold);
    background: linear-gradient(145deg, rgba(40, 40, 55, 0.9), rgba(30, 30, 45, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.basic-land-btn:active {
    transform: translateY(0);
}

.basic-land-btn .land-mana {
    margin-bottom: 0.25rem;
}

.basic-land-btn .land-name {
    color: var(--mtg-text);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Specific land colors on hover */
.basic-land-btn[data-land="Plains"]:hover {
    border-color: #f8f6d8;
    box-shadow: 0 4px 12px rgba(248, 246, 216, 0.3);
}

.basic-land-btn[data-land="Island"]:hover {
    border-color: #0e68ab;
    box-shadow: 0 4px 12px rgba(14, 104, 171, 0.3);
}

.basic-land-btn[data-land="Swamp"]:hover {
    border-color: #150b00;
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.3);
}

.basic-land-btn[data-land="Mountain"]:hover {
    border-color: #d3202a;
    box-shadow: 0 4px 12px rgba(211, 32, 42, 0.3);
}

.basic-land-btn[data-land="Forest"]:hover {
    border-color: #00733e;
    box-shadow: 0 4px 12px rgba(0, 115, 62, 0.3);
}

/* Basic land items with suggestion badges */
.basic-land-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.land-suggestion {
    font-size: 0.75rem;
    font-weight: bold;
    min-height: 1.25rem;
}

.land-suggestion .suggestion-add {
    color: #28a745;
    background: rgba(40, 167, 69, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
}

.land-suggestion .suggestion-remove {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
}

.land-suggestion .suggestion-ok {
    color: #28a745;
}

/* Mana Analysis Section */
.mana-analysis {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.mana-analysis-header {
    margin-bottom: 0.75rem;
}

.mana-analysis-results {
    margin-top: 0.75rem;
}

/* Stacked mana bar (like GitHub language stats) */
.mana-stacked-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.mana-stacked-bar .mana-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.mana-segment.mana-white { background: #f8f6d8; }
.mana-segment.mana-blue { background: #0e68ab; }
.mana-segment.mana-black { background: #666; }
.mana-segment.mana-red { background: #d3202a; }
.mana-segment.mana-green { background: #00733e; }

/* Color legend under the bar */
.mana-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
}

.mana-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.mana-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mana-legend-dot.mana-white { background: #f8f6d8; }
.mana-legend-dot.mana-blue { background: #0e68ab; }
.mana-legend-dot.mana-black { background: #666; }
.mana-legend-dot.mana-red { background: #d3202a; }
.mana-legend-dot.mana-green { background: #00733e; }

.mana-legend-text {
    color: var(--mtg-light-gray);
}

.mana-legend-value {
    color: var(--mtg-gold);
    font-weight: 600;
}

.mana-summary {
    margin-top: 0.75rem;
    text-align: center;
    color: var(--mtg-light-gray);
}

.suggestion-summary {
    margin-top: 0.75rem;
    text-align: center;
}

@media (max-width: 576px) {
    .basic-lands-grid {
        justify-content: center;
    }

    .basic-land-btn {
        flex: 1;
        min-width: 55px;
        padding: 0.5rem;
    }

    .basic-land-btn .land-name {
        font-size: 0.6rem;
    }

    .mana-legend {
        gap: 0.35rem 0.75rem;
    }

    .mana-legend-item {
        font-size: 0.65rem;
    }
}

/* ==============================================
   Set Completion Tracker
   ============================================== */

/* Overview Stats */
.set-completion-overview {
    padding: 1rem 0;
}

/* Sort Controls */
.set-completion-controls {
    padding: 0 0 1rem 0;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-label {
    color: var(--mtg-light-gray);
    font-size: 0.9rem;
}

.results-count {
    color: var(--mtg-light-gray);
    font-size: 0.9rem;
}

/* Set Completion Grid */
.set-completion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.set-completion-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--mtg-border-radius);
    text-decoration: none;
    color: var(--mtg-text);
    transition: all 0.3s ease;
}

.set-completion-card:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    color: var(--mtg-text);
}

.set-completion-card.completed {
    border-color: var(--mtg-success);
    background: linear-gradient(145deg, rgba(40, 50, 40, 0.9), rgba(25, 35, 25, 0.9));
}

.set-completion-card .set-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.set-completion-card .set-icon img {
    max-width: 100%;
    max-height: 100%;
    filter: brightness(0) invert(1);
}

.set-completion-card .set-icon i {
    font-size: 2rem;
    color: var(--mtg-gold);
}

.set-completion-card .set-info {
    min-width: 0;
}

.set-completion-card .set-name {
    font-family: var(--mtg-font-heading);
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.set-completion-card .set-code {
    color: var(--mtg-light-gray);
    font-size: 0.75rem;
}

.set-completion-card .set-progress {
    text-align: right;
    min-width: 120px;
}

.set-completion-card .progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.set-completion-card .owned-count {
    font-size: 0.8rem;
    color: var(--mtg-light-gray);
}

.set-completion-card .completion-percent {
    font-weight: 600;
    font-size: 0.9rem;
}

.set-completion-card .completion-percent.complete {
    color: var(--mtg-success);
}

.set-completion-card .completion-percent.high {
    color: #4ade80;
}

.set-completion-card .completion-percent.medium {
    color: var(--mtg-gold);
}

.set-completion-card .progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.set-completion-card .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mtg-purple), var(--mtg-purple-light));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.set-completion-card .progress-fill.complete {
    background: linear-gradient(90deg, var(--mtg-success), #4ade80);
}

.set-completion-card .progress-fill.high {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.set-completion-card .progress-fill.medium {
    background: linear-gradient(90deg, var(--mtg-gold-dark), var(--mtg-gold));
}

.set-completion-card .missing-count {
    font-size: 0.7rem;
    color: var(--mtg-light-gray);
}

.set-completion-card .complete-badge {
    font-size: 0.7rem;
    color: var(--mtg-success);
}

/* Set Detail Page */
.set-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.set-detail-icon {
    width: 80px;
    height: 80px;
    filter: brightness(0) invert(1);
}

.set-code-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--mtg-purple);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.set-release-date {
    color: var(--mtg-light-gray);
    font-size: 0.85rem;
}

/* Completion Overview */
.set-detail-completion {
    padding: 2rem 0;
}

.completion-overview {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--mtg-border-radius);
    padding: 2rem;
}

.completion-main {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.completion-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid var(--mtg-purple);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.completion-circle.complete {
    border-color: var(--mtg-success);
}

.completion-circle .percentage {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--mtg-font-heading);
    color: var(--mtg-gold);
}

.completion-circle .label {
    font-size: 0.8rem;
    color: var(--mtg-light-gray);
}

.completion-stats {
    display: flex;
    gap: 2rem;
}

.completion-stats .stat-item {
    text-align: center;
}

.completion-stats .stat-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.completion-stats .stat-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--mtg-font-heading);
}

.completion-stats .stat-item .label {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
}

.progress-bar-large {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-large .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mtg-purple), var(--mtg-purple-light));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-bar-large .progress-fill.complete {
    background: linear-gradient(90deg, var(--mtg-success), #4ade80);
}

.progress-bar-large .progress-fill.high {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.progress-bar-large .progress-fill.medium {
    background: linear-gradient(90deg, var(--mtg-gold-dark), var(--mtg-gold));
}

/* Rarity Breakdown */
.set-detail-rarity {
    padding: 1rem 0 2rem;
}

.rarity-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.rarity-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--mtg-border-radius);
    padding: 1rem;
}

.rarity-item .rarity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rarity-item .rarity-name {
    font-weight: 600;
}

.rarity-item.rarity-common .rarity-name { color: #9ca3af; }
.rarity-item.rarity-uncommon .rarity-name { color: #94a3b8; }
.rarity-item.rarity-rare .rarity-name { color: var(--mtg-gold); }
.rarity-item.rarity-mythic .rarity-name { color: #f97316; }
.rarity-item.rarity-special .rarity-name { color: #a855f7; }
.rarity-item.rarity-bonus .rarity-name { color: #06b6d4; }

.rarity-item .rarity-count {
    font-size: 0.85rem;
    color: var(--mtg-light-gray);
}

.rarity-item .rarity-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.rarity-item .rarity-progress .progress-fill {
    height: 100%;
    border-radius: 3px;
}

.rarity-item.rarity-common .rarity-progress .progress-fill { background: #9ca3af; }
.rarity-item.rarity-uncommon .rarity-progress .progress-fill { background: #94a3b8; }
.rarity-item.rarity-rare .rarity-progress .progress-fill { background: var(--mtg-gold); }
.rarity-item.rarity-mythic .rarity-progress .progress-fill { background: #f97316; }
.rarity-item.rarity-special .rarity-progress .progress-fill { background: #a855f7; }
.rarity-item.rarity-bonus .rarity-progress .progress-fill { background: #06b6d4; }

.rarity-item .rarity-percent {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
}

/* View Controls */
.set-detail-controls {
    padding: 1rem 0;
}

.controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.rarity-filter .form-select {
    min-width: 200px;
}

/* Set Detail Cards Grid */
.set-detail-cards {
    padding: 1rem 0 3rem;
}

.set-detail-cards .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.set-detail-cards .card-item {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--mtg-border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.set-detail-cards .card-item:hover {
    border-color: var(--mtg-gold);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.set-detail-cards .card-item.missing {
    border-color: rgba(239, 68, 68, 0.3);
}

.set-detail-cards .card-item.missing:hover {
    border-color: rgba(239, 68, 68, 0.6);
}

.set-detail-cards .card-item a {
    text-decoration: none;
    color: var(--mtg-text);
}

.set-detail-cards .card-image-wrapper {
    position: relative;
    aspect-ratio: 488/680;
    padding-top: 0; /* Override generic .card-image-wrapper padding */
    overflow: hidden;
}

.set-detail-cards .card-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.set-detail-cards .quantity-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--mtg-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.set-detail-cards .missing-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.set-detail-cards .card-info {
    padding: 0.75rem;
}

.set-detail-cards .card-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.set-detail-cards .card-rarity {
    font-size: 0.7rem;
}

.set-detail-cards .add-form {
    padding: 0 0.75rem 0.75rem;
}

.set-detail-cards .add-form .btn {
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--mtg-border-radius);
}

.empty-state i {
    font-size: 4rem;
    color: var(--mtg-gold);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-family: var(--mtg-font-heading);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--mtg-light-gray);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .set-completion-grid {
        grid-template-columns: 1fr;
    }

    .set-completion-card {
        grid-template-columns: auto 1fr;
    }

    .set-completion-card .set-progress {
        grid-column: 1 / -1;
        text-align: left;
        min-width: auto;
    }

    .completion-main {
        flex-direction: column;
    }

    .completion-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .rarity-filter {
        width: 100%;
    }

    .rarity-filter .form-select {
        width: 100%;
    }

    .set-detail-cards .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Price Alerts for Wishlist
   ======================================== */

/* Deal Badge */
.wishlist-card-wrapper.has-deal {
    border: 2px solid var(--mtg-success) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--mtg-success);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Deal tab in filter */
.priority-tab.deal-tab {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--mtg-success);
}

.priority-tab.deal-tab:hover,
.priority-tab.deal-tab.active {
    background: var(--mtg-success);
    color: white;
}

.deal-count {
    background: var(--mtg-success) !important;
}

/* Price Info */
.wishlist-price-info {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mtg-gray);
}

.wishlist-price-info .current-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mtg-gold);
}

.wishlist-price-info .no-price {
    font-size: 0.875rem;
    color: var(--mtg-light-gray);
    font-style: italic;
}

/* Price Alert Controls */
.price-alert-controls {
    background: var(--mtg-dark-gray);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.price-alert-header {
    margin-bottom: 0.5rem;
}

.price-alert-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--mtg-text-light);
    cursor: pointer;
    margin: 0;
}

.price-alert-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--mtg-purple);
}

.price-alert-label i {
    color: var(--mtg-gold);
}

.price-alert-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.price-alert-input-group .input-prefix {
    color: var(--mtg-gold);
    font-weight: 600;
    font-size: 0.875rem;
}

.price-alert-input-group .target-price-input {
    flex: 1;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    color: var(--mtg-text-light);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    max-width: 80px;
}

.price-alert-input-group .target-price-input:focus {
    border-color: var(--mtg-purple);
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.25);
}

.price-alert-input-group .save-target-price {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Price Alert Enabled State */
.price-alert-controls:has(.price-alert-toggle:checked) {
    border: 1px solid var(--mtg-purple);
    background: rgba(107, 70, 193, 0.1);
}

/* Responsive */
@media (max-width: 576px) {
    .priority-tabs {
        flex-wrap: wrap;
    }
    
    .priority-tab {
        flex: 1 1 calc(50% - 0.5rem);
        font-size: 0.75rem;
    }
    
    .price-alert-controls {
        padding: 0.5rem;
    }
    
    .price-alert-label {
        font-size: 0.7rem;
    }
}

/* ========================================
   Hand Analysis (Mulligan Simulator Enhancement)
   ======================================== */

.hand-analysis {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.hand-analysis-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.analysis-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.analysis-stat i {
    color: var(--mtg-gold);
    font-size: 1.25rem;
}

.analysis-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mtg-text-light);
}

.analysis-stat .stat-label {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
    text-transform: uppercase;
}

/* Keep Score Bar */
.keep-score {
    position: relative;
    height: 32px;
    background: var(--mtg-gray);
    border-radius: 16px;
    overflow: hidden;
}

.keep-score-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 16px;
    transition: width 0.5s ease;
}

.keep-score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.keep-score.keep-good .keep-score-bar {
    background: linear-gradient(90deg, var(--mtg-success), #059669);
}

.keep-score.keep-good .keep-score-label {
    color: white;
}

.keep-score.keep-medium .keep-score-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.keep-score.keep-medium .keep-score-label {
    color: white;
}

.keep-score.keep-poor .keep-score-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.keep-score.keep-poor .keep-score-label {
    color: white;
}

/* Responsive */
@media (max-width: 576px) {
    .hand-analysis-stats {
        gap: 1rem;
    }

    .analysis-stat .stat-value {
        font-size: 1.25rem;
    }
}

/* ========================================
   Trade Finder
   ======================================== */

.trade-summary-section {
    padding: 2rem 0;
}

.trade-opportunities-section {
    padding: 2rem 0;
}

.trade-section {
    padding: 2rem 0;
    border-top: 1px solid var(--mtg-gray);
}

/* Trade Opportunity Card */
.trade-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trade-opportunity-card {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trade-friend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.trade-friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trade-friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trade-friend-avatar i {
    font-size: 1.5rem;
    color: var(--mtg-light-gray);
}

.trade-friend-name {
    margin: 0;
    font-size: 1.1rem;
    color: var(--mtg-text-light);
}

.trade-match-count {
    font-size: 0.875rem;
    color: var(--mtg-gold);
}

.trade-stats {
    display: flex;
    gap: 2rem;
    flex: 1;
}

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

.trade-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.trade-stat-label {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
    text-transform: uppercase;
}

.trade-actions {
    display: flex;
    gap: 0.5rem;
}

/* Trade Card Items */
.trade-card-item {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.trade-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.trade-card-image {
    width: 100%;
    aspect-ratio: 488/680;
    object-fit: cover;
    display: block;
}

.trade-card-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trade-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mtg-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-card-set {
    font-size: 0.75rem;
    color: var(--mtg-light-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-card-qty {
    font-size: 0.75rem;
    color: var(--mtg-gold);
}

/* Empty State Inline */
.empty-state-inline {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--mtg-light-gray);
}

.empty-state-inline i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .trade-opportunity-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .trade-stats {
        width: 100%;
        justify-content: space-around;
    }

    .trade-actions {
        width: 100%;
        justify-content: stretch;
    }

    .trade-actions .btn {
        flex: 1;
    }
}

/* ========================================
   Deck Sharing Controls
======================================== */
.deck-sharing-controls {
    background: var(--mtg-dark-gray);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--mtg-border);
}

.sharing-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--mtg-gray);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--mtg-light-gray);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--mtg-purple);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: var(--mtg-white);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.3);
}

.toggle-label {
    color: var(--mtg-text-light);
    font-weight: 500;
}

.share-link-section {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.share-link-input {
    flex: 1;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--mtg-text-light);
    font-size: 0.875rem;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--mtg-purple);
}

/* Share URL input in deck sharing */
.share-link-container .form-control,
.share-link-container input[type="text"] {
    background: var(--mtg-gray) !important;
    border-color: var(--mtg-border) !important;
    color: var(--mtg-white) !important;
    font-size: 0.875rem;
}

.share-link-container .form-control:focus,
.share-link-container input[type="text"]:focus {
    background: var(--mtg-dark-gray) !important;
    border-color: var(--mtg-purple) !important;
    color: var(--mtg-white) !important;
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.25) !important;
}

.share-link-container .form-control::placeholder {
    color: var(--mtg-light-gray) !important;
}

.copy-success {
    color: var(--mtg-gold);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.copy-success.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Shared Deck Page */
.shared-deck-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--mtg-purple), var(--mtg-dark-purple));
    color: var(--mtg-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.deck-meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.deck-author {
    color: var(--mtg-light-gray);
    font-size: 0.9rem;
}

.deck-author i {
    color: var(--mtg-gold);
    margin-right: 0.25rem;
}

.deck-description {
    color: var(--mtg-light-gray);
    font-style: italic;
    max-width: 600px;
}

.deck-section-panel {
    background: var(--mtg-dark-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--mtg-border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--mtg-text-light);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mtg-border);
}

.section-title i {
    color: var(--mtg-purple);
}

.card-count-badge {
    background: var(--mtg-purple);
    color: var(--mtg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

.deck-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.deck-card-item {
    background: var(--mtg-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.deck-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.deck-card-quantity {
    background: var(--mtg-purple);
    color: var(--mtg-white);
    font-weight: 700;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.875rem;
}

.deck-card-image img {
    width: 100%;
    aspect-ratio: 488/680;
    object-fit: cover;
    display: block;
}

.deck-card-info {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.deck-card-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--mtg-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.deck-card-mana {
    flex-shrink: 0;
}

.card-placeholder {
    width: 100%;
    aspect-ratio: 488/680;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtg-light-gray);
    font-size: 2rem;
}

.sideboard-panel {
    background: linear-gradient(135deg, var(--mtg-dark-gray), rgba(107, 70, 193, 0.1));
}

.sideboard-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sideboard-card-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--mtg-gray);
    border-radius: 6px;
}

.sideboard-card-qty {
    font-weight: 700;
    color: var(--mtg-gold);
    font-size: 0.875rem;
    min-width: 2rem;
}

.sideboard-card-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--mtg-text-light);
}

.sideboard-card-mana {
    flex-shrink: 0;
}

.cta-section {
    background: linear-gradient(135deg, var(--mtg-dark-purple), var(--mtg-purple));
    padding: 3rem 0;
    margin-top: 3rem;
}

.cta-section h3 {
    color: var(--mtg-white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.no-cards {
    color: var(--mtg-light-gray);
    text-align: center;
    padding: 2rem;
}

/* Responsive Deck Sharing */
@media (max-width: 768px) {
    .deck-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .share-link-section {
        flex-direction: column;
    }

    .deck-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========================================
   Deck Import Modal
======================================== */
.deck-import-box {
    max-width: 600px;
    width: 90%;
}

.deck-import-box textarea {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    background: var(--mtg-gray);
    border-color: var(--mtg-border);
    color: var(--mtg-white);
    resize: vertical;
}

.deck-import-box textarea:focus {
    background: var(--mtg-dark-gray);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.25);
}

.deck-import-box textarea::placeholder {
    color: var(--mtg-light-gray);
}

.import-format-help {
    background: rgba(107, 70, 193, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.75rem;
}

.import-results .alert {
    margin-bottom: 0;
}

/* ========================================
   Collection Statistics Row
======================================== */
.collection-stats-row {
    align-items: stretch;
}

.collection-stats-row > [class*="col"] {
    display: flex;
}

.collection-stats-row .stat-card {
    width: 100%;
    height: 100%;
}

/* ========================================
   Collection Value Stat Card
======================================== */
.stat-card-value {
    background: linear-gradient(135deg, var(--mtg-dark-gray), rgba(212, 175, 55, 0.15)) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

.stat-card-value:hover {
    border-color: var(--mtg-gold) !important;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2) !important;
}

.stat-card-value .stat-icon {
    color: var(--mtg-gold);
}

.stat-card-value .stat-value {
    color: var(--mtg-gold);
}

/* ========================================
   Advanced Card Search Filters
======================================== */
.advanced-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-filters-toggle .toggle-icon {
    transition: transform 0.2s;
    font-size: 0.75rem;
}

.advanced-filters-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.advanced-filters-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--mtg-border);
}

.color-filter-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-filter-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.color-filter-item input {
    display: none;
}

.color-filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mtg-gray);
    border: 2px solid transparent;
    transition: all 0.2s;
    opacity: 0.5;
}

.color-filter-item input:checked + .color-filter-icon {
    opacity: 1;
    border-color: var(--mtg-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.color-filter-item:hover .color-filter-icon {
    opacity: 0.8;
}

.cmc-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cmc-range-inputs input {
    width: 70px;
    text-align: center;
}

.cmc-separator {
    color: var(--mtg-light-gray);
    font-weight: 500;
}

/* ========================================
   Collection Quick Action Buttons
======================================== */
.collection-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--mtg-gold);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.quick-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Export Dropdown Menu */
.export-dropdown-menu {
    background: var(--mtg-dark-gray);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.export-dropdown-menu .dropdown-item {
    color: var(--mtg-white);
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.export-dropdown-menu .dropdown-item:hover,
.export-dropdown-menu .dropdown-item:focus {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mtg-gold);
}

.export-dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Responsive quick actions */
@media (max-width: 576px) {
    .collection-quick-actions {
        gap: 0.5rem;
    }

    .quick-action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   Discussion Board Styles
   ======================================== */

.discussion-list {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    overflow: hidden;
}

.discussion-item {
    display: flex;
    padding: 1.25rem;
    border-bottom: 1px solid var(--mtg-gray);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.discussion-item:hover {
    background: var(--mtg-gray);
    text-decoration: none;
    color: inherit;
}

.discussion-item:last-child {
    border-bottom: none;
}

.discussion-item.pinned {
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid var(--mtg-gold);
}

.discussion-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--mtg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--mtg-gold);
}

.discussion-main {
    flex-grow: 1;
    min-width: 0;
}

.discussion-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--mtg-white);
    margin-bottom: 0.25rem;
}

.discussion-meta {
    font-size: 0.85rem;
    color: #888;
}

.discussion-stats {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
}

.discussion-stats span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Topic Card */
.discussion-topic-card {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1.5rem;
}

.topic-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--mtg-gray);
}

.topic-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--mtg-white);
    margin-bottom: 0.5rem;
}

.topic-meta {
    font-size: 0.9rem;
    color: #888;
}

.topic-meta span {
    margin-right: 1rem;
}

.topic-content {
    line-height: 1.7;
    color: var(--mtg-white);
    margin-bottom: 1rem;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--mtg-gray);
}

.topic-stats {
    font-size: 0.85rem;
    color: #888;
}

.topic-stats span {
    margin-right: 1rem;
}

/* Reply Styles */
.reply-item {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

.reply-author {
    font-weight: 600;
    color: var(--mtg-gold);
}

.reply-time {
    font-size: 0.85rem;
    color: #888;
    margin-left: 0.75rem;
}

.reply-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.reply-deleted {
    opacity: 0.5;
    font-style: italic;
}

/* Reaction Styles */
.reaction-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--mtg-gray);
    border: 1px solid var(--mtg-light-gray);
    border-radius: 20px;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.reaction-btn:hover:not(:disabled) {
    background: var(--mtg-light-gray);
    border-color: var(--mtg-gold);
}

.reaction-btn.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
}

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

.reaction-btn .emoji {
    font-size: 1rem;
}

.reaction-btn .count {
    font-weight: 600;
}

/* Card Link Badge */
.discussion-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--mtg-gold);
}

.topic-linked-card .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    font-size: 1.25rem;
}

/* Reply Form */
.reply-form-section {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Text Gold Color */
.text-gold {
    color: var(--mtg-gold) !important;
}

/* Badge Gold Background */
.bg-gold {
    background-color: var(--mtg-gold) !important;
}

/* Responsive Discussion */
@media (max-width: 768px) {
    .discussion-item {
        flex-direction: column;
    }

    .discussion-avatar {
        margin-bottom: 0.75rem;
        margin-right: 0;
    }

    .discussion-stats {
        margin-left: 0;
        margin-top: 0.75rem;
    }

    .topic-footer {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Card Detail - Discussions Section */
.card-discussions {
    background: var(--mtg-dark-gray);
    border-radius: 8px;
    padding: 1.5rem;
}

.card-discussions h3 {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    font-size: 1.25rem;
    margin: 0;
}

.card-discussions h3 i {
    margin-right: 0.5rem;
}

.discussions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discussions-list .discussion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.discussions-list .discussion-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--mtg-purple);
    transform: translateX(4px);
}

.discussions-list .discussion-item-content {
    flex: 1;
}

.discussions-list .discussion-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mtg-light);
    margin: 0 0 0.5rem 0;
}

.discussions-list .discussion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--mtg-muted);
}

.discussions-list .discussion-meta i {
    margin-right: 0.25rem;
    opacity: 0.7;
}

.discussions-list .discussion-arrow {
    color: var(--mtg-muted);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.discussions-list .discussion-item:hover .discussion-arrow {
    color: var(--mtg-gold);
}

.no-discussions {
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .discussions-list .discussion-meta {
        gap: 0.5rem;
    }
    
    .discussions-list .discussion-meta span {
        font-size: 0.8rem;
    }
}

/* ========================================
   Instant Search / Autocomplete
   ======================================== */

/* Fix Bootstrap column overflow clipping the dropdown */
.col-12.col-md-6:has(.instant-search-wrapper) {
    overflow: visible !important;
}

.instant-search-wrapper {
    position: relative;
}

.instant-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-purple);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 1050;
    max-height: 450px;
    overflow-y: auto;
    margin-top: -1px;
}

.instant-search-results {
    padding: 0.5rem 0;
}

.instant-search-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.instant-search-item:last-child {
    border-bottom: none;
}

.instant-search-item:hover,
.instant-search-item.active {
    background: var(--mtg-purple);
}

.instant-search-image {
    flex-shrink: 0;
    width: 45px;
    height: 63px;
    margin-right: 1rem;
    border-radius: 4px;
    overflow: hidden;
    background: var(--mtg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.instant-search-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instant-search-no-image {
    color: var(--mtg-light-gray);
    font-size: 1.2rem;
}

.instant-search-quantity {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--mtg-purple);
    color: var(--mtg-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
}

.instant-search-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.instant-search-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--mtg-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.instant-search-name mark {
    background: var(--mtg-gold);
    color: var(--mtg-black);
    padding: 0 3px;
    border-radius: 2px;
    font-weight: 700;
}

.instant-search-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.instant-search-set {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.instant-search-rarity {
    text-transform: capitalize;
    font-weight: 600;
}

.instant-search-rarity.rarity-common {
    color: var(--rarity-common);
}

.instant-search-rarity.rarity-uncommon {
    color: var(--rarity-uncommon);
}

.instant-search-rarity.rarity-rare {
    color: var(--rarity-rare);
}

.instant-search-rarity.rarity-mythic {
    color: var(--rarity-mythic);
}

.instant-search-mana {
    opacity: 0.8;
}

.instant-search-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.instant-search-hint {
    color: var(--mtg-gold);
    font-size: 0.75rem;
}

/* Loading, Empty, Error states */
.instant-search-loading,
.instant-search-empty,
.instant-search-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.instant-search-loading i {
    color: var(--mtg-gold);
}

.instant-search-error i {
    color: var(--mtg-danger);
}

/* Custom scrollbar for dropdown */
.instant-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.instant-search-dropdown::-webkit-scrollbar-track {
    background: var(--mtg-dark-gray);
}

.instant-search-dropdown::-webkit-scrollbar-thumb {
    background: var(--mtg-purple);
    border-radius: 4px;
}

.instant-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--mtg-purple-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .instant-search-dropdown {
        max-height: 350px;
    }

    .instant-search-image {
        width: 35px;
        height: 49px;
        margin-right: 0.75rem;
    }

    .instant-search-name {
        font-size: 0.9rem;
    }

    .instant-search-meta {
        font-size: 0.75rem;
        gap: 0.35rem;
    }

    .instant-search-set {
        max-width: 100px;
    }

    .instant-search-footer {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   Price History Chart
   ======================================== */

.price-history-section {
    background: var(--mtg-dark-gray);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--mtg-light-gray);
}

.price-history-section h3 {
    font-family: var(--font-heading);
    color: var(--mtg-gold);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.price-history-section h3 i {
    margin-right: 0.5rem;
}

/* Chart Controls */
.price-chart-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.price-chart-range-buttons,
.price-chart-currency-buttons {
    display: flex;
    gap: 0.25rem;
}

.price-chart-controls .btn {
    background: var(--mtg-gray);
    border-color: var(--mtg-light-gray);
    color: var(--mtg-white);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.price-chart-controls .btn:hover {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
}

.price-chart-controls .btn.active {
    background: var(--mtg-purple);
    border-color: var(--mtg-purple);
    color: var(--mtg-white);
}

.price-chart-separator {
    color: var(--mtg-light-gray);
    margin: 0 0.25rem;
}

.price-chart-foil-toggle {
    display: flex;
    align-items: center;
}

.price-chart-foil-toggle .form-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mtg-white);
    font-size: 0.85rem;
    cursor: pointer;
}

.price-chart-foil-toggle .form-check-input {
    margin-top: 0;
}

/* Chart Container */
.price-chart-container {
    height: 300px;
    margin-top: 1rem;
}

.price-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Loading State */
.price-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--mtg-gold);
    font-size: 1rem;
}

.price-chart-loading i {
    font-size: 1.5rem;
}

/* No Data State */
.price-chart-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.price-chart-no-data i {
    font-size: 3rem;
    color: var(--mtg-light-gray);
}

.price-chart-no-data p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .price-chart-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-chart-separator {
        display: none;
    }

    .price-chart-container {
        height: 250px;
    }

    .price-chart-foil-toggle {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .price-chart-controls .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .price-chart-container {
        height: 200px;
    }
}

/* ========================================
   Deck Editor Search Loading
   ======================================== */

.cards-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--mtg-gold);
    font-size: 1rem;
}

.cards-loading i {
    font-size: 1.5rem;
}

.deck-search-form {
    margin-bottom: 0.5rem;
}

.deck-search-form .input-group {
    flex-wrap: nowrap;
}

#deck-search-clear {
    border-left: none;
}

/* ========================================
   News Section
   ======================================== */

/* News source filter buttons */
.news-source-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-source-filters .btn {
    transition: all 0.2s ease;
}

.news-source-filters .btn-outline-secondary {
    color: var(--mtg-white);
    border-color: var(--mtg-light-gray);
    background: transparent;
}

.news-source-filters .btn-outline-secondary:hover {
    background: var(--mtg-gray);
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
}

/* News card styling */
.news-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--mtg-dark-gray);
    border: 1px solid var(--mtg-gray);
    border-radius: 8px;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--mtg-gold);
}

.news-card-image {
    height: 180px;
    object-fit: cover;
    background: var(--mtg-gray);
}

.news-card-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mtg-gray);
    color: var(--mtg-light-gray);
    font-size: 3rem;
}

.news-card .card-body {
    background: var(--mtg-dark-gray);
}

.news-card .card-title {
    color: var(--mtg-white);
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-text {
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-footer {
    background: var(--mtg-black);
    border-top: 1px solid var(--mtg-gray);
    padding: 0.75rem 1rem;
}

.news-source-badge {
    font-size: 0.75rem;
    color: var(--mtg-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.news-source-badge i {
    margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-card-image,
    .news-card-placeholder {
        height: 150px;
    }

    .news-source-filters {
        justify-content: center;
    }
}
