/* ========== LEGENDS PAGE THEME - ELITE/PREMIUM ========== */
.legends-page {
    --legend-gradient: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    --legend-gradient-dark: linear-gradient(135deg, #4c1d95 0%, #5b21b6 50%, #6d28d9 100%);
    --legend-primary: #8b5cf6;
    --legend-primary-rgb: 139, 92, 246;
    --legend-secondary: #a78bfa;
    --legend-secondary-rgb: 167, 139, 250;
    --legend-gold: #fbbf24;
    --legend-gold-rgb: 251, 191, 36;
    --legend-silver: #d1d5db;
    --legend-silver-rgb: 209, 213, 219;
    --legend-bronze: #92400e;
    --legend-bronze-rgb: 146, 64, 14;
    --legend-bg-overlay: rgba(107, 70, 193, 0.05);
    --legend-card-gradient: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
}

/* ========== ELITE HERO SECTION ========== */
.legend-hero {
    background: linear-gradient(135deg, 
        rgba(77, 29, 149, 0.95) 0%, 
        rgba(107, 70, 193, 0.95) 50%, 
        rgba(139, 92, 246, 0.95) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    border-radius: 0 0 40px 40px;
    animation: legend-hero-glow 8s ease-in-out infinite alternate;
}

@keyframes legend-hero-glow {
    0% {
        background: linear-gradient(135deg, 
            rgba(77, 29, 149, 0.95) 0%, 
            rgba(107, 70, 193, 0.95) 50%, 
            rgba(139, 92, 246, 0.95) 100%);
        box-shadow: 0 20px 60px rgba(107, 70, 193, 0.4);
    }
    100% {
        background: linear-gradient(135deg, 
            rgba(139, 92, 246, 0.95) 0%, 
            rgba(107, 70, 193, 0.95) 50%, 
            rgba(77, 29, 149, 0.95) 100%);
        box-shadow: 0 20px 60px rgba(251, 191, 36, 0.3);
    }
}

.hero-glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 2px,
            transparent 4px
        );
    opacity: 0.3;
    mix-blend-mode: overlay;
    animation: glitch-shift 0.1s infinite linear;
}

@keyframes glitch-shift {
    0% { transform: translateX(0); }
    100% { transform: translateX(1px); }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ffffff, #fbbf24, #ffffff, #a78bfa, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: elite-title-shimmer 4s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(251, 191, 36, 0.5);
    letter-spacing: 2px;
}

@keyframes elite-title-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.legend-glow-text {
    background: linear-gradient(45deg, #fbbf24, #8b5cf6, #fbbf24, #a78bfa, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 400% 400%;
    animation: text-glitter 3s ease-in-out infinite;
    font-weight: 800;
}

@keyframes text-glitter {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-top: 1.5rem;
    border-right: 4px solid #fbbf24;
    padding-right: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: subtitle-glow 2s ease-in-out infinite;
}

@keyframes subtitle-glow {
    0%, 100% {
        border-right-color: #fbbf24;
    }
    50% {
        border-right-color: #8b5cf6;
    }
}

.legend-logo-container {
    position: relative;
    display: inline-block;
}

.legend-logo {
    max-width: 350px;
    border-radius: 30px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(251, 191, 36, 0.5),
        0 0 120px rgba(139, 92, 246, 0.3);
    transition: all 0.5s ease;
    border: 4px solid rgba(251, 191, 36, 0.7);
    animation: logo-rotation 20s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.legend-logo-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, 
        rgba(251, 191, 36, 0.4) 0%,
        rgba(139, 92, 246, 0.2) 30%,
        rgba(139, 92, 246, 0) 70%);
    border-radius: 40px;
    filter: blur(30px);
    animation: logo-glow-pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes logo-glow-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

@keyframes logo-rotation {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-1deg) scale(1.02);
    }
    50% {
        transform: rotate(1deg) scale(1);
    }
    75% {
        transform: rotate(-0.5deg) scale(1.01);
    }
}

/* Legend Badges */
.legend-badge {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    animation: badge-float 4s ease-in-out infinite;
}

