/* ============================================
   BAG TAG DETAIL - MYTHICAL ARTIFACT REDESIGN
   Theme-aware design where league colors are the
   magical energy emanating from the collectible
   ============================================ */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Base palette - dark mystical foundation */
    --artifact-bg-deep: #0a0a0f;
    --artifact-bg-mid: #12121a;
    --artifact-bg-surface: #1a1a24;
    --artifact-bg-elevated: #222230;

    /* Text hierarchy */
    --artifact-text-primary: #f0f0f5;
    --artifact-text-secondary: rgba(240, 240, 245, 0.7);
    --artifact-text-muted: rgba(240, 240, 245, 0.5);

    /* Borders and dividers */
    --artifact-border: rgba(255, 255, 255, 0.08);
    --artifact-border-glow: rgba(255, 255, 255, 0.15);

    /* Animation timing */
    --artifact-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --artifact-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
}

/* ===== PAGE FOUNDATION ===== */
.artifact-page {
    --theme-glow: var(--league-primary, #6366f1);
    --theme-glow-rgb: var(--league-primary-rgb, 99, 102, 241);
    --theme-accent: var(--league-accent, #f59e0b);

    min-height: 100vh;
    background: var(--artifact-bg-deep);
    position: relative;
    overflow-x: hidden;
}

/* Ambient background effect */
.artifact-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.08), transparent),
        radial-gradient(ellipse 40% 30% at 10% 80%, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Particle container */
.artifact-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.artifact-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--theme-glow);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite;
    box-shadow: 0 0 6px var(--theme-glow), 0 0 12px var(--theme-glow);
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* ===== MAIN CONTENT WRAPPER ===== */
.artifact-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== BREADCRUMB - MYSTICAL PATH ===== */
.artifact-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.artifact-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--artifact-text-muted);
    text-decoration: none;
    transition: color 0.3s var(--artifact-ease);
}

.artifact-breadcrumb-item:hover {
    color: var(--theme-glow);
}

.artifact-breadcrumb-item.active {
    color: var(--artifact-text-primary);
}

.artifact-breadcrumb-separator {
    color: var(--artifact-text-muted);
    opacity: 0.5;
}

/* ===== HERO SECTION - THE ARTIFACT ===== */
.artifact-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

/* Tag number badge - floating rune */
.artifact-rune-badge {
    position: absolute;
    top: -20px;
    right: calc(50% - 280px);
    z-index: 10;

    background: linear-gradient(135deg, var(--artifact-bg-elevated), var(--artifact-bg-surface));
    border: 2px solid var(--theme-glow);
    border-radius: 50%;
    width: 64px;
    height: 64px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-family: 'Karla', system-ui, sans-serif;
    font-weight: 700;
    color: var(--theme-glow);

    box-shadow:
        0 0 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.4),
        0 0 40px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2),
        inset 0 0 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1);

    animation: runeGlow 3s ease-in-out infinite;
}

.artifact-rune-badge .rune-symbol {
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

.artifact-rune-badge .rune-number {
    font-size: 1.5rem;
    line-height: 1;
}

@keyframes runeGlow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.4),
            0 0 40px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2),
            inset 0 0 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.6),
            0 0 60px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3),
            inset 0 0 30px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.15);
    }
}

/* The artifact display platform */
.artifact-platform {
    position: relative;
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    width: 100%;
    max-width: 600px;
}

/* Override collectible card sizing for detail page - make it larger */
.artifact-platform .bag-tag-flip-wrapper {
    --card-max-width-landscape: 600px;
    --card-max-width-portrait: 450px;
    max-width: 100%;
}

.artifact-platform .bag-tag-collectible-container {
    max-width: 100%;
}

