/* ============================================
   Components CSS (Enhanced v2.0)
   Modern Effects & Interactions
   ============================================ */

/* ============================================
   Neon Hover Effect (Enhanced)
   ============================================ */
.neon-hover {
    transition: all var(--transition-normal);
    position: relative;
}

.neon-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    background: radial-gradient(
        circle at center,
        rgba(255, 0, 255, 0.15) 0%,
        transparent 70%
    );
}

.neon-hover:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 40px rgba(138, 43, 226, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.4);
}

.neon-hover:hover::after {
    opacity: 1;
}

/* Neon Hover Variants */
.neon-hover-cyan:hover {
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(78, 205, 196, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.4);
}

.neon-hover-pink:hover {
    box-shadow:
        0 0 20px rgba(255, 107, 107, 0.5),
        0 0 40px rgba(255, 107, 107, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.4);
}

.neon-hover-gold:hover {
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 230, 109, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Clickable Card (Glassmorphism)
   ============================================ */
.clickable-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-bounce);
    border: 2px solid var(--border-neon);
    overflow: hidden;
    position: relative;
}

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

.clickable-card:hover::before {
    left: 100%;
}

.clickable-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.4),
        0 0 60px rgba(255, 0, 255, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

.clickable-card:active {
    transform: translateY(-2px) scale(1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

/* Clickable Card - Small variant */
.clickable-card-sm {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid var(--border-neon);
    overflow: hidden;
}

.clickable-card-sm:hover {
    transform: translateY(-3px);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.5);
}

/* ============================================
   Base Image Component with Overlay
   ============================================ */
.base-image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.base-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.base-image-container:hover img {
    transform: scale(1.05);
}

.base-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(255, 0, 255, 0.5));
    z-index: 1;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.base-image-container:hover::before {
    opacity: 0.7;
}

.base-image-container > *:not(img) {
    position: relative;
    z-index: 2;
}

/* ============================================
   User Badge & Menu
   ============================================ */
.user-badge {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links .user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Upgrade Button */
.nav-upgrade {
    display: flex;
    align-items: center;
}

.btn-upgrade {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #1a1a2e;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #ffe033 0%, #ffc933 100%);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.btn-upgrade .upgrade-icon {
    font-size: 1rem;
}

.btn-upgrade .upgrade-text {
    display: none;
}

@media (min-width: 768px) {
    .btn-upgrade .upgrade-text {
        display: inline;
    }
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
}

/* ============================================
   Spot Card
   ============================================ */
.spot-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.spot-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 0, 255, 0.2);
    border-color: var(--border-light);
}

.spot-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.spot-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.spot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.spot-card:hover .spot-image img {
    transform: scale(1.1);
}

.spot-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
}

.spot-badges {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    z-index: 2;
}

.badge {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.spot-info {
    padding: var(--spacing-md);
}

.spot-info h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

.spot-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.spot-stats {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.85rem;
}

.spot-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
}

.spot-requirement {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-size: 0.85rem;
}

.select-spot-btn {
    width: 100%;
    margin-top: auto;
}

/* ============================================
   Loadout Selector (Enhanced)
   ============================================ */
.loadout-selector {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
}

.loadout-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.loadout-count {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 0 10px var(--accent-glow);
}

.loadout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.loadout-slot {
    background: rgba(15, 15, 30, 0.8);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    overflow: hidden;
}

.loadout-slot:hover {
    border-color: var(--border-light);
    background: rgba(25, 25, 45, 0.9);
}

.loadout-slot.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.slot-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--gradient-primary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.slot-color,
.slot-cap {
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xs);
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
}

.loadout-slot:hover .slot-color,
.loadout-slot:hover .slot-cap {
    transform: scale(1.05);
}

.slot-color {
    border: 2px dashed var(--text-muted);
}

.slot-placeholder {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.slot-clear {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.loadout-slot:hover .slot-clear {
    display: flex;
}

.slot-clear:hover {
    background: var(--danger-dark);
    transform: scale(1.1);
}

/* ============================================
   Color Library
   ============================================ */
.loadout-library {
    margin-bottom: var(--spacing-lg);
}

.library-section {
    margin-bottom: var(--spacing-lg);
}

.library-section h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: var(--spacing-sm);
}

.color-item {
    height: 55px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--spacing-xs);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.color-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.color-item:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.color-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.caps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--spacing-sm);
}