@keyframes badge-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.badge-gold {
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
    color: #78350f;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.badge-silver {
    background: linear-gradient(45deg, #d1d5db, #9ca3af, #d1d5db);
    color: #1f2937;
    box-shadow: 0 8px 25px rgba(209, 213, 219, 0.4);
}

.badge-bronze {
    background: linear-gradient(45deg, #92400e, #b45309, #92400e);
    color: #fef3c7;
    box-shadow: 0 8px 25px rgba(146, 64, 14, 0.4);
}

/* ========== ELITE TABS ========== */
.legend-tabs {
    display: flex;
    background: linear-gradient(135deg, 
        rgba(77, 29, 149, 0.9) 0%, 
        rgba(107, 70, 193, 0.9) 50%, 
        rgba(139, 92, 246, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 3px solid rgba(251, 191, 36, 0.3);
    border-radius: 60px;
    padding: 10px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(107, 70, 193, 0.3);
    animation: elite-tabs-float 6s ease-in-out infinite;
}

@keyframes elite-tabs-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.legend-tab {
    flex: 1;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.tab-content {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    position: relative;
}

.legend-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(251, 191, 36, 0.3), 
        rgba(139, 92, 246, 0.2), 
        transparent);
    transition: left 0.8s ease;
}

.legend-tab:hover::before {
    left: 100%;
}

.legend-tab.active {
    background: linear-gradient(45deg, #8b5cf6, #fbbf24, #8b5cf6);
    color: #1f2937;
    box-shadow: 
        0 10px 30px rgba(139, 92, 246, 0.5),
        inset 0 2px 15px rgba(255, 255, 255, 0.4);
    animation: active-elite-tab 2s ease-in-out infinite;
    transform: scale(1.03);
}

@keyframes active-elite-tab {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(139, 92, 246, 0.5),
            inset 0 2px 15px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 10px 40px rgba(139, 92, 246, 0.7),
            inset 0 2px 20px rgba(255, 255, 255, 0.5);
    }
}

.legend-tab[data-type="numeric"].active {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #60a5fa, #1d4ed8, #3b82f6);
    animation: active-numeric-tab 2s ease-in-out infinite;
}

@keyframes active-numeric-tab {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(59, 130, 246, 0.5),
            inset 0 2px 15px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 10px 40px rgba(59, 130, 246, 0.7),
            inset 0 2px 20px rgba(255, 255, 255, 0.5);
    }
}

.tab-badge {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 4px;
}

/* ========== ELITE LEGEND CARDS ========== */
.nft.legend-card {
    max-width: 380px;
    margin: 2.5rem auto;
    background: var(--card-bg);
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(139, 92, 246, 0.2);
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: elite-card-enter 1s ease-out;
    z-index: 1;
}

@keyframes elite-card-enter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nft.legend-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        #8b5cf6, #fbbf24, #8b5cf6, #a78bfa, #fbbf24, #8b5cf6);
    border-radius: 34px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(20px);
    background-size: 300% 300%;
    animation: card-border-shimmer 3s linear infinite;
}

@keyframes card-border-shimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

.nft.legend-card:hover::before {
    opacity: 0.8;
}

.nft.legend-card:hover {
    transform: translateY(-25px);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(139, 92, 246, 0.5),
        0 0 100px rgba(251, 191, 36, 0.3);
    border-color: #8b5cf6;
}

.digital-legend-card::before {
    background: linear-gradient(45deg, 
        #3b82f6, #60a5fa, #1d4ed8, #60a5fa, #3b82f6);
}

.digital-legend-card:hover {
    border-color: #3b82f6;
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(59, 130, 246, 0.5),
        0 0 100px rgba(96, 165, 250, 0.3);
}

/* Card Content */
.legend-card .main {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(145deg, 
        rgba(30, 30, 30, 0.9) 0%, 
        rgba(45, 45, 45, 0.9) 100%);
    border-radius: 30px;
}

.digital-legend-card .main {
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(30, 41, 59, 0.9) 100%);
}

.legend-card-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 800;
    z-index: 3;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    animation: elite-badge-pulse 3s ease-in-out infinite;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

@keyframes elite-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.6),
            0 0 30px rgba(255, 255, 255, 0.4);
    }
}

.badge-gold {
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
}