/* ===== BACK SIDE OVERRIDES - FLEXBOX RESPONSIVE ===== */
.artifact-platform .bag-tag-back {
    --card-frame-width: 10px;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Header - fixed size, doesn't shrink */
.artifact-platform .bag-tag-back .bag-tag-back-header {
    flex: 0 0 auto !important;
    padding: 4% 5% !important;
}

.artifact-platform .bag-tag-back .league-name {
    font-size: clamp(1rem, 4vw, 1.625rem) !important;
    letter-spacing: 0.5px !important;
}

.artifact-platform .bag-tag-back .league-dates {
    font-size: clamp(0.75rem, 2.5vw, 1rem) !important;
    margin-top: 0.5em !important;
}

/* Stats section - can shrink */
.artifact-platform .bag-tag-back .bag-tag-back-stats {
    flex: 0 1 auto !important;
    padding: 3% 5% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.artifact-platform .bag-tag-back .player-rating-section {
    padding: 4% 8% !important;
    border-radius: 12px !important;
}

.artifact-platform .bag-tag-back .rating-label {
    font-size: clamp(0.625rem, 2vw, 1rem) !important;
    letter-spacing: 2px !important;
    margin-bottom: 0.5em !important;
}

.artifact-platform .bag-tag-back .rating-value {
    font-size: clamp(2.5rem, 12vw, 5rem) !important;
    line-height: 1 !important;
}

/* Center content / logos section - grows to fill space */
.artifact-platform .bag-tag-back .bag-tag-back-center-content {
    flex: 1 1 auto !important;
    padding: 3% 5% !important;
    gap: 3% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.artifact-platform .bag-tag-back .event-image-showcase {
    padding: 3% !important;
    border-radius: 12px !important;
    flex: 0 1 auto !important;
    max-height: 40% !important;
}

.artifact-platform .bag-tag-back .event-image-large {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Logos - flex row that wraps */
.artifact-platform .bag-tag-back .logos-container {
    flex: 0 0 auto !important;
    gap: 3% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
}

.artifact-platform .bag-tag-back .brand-logo-container,
.artifact-platform .bag-tag-back .disc-shop-logo-container {
    padding: 3% 5% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    flex: 0 1 auto !important;
}

.artifact-platform .bag-tag-back .brand-logo,
.artifact-platform .bag-tag-back .disc-shop-logo {
    height: clamp(28px, 8vw, 56px) !important;
    max-width: clamp(80px, 25vw, 200px) !important;
    width: auto !important;
    filter: none !important;
    opacity: 1 !important;
}

/* Message section - can shrink */
.artifact-platform .bag-tag-back .bag-tag-back-message {
    flex: 1 1 auto !important;
    padding: 4% !important;
    margin: 2% !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.artifact-platform .bag-tag-back .back-message {
    font-size: clamp(0.875rem, 3vw, 1.125rem) !important;
    line-height: 1.5 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.artifact-platform .bag-tag-back .message-date {
    font-size: clamp(0.625rem, 2vw, 0.75rem) !important;
    margin-top: 0.75em !important;
}

/* ===== COLLAPSIBLE DRAWER ===== */
.artifact-drawer {
    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.artifact-drawer-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.3s var(--artifact-ease);
}

.artifact-drawer-toggle:hover {
    background: var(--artifact-bg-elevated);
}

.artifact-drawer-toggle-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.artifact-drawer-toggle-content > i:first-child {
    font-size: 1.25rem;
}

.artifact-drawer-title {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--artifact-text-primary);
}

.artifact-drawer-subtitle {
    font-size: 0.8rem;
    color: var(--artifact-text-muted);
    margin-left: var(--space-sm);
}

.artifact-drawer-icon {
    color: var(--theme-glow);
    font-size: 0.875rem;
    transition: transform 0.3s var(--artifact-ease);
}

.artifact-drawer-toggle[aria-expanded="true"] .artifact-drawer-icon {
    transform: rotate(180deg);
}

.artifact-drawer-content {
    padding: var(--space-lg);
    border-top: 1px solid var(--artifact-border);
}

/* Mobile adjustments for drawer */
@media (max-width: 576px) {
    .artifact-drawer-toggle {
        padding: var(--space-md) var(--space-lg);
    }

    .artifact-drawer-toggle-content {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .artifact-drawer-subtitle {
        width: 100%;
        margin-left: calc(1.25rem + var(--space-md));
        margin-top: 2px;
    }

    .artifact-drawer-title {
        font-size: 1rem;
    }

    .artifact-drawer-content {
        padding: var(--space-md);
    }
}

/* Glowing pedestal effect */
.artifact-platform::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--theme-glow), transparent);
    border-radius: 2px;
    filter: blur(2px);
}

.artifact-platform::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3), transparent);
    filter: blur(20px);
}

/* Tag wrapper enhancements */
.artifact-tag-wrapper {
    position: relative;
    transition: transform 0.5s var(--artifact-ease);
}

.artifact-tag-wrapper:hover {
    transform: translateY(-8px);
}

/* Aura effect behind the tag */
.artifact-tag-wrapper::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2), transparent 70%);
    border-radius: 24px;
    filter: blur(20px);
    z-index: -1;
    opacity: 0.8;
    animation: auraBreath 4s ease-in-out infinite;
}

@keyframes auraBreath {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Control buttons */
.artifact-controls {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-lg);
}

.artifact-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);

    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 999px;

    color: var(--artifact-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;

    cursor: pointer;
    transition: all 0.3s var(--artifact-ease);
}