.cap-item {
    background: rgba(15, 15, 30, 0.8);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.cap-item:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.cap-item.selected {
    border-color: var(--accent);
    background: rgba(255, 230, 109, 0.1);
}

.cap-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.cap-name {
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
    width: 100%;
}

/* ============================================
   Brand Selection (Enhanced)
   ============================================ */
.brand-tabs {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.brand-tab {
    flex: 1;
    min-width: 150px;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.brand-tab:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-tab.active {
    border-color: var(--accent);
    background: rgba(255, 230, 109, 0.1);
    box-shadow: 0 0 25px var(--accent-glow);
}

.brand-bomb-img {
    width: 80px;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.brand-tab:hover .brand-bomb-img {
    transform: scale(1.1);
}

.brand-tab span {
    font-weight: 600;
    color: var(--text);
}

.brand-palettes {
    margin-bottom: var(--spacing-lg);
}

.brand-palette {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.brand-palette.active {
    display: block;
}

/* ============================================
   Slot Preview with Bomb Image
   ============================================ */
.slot-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.slot-color-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
    border-radius: inherit;
}

.slot-bomb-img {
    position: relative;
    z-index: 1;
    width: 80px;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    transition: transform var(--transition-bounce);
}

.slot-bomb-img:hover {
    transform: scale(1.1) rotate(-5deg);
}

.slot-color-label {
    position: absolute;
    bottom: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: calc(100% - var(--spacing-md));
    text-align: center;
}

.color-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    color: white;
}

/* ============================================
   Loadout Confirmation Popup
   ============================================ */
.loadout-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10000;
    opacity: 0;
    transition: all var(--transition-bounce);
    pointer-events: none;
}

.loadout-confirmation.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.confirmation-content {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(46, 204, 113, 0.4);
    text-align: center;
    min-width: 350px;
    border: 3px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.confirmation-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 230, 109, 0.3) 0%, transparent 70%);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.confirmation-logo {
    position: relative;
    z-index: 1;
    width: 100px;
    height: auto;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: popIn 0.5s var(--transition-bounce);
}

.confirmation-icon {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    animation: popIn 0.5s var(--transition-bounce) 0.1s backwards;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.confirmation-content h3 {
    color: white;
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.confirmation-content p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   Character Toast (Enhanced with dynamic colors)
   ============================================ */
.character-toast {
    --char-primary: #ff00ff;
    --char-secondary: #cc00cc;
    --char-glow: rgba(255, 0, 255, 0.4);
    --char-gradient: linear-gradient(135deg, #ff00ff, #cc00cc);

    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 420px;
    min-width: 320px;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.95), rgba(30, 30, 50, 0.9));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--char-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 6px);
    z-index: var(--z-toast);
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 0 30px var(--char-glow),
        0 0 60px var(--char-glow),
        0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Accent bar on left side */
.character-toast-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--char-gradient);
    box-shadow: 0 0 15px var(--char-glow);
}

.character-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    animation: toastEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastEntrance {
    0% {
        opacity: 0;
        transform: translateX(120%) scale(0.8) rotate(5deg);
    }
    50% {
        transform: translateX(-10px) scale(1.02) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0);
    }
}

.character-toast.hiding {
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    transition: all 0.4s ease-in;
}

.character-toast-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Avatar wrapper for ring effect */
.character-toast-avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.character-toast-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--char-primary);
    object-fit: cover;
    background: var(--darker);
    box-shadow: 0 0 20px var(--char-glow);
    position: relative;
    z-index: 2;
}

/* Animated ring around avatar */
.character-toast-avatar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--char-primary);
    border-right-color: var(--char-secondary);
    animation: avatarRingSpin 2s linear infinite;
    z-index: 1;
}

@keyframes avatarRingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.character-toast.show .character-toast-avatar {
    animation: toastAvatarPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;
}