.badge-silver {
    background: linear-gradient(45deg, #d1d5db, #9ca3af, #d1d5db);
}

.badge-bronze {
    background: linear-gradient(45deg, #92400e, #b45309, #92400e);
}

.badge-info {
    background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6);
}

.badge-primary {
    background: linear-gradient(45deg, #1d4ed8, #3b82f6, #1d4ed8);
}

.badge-warning {
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
}

.legend-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.tokenImage {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.legend-card:hover .tokenImage {
    transform: scale(1.08);
}

.legend-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        transparent 40%, 
        rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    border-radius: 20px;
}

.legend-level-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(139, 92, 246, 0.3) 0%, 
        transparent 70%);
    opacity: 0.5;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    pointer-events: none;
}

.legend-level-glow.digital {
    background: radial-gradient(circle at center, 
        rgba(59, 130, 246, 0.3) 0%, 
        transparent 70%);
}

.legend-card-title {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(45deg, #8b5cf6, #fbbf24, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: card-title-shift 3s ease-in-out infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes card-title-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.digital-legend-card .legend-card-title {
    background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6);
  
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: card-title-shift 3s ease-in-out infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.legend-card .description {
    margin: 1rem 0 1.5rem;
    color: var(--text-primary);
    opacity: 0.95;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
    padding: 0 1rem;
}

.digital-tag {
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.2));
    color: #60a5fa;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    margin: 1rem auto;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
    animation: digital-tag-pulse 2s ease-in-out infinite;
}

@keyframes digital-tag-pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 5px 30px rgba(59, 130, 246, 0.3);
    }
}

.legend-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.legend-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.legend-feature i {
    font-size: 1.2rem;
}

.legend-divider {
    height: 2px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(139, 92, 246, 0.5), 
        rgba(251, 191, 36, 0.5), 
        rgba(139, 92, 246, 0.5), 
        transparent);
    border: none;
    margin: 1.5rem 0;
}

.digital-legend-card .legend-divider {
    background: linear-gradient(to right, 
        transparent, 
        rgba(59, 130, 246, 0.5), 
        rgba(96, 165, 250, 0.5), 
        rgba(59, 130, 246, 0.5), 
        transparent);
}

/* ========== ELITE BUTTONS ========== */
.super-button.legend-button {
    background: linear-gradient(145deg, 
        rgba(30, 30, 30, 0.95), 
        rgba(45, 45, 45, 0.95));
    border: 2px solid rgba(139, 92, 246, 0.4);
    color: #fff;
    padding: 18px 36px;
    font-size: 1.2rem;
    border-radius: 15px;
    animation: legend-button-float 4s ease-in-out infinite;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(139, 92, 246, 0.4);
}

@keyframes legend-button-float {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(139, 92, 246, 0.4);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 
            0 20px 50px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(139, 92, 246, 0.5);
    }
}

.super-button.legend-button::before {
    background: conic-gradient(
        from 0deg, 
        #8b5cf6, 
        #fbbf24, 
        #a78bfa,
        #fbbf24,
        #8b5cf6
    );
    animation: rotate 3s linear infinite;
}

.super-button.digital-legend-button {
    border: 2px solid rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(59, 130, 246, 0.4);
    animation: digital-button-float 4s ease-in-out infinite;
}

@keyframes digital-button-float {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(59, 130, 246, 0.4);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 
            0 20px 50px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(59, 130, 246, 0.5);
    }
}

.super-button.digital-legend-button::before {
    background: conic-gradient(
        from 0deg, 
        #3b82f6, 
        #60a5fa, 
        #1d4ed8,
        #60a5fa,
        #3b82f6
    );
}

.super-button.legend-button:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 50px rgba(139, 92, 246, 0.6),
        0 0 80px rgba(251, 191, 36, 0.4);
    animation: none;
}

.super-button.digital-legend-button:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 50px rgba(59, 130, 246, 0.6),
        0 0 80px rgba(96, 165, 250, 0.4);
    animation: none;
}

.super-button.legend-button:hover .arrow {
    transform: translateX(12px);
    animation: arrow-bounce-fast 0.4s ease infinite;
}

@keyframes arrow-bounce-fast {
    0%, 100% {
        transform: translateX(12px);
    }
    50% {
        transform: translateX(18px);
    }
}

/* ========== LEGEND START TEST BUTTONS - ELITE EDITION ========== */
.start-test-btn {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(45deg, #8b5cf6, #6d28d9, #8b5cf6);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 10px 25px rgba(139, 92, 246, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.start-test-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.8s ease;
    z-index: -1;
}

.start-test-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #8b5cf6, 
        #fbbf24, 
        #a78bfa,
        #fbbf24,
        #8b5cf6);
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -2;
    background-size: 300% 300%;
    animation: button-border-shimmer 3s linear infinite paused;
}