.artifact-btn:hover {
    background: var(--artifact-bg-elevated);
    border-color: var(--theme-glow);
    color: var(--theme-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2);
}

.artifact-btn.active {
    background: var(--theme-glow);
    border-color: var(--theme-glow);
    color: var(--artifact-bg-deep);
}

.artifact-btn-primary {
    background: linear-gradient(135deg, var(--theme-glow), color-mix(in srgb, var(--theme-glow) 80%, black));
    border-color: var(--theme-glow);
    color: white;
}

.artifact-btn-primary:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-glow) 90%, white), var(--theme-glow));
    color: white;
    box-shadow: 0 4px 30px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.4);
}

/* ===== CURRENT HOLDER - CHAMPION CARD ===== */
.artifact-champion {
    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-2xl);

    position: relative;
}

/* Top accent bar with theme color */
.artifact-champion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-glow), var(--theme-accent, var(--theme-glow)));
}

.artifact-champion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--artifact-border);
}

.artifact-champion-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;

    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--artifact-text-primary);
}

.artifact-champion-title i {
    color: var(--theme-accent, #f59e0b);
}

.artifact-champion-tag {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);

    background: rgba(var(--theme-glow-rgb, 99, 102, 241), 0.15);
    border: 1px solid rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3);
    border-radius: 999px;

    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-glow);
}

.artifact-champion-body {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-lg);
    align-items: center;
}

.artifact-champion-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;

    border: 3px solid var(--theme-glow);
    box-shadow: 0 0 20px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3);

    transition: transform 0.3s var(--artifact-ease);
}

.artifact-champion-avatar:hover {
    transform: scale(1.05) rotate(3deg);
}

.artifact-champion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artifact-champion-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, var(--artifact-bg-elevated), var(--artifact-bg-surface));
    color: var(--theme-glow);
    font-size: 2.5rem;
    font-weight: 700;
}

.artifact-champion-info {
    flex: 1;
}

.artifact-champion-name {
    margin: 0 0 var(--space-md) 0;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.artifact-champion-name a {
    color: var(--artifact-text-primary);
    text-decoration: none;
    transition: color 0.3s var(--artifact-ease);
}

.artifact-champion-name a:hover {
    color: var(--theme-glow);
}

.artifact-champion-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.artifact-stat {
    background: var(--artifact-bg-mid);
    border: 1px solid var(--artifact-border);
    border-radius: 8px;
    padding: var(--space-sm) var(--space-md);
    text-align: center;

    transition: all 0.3s var(--artifact-ease);
}

.artifact-stat:hover {
    border-color: var(--theme-glow);
    transform: translateY(-2px);
}

.artifact-stat-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--artifact-text-muted);
    margin-bottom: var(--space-xs);
}

.artifact-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-glow);
}

/* ===== FATE ASPECTS - CHARACTER SHEET ===== */
.artifact-aspects {
    margin-bottom: var(--space-2xl);
}

.artifact-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.artifact-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;

    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--artifact-text-primary);
}

.artifact-section-title i {
    color: var(--theme-glow);
}

.artifact-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--artifact-border), transparent);
}

/* High Concept - Primary Aspect */
.artifact-high-concept {
    position: relative;
    background: linear-gradient(135deg, var(--artifact-bg-surface), var(--artifact-bg-elevated));
    border: 1px solid var(--theme-glow);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);

    box-shadow:
        0 0 30px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    overflow: hidden;
}

/* Decorative corner runes */
.artifact-high-concept::before,
.artifact-high-concept::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3);
    pointer-events: none;
}

.artifact-high-concept::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-radius: 16px 0 0 0;
}

.artifact-high-concept::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 16px 0;
}

.artifact-aspect-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);

    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--theme-glow);
}

.artifact-high-concept-text {
    margin: 0;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.4;
    color: var(--artifact-text-primary);
    text-align: center;
}

/* Trouble - Warning Aspect */
.artifact-trouble {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);

    position: relative;
    overflow: hidden;
}

/* Warning stripes */
.artifact-trouble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 10px,
        rgba(239, 68, 68, 0.03) 10px,
        rgba(239, 68, 68, 0.03) 20px
    );
    pointer-events: none;
}

.artifact-trouble .artifact-aspect-label {
    color: #ef4444;
}

.artifact-trouble-text {
    position: relative;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.5;
    color: var(--artifact-text-primary);
    text-align: center;
}

/* Supporting Aspects - Ability Tags */
.artifact-supporting {
    margin-bottom: var(--space-lg);
}

.artifact-supporting .artifact-aspect-label {
    margin-bottom: var(--space-md);
}