@keyframes toastAvatarPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.character-toast-info {
    flex: 1;
    min-width: 0;
}

.character-toast-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--char-primary);
    margin: 0;
    text-shadow: 0 0 15px var(--char-glow);
    letter-spacing: 1px;
}

.character-toast.show .character-toast-name {
    animation: nameGlow 2s ease-in-out infinite alternate;
}

@keyframes nameGlow {
    0% { text-shadow: 0 0 10px var(--char-glow); }
    100% { text-shadow: 0 0 25px var(--char-glow), 0 0 35px var(--char-glow); }
}

.character-toast-role {
    font-size: 0.7rem;
    color: var(--char-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    opacity: 0.9;
}

.character-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.character-toast-close:hover {
    color: var(--char-primary);
    background: var(--char-glow);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px var(--char-glow);
}

.character-toast-message {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
    margin: 0;
    padding: var(--spacing-xs) 0;
}

.character-toast.show .character-toast-message {
    animation: messageReveal 0.5s ease-out 0.3s backwards;
}

@keyframes messageReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.character-toast-message::before {
    content: '"';
    color: var(--char-primary);
    font-size: 1.3rem;
    font-weight: bold;
}

.character-toast-message::after {
    content: '"';
    color: var(--char-primary);
    font-size: 1.3rem;
    font-weight: bold;
}

/* Footer with animated line */
.character-toast-footer {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-xs);
}

.character-toast-line {
    height: 2px;
    background: var(--char-gradient);
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
}

.character-toast.show .character-toast-line {
    animation: lineExpand 0.6s ease-out 0.4s forwards;
}

@keyframes lineExpand {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* Subtle pulse effect on the whole toast */
.character-toast.show::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--char-primary);
    opacity: 0;
    animation: toastPulse 2s ease-in-out 1s;
}

@keyframes toastPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-header h2 {
    display: inline-block;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-neon);
    border-radius: var(--radius-full);
}

.section-line {
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), transparent);
    margin-top: var(--spacing-xs);
    border-radius: var(--radius-full);
}

/* ============================================
   Stats Cards
   ============================================ */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Action Cards
   ============================================ */
.action-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.action-card:hover {
    transform: translateY(-6px);
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-neon-pink);
    color: var(--text);
}

.action-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.action-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-icon {
    font-size: 3rem;
    transition: transform var(--transition-normal);
}

.action-card:hover .action-icon {
    transform: scale(1.15);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--spacing-xs);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.tab:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    transform: scaleX(1);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   Avatar
   ============================================ */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }

.avatar-neon {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .character-toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

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

    .brand-tabs {
        flex-direction: column;
    }

    .brand-tab {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    }

    .color-item {
        height: 45px;
    }

    .color-name {
        font-size: 0.6rem;
    }
}

/* ============================================
   MUSIC PLAYER
   Floating bottom-left player for background music
   ============================================ */

.music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.95), rgba(30, 25, 45, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 50px;
    padding: 6px 12px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(138, 43, 226, 0.2);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.music-player:hover {
    opacity: 1;
    border-color: rgba(255, 0, 255, 0.4);
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(138, 43, 226, 0.3);
}

.music-player-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.music-play {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.music-play:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.music-play .pause-icon {
    display: none;
}

.music-player.playing .music-play .play-icon {
    display: none;
}

.music-player.playing .music-play .pause-icon {
    display: inline;
}

.music-skip {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.music-skip:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 150px;
    overflow: hidden;
}

.music-label {
    color: var(--accent);
    font-size: 14px;
    animation: musicPulse 2s ease-in-out infinite;
}

.music-player.playing .music-label {
    animation: musicBounce 0.5s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes musicBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.music-track-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.music-player.playing .music-track-name {
    color: var(--accent);
}

.music-volume {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

.music-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.music-volume::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.music-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Collapsed state for mobile */
@media (max-width: 480px) {
    .music-player {
        bottom: 10px;
        left: 10px;
        padding: 4px 8px;
    }

    .music-info {
        display: none;
    }

    .music-volume {
        width: 40px;
    }
}