@keyframes button-border-shimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

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

.start-test-btn:hover::after {
    opacity: 0.8;
    animation-play-state: running;
}

.start-test-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(139, 92, 246, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #6d28d9, #8b5cf6, #6d28d9);
}

.start-test-btn:active {
    transform: translateY(-2px) scale(1);
    box-shadow: 
        0 8px 20px rgba(139, 92, 246, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
}

/* Digital/Numeric Legend Button */
.start-test-btn.digital {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #3b82f6);
    box-shadow: 
        0 10px 25px rgba(59, 130, 246, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.start-test-btn.digital::after {
    background: linear-gradient(45deg, 
        #3b82f6, 
        #60a5fa, 
        #1d4ed8,
        #60a5fa,
        #3b82f6);
}

.start-test-btn.digital:hover {
    box-shadow: 
        0 15px 35px rgba(59, 130, 246, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #1d4ed8, #3b82f6, #1d4ed8);
}

/* Gold Button Variation */
.start-test-btn.gold {
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
    box-shadow: 
        0 10px 25px rgba(251, 191, 36, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.start-test-btn.gold::after {
    background: linear-gradient(45deg, 
        #fbbf24, 
        #fcd34d, 
        #f59e0b,
        #fcd34d,
        #fbbf24);
}

.start-test-btn.gold:hover {
    box-shadow: 
        0 15px 35px rgba(251, 191, 36, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #f59e0b, #fbbf24, #f59e0b);
}

/* Silver Button Variation */
.start-test-btn.silver {
    background: linear-gradient(45deg, #d1d5db, #9ca3af, #d1d5db);
    box-shadow: 
        0 10px 25px rgba(209, 213, 219, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.start-test-btn.silver::after {
    background: linear-gradient(45deg, 
        #d1d5db, 
        #f3f4f6, 
        #9ca3af,
        #f3f4f6,
        #d1d5db);
}

.start-test-btn.silver:hover {
    box-shadow: 
        0 15px 35px rgba(209, 213, 219, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #9ca3af, #d1d5db, #9ca3af);
}

/* Bronze Button Variation */
.start-test-btn.bronze {
    background: linear-gradient(45deg, #92400e, #b45309, #92400e);
    box-shadow: 
        0 10px 25px rgba(146, 64, 14, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.start-test-btn.bronze::after {
    background: linear-gradient(45deg, 
        #92400e, 
        #b45309, 
        #78350f,
        #b45309,
        #92400e);
}

.start-test-btn.bronze:hover {
    box-shadow: 
        0 15px 35px rgba(146, 64, 14, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.2);
    background: linear-gradient(45deg, #b45309, #92400e, #b45309);
}

/* Button Icon Animation */
.start-test-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.start-test-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

.start-test-btn.digital:hover i {
    transform: scale(1.2) rotate(-10deg);
}

/* Button Loading State */
.start-test-btn.loading {
    position: relative;
    color: transparent;
}

.start-test-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Button Focus States */
.start-test-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.3),
        0 10px 25px rgba(139, 92, 246, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.start-test-btn.digital:focus {
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.3),
        0 10px 25px rgba(59, 130, 246, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

/* Button Disabled State */
.start-test-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.start-test-btn:disabled::before,
.start-test-btn:disabled::after {
    display: none;
}

/* Button Size Variations */
.start-test-btn.small {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
}

.start-test-btn.large {
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
}

/* Button with Countdown Timer */
.start-test-btn.with-timer {
    position: relative;
}

.start-test-btn.with-timer .timer-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    animation: timer-pulse 1s ease-in-out infinite;
}

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

/* Responsive Button Adjustments */
@media (max-width: 768px) {
    .start-test-btn {
        padding: 1rem 1.2rem;
        font-size: 1rem;
    }
    
    .start-test-btn.large {
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .start-test-btn {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    .start-test-btn i {
        font-size: 1rem;
    }
}

/* Theme Support */
[data-bs-theme="dark"] .start-test-btn {
    color: white;
}

[data-bs-theme="light"] .start-test-btn {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .start-test-btn.gold {
    color: #78350f;
}

[data-bs-theme="light"] .start-test-btn.silver {
    color: #1f2937;
}

/* Animation for Button Entrance */
.test-item .start-test-btn {
    animation: button-fade-in 0.5s ease-out forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s + 0.3s);
    opacity: 0;
    transform: translateY(10px);
}

@keyframes button-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Special Legend Button Styles */
.test-item .start-test-btn {
    background: linear-gradient(45deg, #8b5cf6, #6d28d9, #8b5cf6);
}

.test-item.digital .start-test-btn {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #3b82f6);
}

/* Match the test item hover effect */
.test-item:hover .start-test-btn {
    transform: translateY(-5px) scale(1.02);
}

/* ========== ELITE PANEL STYLES ========== */
.test-selector-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: elite-panel-fade 0.4s ease-out;
}

@keyframes elite-panel-fade {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(15px);
    }
}

.test-selector-panel.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.panel-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    background: linear-gradient(145deg, 
        rgba(25, 25, 25, 0.98) 0%, 
        rgba(40, 40, 40, 0.98) 100%);
    border: 3px solid rgba(139, 92, 246, 0.5);
    border-radius: 35px;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(139, 92, 246, 0.5);
    animation: elite-panel-slide 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.digital-panel {
    border: 3px solid rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(59, 130, 246, 0.5);
}

@keyframes elite-panel-slide {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel-header {
    padding: 2.5rem;
    border-bottom: 3px solid rgba(139, 92, 246, 0.5);
    background: linear-gradient(to right, 
        rgba(139, 92, 246, 0.2), 
        rgba(251, 191, 36, 0.2));
    border-radius: 35px 35px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(20px);
    animation: elite-header-glow 4s ease-in-out infinite;
}

@keyframes elite-header-glow {
    0%, 100% {
        background: linear-gradient(to right, 
            rgba(139, 92, 246, 0.2), 
            rgba(251, 191, 36, 0.2));
    }
    50% {
        background: linear-gradient(to right, 
            rgba(251, 191, 36, 0.2), 
            rgba(139, 92, 246, 0.2));
    }
}

.digital-panel .panel-header {
    border-bottom-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(to right, 
        rgba(59, 130, 246, 0.2), 
        rgba(96, 165, 250, 0.2));
    animation: digital-header-glow 4s ease-in-out infinite;
}

@keyframes digital-header-glow {
    0%, 100% {
        background: linear-gradient(to right, 
            rgba(59, 130, 246, 0.2), 
            rgba(96, 165, 250, 0.2));
    }
    50% {
        background: linear-gradient(to right, 
            rgba(96, 165, 250, 0.2), 
            rgba(59, 130, 246, 0.2));
    }
}

.panel-header h4 {
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.close-panel-btn {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(139, 92, 246, 0.5);
    border-radius: 50%;
    color: #a78bfa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 11;
    font-size: 1.5rem;
    animation: close-btn-float 3s ease-in-out infinite;
}

@keyframes close-btn-float {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.digital-panel .close-panel-btn {
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.close-panel-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: rotate(180deg) scale(1.2);
    border-color: #8b5cf6;
    animation: none;
}

.digital-panel .close-panel-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

.tests-container {
    padding: 2rem;
    max-height: calc(80vh - 150px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tests-container::-webkit-scrollbar {
    display: none;
}

/* Test Items */
.test-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: test-item-fade 0.6s ease-out forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s);
    opacity: 0;
}

@keyframes test-item-fade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.test-item.digital {
    border-color: rgba(59, 130, 246, 0.3);
}

.test-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #8b5cf6, #fbbf24, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 300% 100%;
    animation: test-item-border 3s linear infinite;
}

@keyframes test-item-border {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

.test-item.digital::before {
    background: linear-gradient(to right, #3b82f6, #60a5fa, #3b82f6);
}

.test-item:hover::before {
    opacity: 1;
}

.test-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
    transform: translateY(-8px) translateX(10px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(139, 92, 246, 0.3);
}

.test-item.digital:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(59, 130, 246, 0.3);
}

/* ========== LEGEND STATS SECTION ========== */
.legend-stats-section {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(251, 191, 36, 0.05) 100%);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 30px;
    padding: 3rem;
    margin-top: 4rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(139, 92, 246, 0.1);
}

.legend-stat-item {
    padding: 2rem;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-icon.gold {
    color: #fbbf24;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
    animation: gold-pulse 2s ease-in-out infinite;
}

.stat-icon.silver {
    color: #d1d5db;
    filter: drop-shadow(0 0 10px rgba(209, 213, 219, 0.5));
    animation: silver-pulse 2s ease-in-out infinite;
}

.stat-icon.bronze {
    color: #92400e;
    filter: drop-shadow(0 0 10px rgba(146, 64, 14, 0.5));
    animation: bronze-pulse 2s ease-in-out infinite;
}

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

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

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #8b5cf6, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ========== ENHANCED THEME SUPPORT ========== */
[data-bs-theme="dark"] {
    --legend-primary: #a78bfa;
    --legend-primary-rgb: 167, 139, 250;
    --legend-secondary: #c4b5fd;
    --legend-secondary-rgb: 196, 181, 253;
    --card-bg: linear-gradient(145deg, 
        rgba(30, 30, 30, 0.95) 0%, 
        rgba(45, 45, 45, 0.95) 100%);
    --modal-bg: linear-gradient(145deg, 
        rgba(20, 20, 20, 0.98) 0%, 
        rgba(35, 35, 35, 0.98) 100%);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
}

[data-bs-theme="light"] {
    --legend-primary: #7c3aed;
    --legend-primary-rgb: 124, 58, 237;
    --legend-secondary: #8b5cf6;
    --legend-secondary-rgb: 139, 92, 246;
    --card-bg: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 249, 250, 0.98) 100%);
    --modal-bg: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.99) 0%, 
        rgba(248, 249, 250, 0.99) 100%);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
}

[data-bs-theme="light"] .legend-hero {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.95) 0%, 
        rgba(139, 92, 246, 0.95) 100%);
}

[data-bs-theme="light"] .legend-tabs {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.9) 0%, 
        rgba(139, 92, 246, 0.9) 100%);
}

[data-bs-theme="light"] .nft.legend-card .main {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 249, 250, 0.98) 100%);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .nft.legend-card {
        max-width: 350px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 992px) {
    .nft.legend-card {
        max-width: 100%;
        margin: 2rem auto;
    }
    
    .legend-card .main {
        padding: 1.5rem;
    }
    
    .panel-content {
        width: 95%;
        max-width: 95%;
    }
    
    .legend-tabs {
        flex-direction: column;
        border-radius: 30px;
        gap: 10px;
        padding: 10px;
    }
    
    .legend-tab {
        padding: 1.2rem;
        font-size: 1.1rem;
    }
    
    .legend-stats-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .legend-hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .legend-logo {
        max-width: 250px;
    }
    
    .panel-content {
        width: 98%;
        margin: 1rem;
        max-height: 95vh;
        border-radius: 25px;
    }
    
    .panel-header {
        padding: 1.5rem;
    }
    
    .close-panel-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .tests-container {
        padding: 1.5rem;
        max-height: calc(85vh - 120px);
    }
    
    .test-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .legend-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nft.legend-card:hover {
        transform: translateY(-15px);
    }
    
    .super-button.legend-button {
        padding: 14px 28px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .legend-hero {
        padding: 50px 0;
        border-radius: 0 0 25px 25px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .legend-glow-text {
        font-size: 1.6rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding-right: 1rem;
    }
    
    .panel-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
        border: none;
    }
    
    .test-selector-panel.active {
        padding: 0;
    }
    
    .tests-container {
        max-height: calc(85vh - 100px);
        padding: 1rem;
    }
    
    .legend-logo {
        max-width: 200px;
    }
    
    .legend-card-badge {
        padding: 8px 16px;
        font-size: 0.9rem;
        top: 20px;
        right: 20px;
    }
    
    .legend-stats-section {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .legend-hero,
    .legend-logo,
    .legend-logo-glow,
    .legend-tabs,
    .nft.legend-card,
    .legend-card-badge,
    .legend-badge,
    .super-button,
    .legend-symbol,
    .legend-particle,
    .panel-content,
    .close-panel-btn,
    .test-item,
    .stat-icon,
    .legend-main-title,
    .legend-glow-text,
    .legend-card-title {
        animation: none !important;
        transition: none !important;
    }
    
    .legend-hero::before,
    .legend-logo::before,
    .super-button::before,
    .legend-card::before,
    .test-item::before {
        animation: none !important;
    }
    
    .nft.legend-card:hover {
        transform: translateY(-10px);
    }
    
    .test-item:hover {
        transform: translateY(-4px);
    }
}