.artifact-aspect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.artifact-aspect-tag {
    padding: var(--space-sm) var(--space-lg);

    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 500;
    color: var(--artifact-text-secondary);

    transition: all 0.3s var(--artifact-ease);
    cursor: default;
}

.artifact-aspect-tag:hover {
    border-color: var(--theme-glow);
    color: var(--theme-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2);
}

/* Aspect Loading State */
.artifact-aspects-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);

    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 16px;
}

.artifact-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--artifact-border);
    border-top-color: var(--theme-glow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-md);
}

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

.artifact-loading-text {
    color: var(--artifact-text-muted);
    font-style: italic;
}

/* ===== LORE SECTION - ANCIENT KNOWLEDGE ===== */
.artifact-lore {
    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.artifact-lore-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);

    background: transparent;
    border: none;
    cursor: pointer;

    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--artifact-text-primary);

    transition: background 0.3s var(--artifact-ease);
}

.artifact-lore-toggle:hover {
    background: var(--artifact-bg-elevated);
}

.artifact-lore-toggle-icon {
    color: var(--theme-glow);
    transition: transform 0.3s var(--artifact-ease);
}

.artifact-lore-toggle[aria-expanded="true"] .artifact-lore-toggle-icon {
    transform: rotate(180deg);
}

/* Lore tabs */
.artifact-lore-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: 0 var(--space-lg);
    border-bottom: 1px solid var(--artifact-border);
}

.artifact-lore-tab {
    padding: var(--space-md) var(--space-lg);

    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;

    font-size: 0.875rem;
    font-weight: 500;
    color: var(--artifact-text-muted);

    cursor: pointer;
    transition: all 0.3s var(--artifact-ease);
}

.artifact-lore-tab:hover {
    color: var(--artifact-text-secondary);
}

.artifact-lore-tab.active {
    color: var(--theme-glow);
    border-bottom-color: var(--theme-glow);
}

.artifact-lore-content {
    padding: var(--space-lg);
}

.artifact-lore-text {
    color: var(--artifact-text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.artifact-lore-text p {
    margin-bottom: var(--space-md);
}

.artifact-lore-text p:last-child {
    margin-bottom: 0;
}

/* ===== TAG DETAILS - INFO GRID ===== */
.artifact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.artifact-detail-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);

    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 12px;

    transition: all 0.3s var(--artifact-ease);
}

.artifact-detail-card:hover {
    border-color: var(--theme-glow);
    transform: translateY(-2px);
}

.artifact-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;

    background: rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1);
    border-radius: 10px;

    color: var(--theme-glow);
    font-size: 1.25rem;
}

.artifact-detail-content {
    flex: 1;
    min-width: 0;
}

.artifact-detail-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--artifact-text-muted);
    margin-bottom: var(--space-xs);
}

.artifact-detail-value {
    display: block;
    font-weight: 600;
    color: var(--artifact-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artifact-detail-value a {
    color: var(--theme-glow);
    text-decoration: none;
}

.artifact-detail-value a:hover {
    text-decoration: underline;
}

/* ===== HISTORY - QUEST LOG ===== */
.artifact-history {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.artifact-history-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Timeline container */
.artifact-timeline {
    position: relative;
    padding-left: var(--space-xl);
}

/* Vertical timeline line */
.artifact-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--theme-glow), var(--artifact-border));
}

/* Timeline entry */
.artifact-timeline-entry {
    position: relative;
    padding-bottom: var(--space-lg);
}

.artifact-timeline-entry:last-child {
    padding-bottom: 0;
}

/* Timeline dot */
.artifact-timeline-entry::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-xl) + 4px);
    top: 6px;
    width: 10px;
    height: 10px;

    background: var(--theme-glow);
    border-radius: 50%;

    box-shadow: 0 0 10px var(--theme-glow);
}

.artifact-timeline-entry.origin::before {
    width: 14px;
    height: 14px;
    left: calc(-1 * var(--space-xl) + 2px);
    background: var(--theme-accent, #f59e0b);
    box-shadow: 0 0 15px var(--theme-accent, #f59e0b);
}

.artifact-timeline-card {
    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 12px;
    padding: var(--space-lg);

    transition: all 0.3s var(--artifact-ease);
}

.artifact-timeline-card:hover {
    border-color: rgba(var(--theme-glow-rgb, 99, 102, 241), 0.3);
    transform: translateX(4px);
}

.artifact-timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.artifact-timeline-player {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.artifact-timeline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--artifact-border);
}

.artifact-timeline-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artifact-timeline-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--artifact-bg-elevated);
    color: var(--artifact-text-muted);
    font-weight: 600;
}

.artifact-timeline-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.artifact-timeline-player-name {
    font-weight: 600;
    color: var(--artifact-text-primary);
}

.artifact-timeline-player-stats {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--artifact-text-muted);
}

.artifact-timeline-player-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.artifact-timeline-date {
    font-size: 0.75rem;
    color: var(--artifact-text-muted);
    white-space: nowrap;
}

.artifact-timeline-content {
    color: var(--artifact-text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.artifact-timeline-title {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-accent, #f59e0b);
    margin-bottom: var(--space-sm);
}

/* ===== PHYSICAL TAG SECTION ===== */
.artifact-physical {
    position: relative;
    background: linear-gradient(135deg, var(--artifact-bg-elevated), var(--artifact-bg-surface));
    border: 1px solid var(--artifact-border);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);

    overflow: hidden;
}

/* Decorative background pattern */
.artifact-physical::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1), transparent);
    pointer-events: none;
}

.artifact-physical-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    position: relative;
}

.artifact-physical-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;

    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--artifact-text-primary);
}

.artifact-physical-title i {
    color: var(--theme-glow);
}

.artifact-purchased-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);

    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.artifact-status-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);

    background: rgba(var(--theme-glow-rgb, 99, 102, 241), 0.1);
    border: 1px solid rgba(var(--theme-glow-rgb, 99, 102, 241), 0.2);
    border-radius: 12px;

    color: var(--artifact-text-secondary);
    position: relative;
    margin-bottom: var(--space-lg);
}

.artifact-status-badge i {
    color: var(--theme-glow);
    font-size: 1.25rem;
}

.artifact-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.artifact-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);

    background: var(--artifact-bg-mid);
    border: 1px solid var(--artifact-border);
    border-radius: 12px;

    text-align: center;
    transition: all 0.3s var(--artifact-ease);
}

.artifact-feature:hover {
    border-color: var(--theme-glow);
    transform: translateY(-4px);
}

.artifact-feature i {
    font-size: 1.5rem;
    color: var(--theme-glow);
}

.artifact-feature span {
    font-size: 0.875rem;
    color: var(--artifact-text-secondary);
}

/* ===== ENTRANCE ANIMATIONS ===== */
.artifact-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--artifact-ease), transform 0.6s var(--artifact-ease);
}

.artifact-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.artifact-fade-up:nth-child(1) { transition-delay: 0s; }
.artifact-fade-up:nth-child(2) { transition-delay: 0.1s; }
.artifact-fade-up:nth-child(3) { transition-delay: 0.2s; }
.artifact-fade-up:nth-child(4) { transition-delay: 0.3s; }
.artifact-fade-up:nth-child(5) { transition-delay: 0.4s; }
.artifact-fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ===== HOW IT WORKS PANEL ===== */
.artifact-explanation {
    background: var(--artifact-bg-surface);
    border: 1px solid var(--artifact-border);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .artifact-content {
        padding: var(--space-md);
    }

    .artifact-rune-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: var(--space-md);
    }

    .artifact-champion-body {
        flex-direction: column;
        text-align: center;
    }

    .artifact-champion-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .artifact-champion-stats .artifact-stat:nth-child(3) {
        grid-column: 1 / -1;
    }

    .artifact-high-concept-text {
        font-size: 1.25rem;
    }

    .artifact-trouble-text {
        font-size: 1rem;
    }

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

    .artifact-timeline {
        padding-left: var(--space-lg);
    }

    .artifact-timeline::before {
        left: 6px;
    }

    .artifact-timeline-entry::before {
        left: calc(-1 * var(--space-lg) + 2px);
        width: 8px;
        height: 8px;
    }

    .artifact-timeline-entry.origin::before {
        width: 12px;
        height: 12px;
        left: calc(-1 * var(--space-lg));
    }

    .artifact-timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .artifact-controls {
        flex-direction: column;
        width: 100%;
    }

    .artifact-btn {
        width: 100%;
        justify-content: center;
    }

    .artifact-champion-stats {
        grid-template-columns: 1fr;
    }

    .artifact-champion-stats .artifact-stat:nth-child(3) {
        grid-column: auto;
    }

    .artifact-details {
        grid-template-columns: 1fr;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .artifact-particle,
    .artifact-rune-badge,
    .artifact-tag-wrapper::before {
        animation: none;
    }

    .artifact-fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .artifact-page::before,
    .artifact-particles,
    .artifact-controls,
    .artifact-lore-toggle {
        display: none;
    }

    .artifact-page {
        background: white;
    }

    .artifact-fade-up {
        opacity: 1;
        transform: none;
    }
}
