/**
 * DJC-Hub Frontend Styles
 */

:root {
    --djc-primary: #3b82f6;
    --djc-secondary: #8b5cf6;
    --djc-success: #22c55e;
    --djc-warning: #f59e0b;
    --djc-danger: #ef4444;
    --djc-dark: #1f2937;
    --djc-light: #f3f4f6;
    --djc-border: #e5e7eb;
}

.djc-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Card */
.djc-profile-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.djc-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.djc-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.djc-profile-info h2 {
    margin: 0 0 5px 0;
    color: var(--djc-dark);
}

.djc-level-badge {
    display: inline-block;
    background: var(--djc-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* XP Progress Bar */
.djc-xp-progress {
    margin: 20px 0;
}

.djc-progress-bar {
    height: 24px;
    background: var(--djc-light);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.djc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--djc-primary), var(--djc-secondary));
    transition: width 0.3s ease;
}

.djc-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--djc-dark);
}

/* Stats Grid */
.djc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.djc-stat-card {
    background: var(--djc-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.djc-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--djc-primary);
    margin: 0;
}

.djc-stat-label {
    font-size: 14px;
    color: #6b7280;
    margin: 5px 0 0 0;
}

/* Achievements */
.djc-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.djc-achievement {
    background: white;
    border: 2px solid var(--djc-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.djc-achievement:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.djc-game-target {
    cursor: pointer;
}

/* DJC-Gaming section */
.djc-gaming-section .djc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.djc-gaming-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.djc-gaming-subtitle {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.djc-gaming-grid-v2 {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.djc-gaming-grid-v2.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.djc-gaming-grid-v2::-webkit-scrollbar {
    height: 0;
}

.djc-profile-card.djc-gaming-section .djc-gaming-card-v2 {
    position: relative;
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), rgba(15, 23, 42, 0.92)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    color: #f8fafc;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(124, 92, 255, 0.25);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
    flex: 0 0 calc((100% - 24px) / 3.2);
    max-width: 220px;
    min-width: 160px;
    width: auto;
    height: auto;
    scroll-snap-align: start;
}

.djc-gaming-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.55);
    border-color: rgba(124, 92, 255, 0.45);
}

.djc-gaming-card-v2:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35), 0 14px 30px rgba(2, 6, 23, 0.45);
}

.djc-gaming-card-v2__banner {
    position: relative;
    width: 100% !important;
    aspect-ratio: 5 / 6;
    height: auto !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.djc-gaming-card-v2__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.75) 92%);
}

.djc-gaming-card-v2__banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    filter: saturate(1.05);
}

.djc-gaming-card-v2__banner-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
}

.djc-gaming-card-v2__status {
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 2;
    cursor: pointer;
}

.djc-gaming-card-v2__ring {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    cursor: pointer;
}

.djc-gaming-card-v2__ring-svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.djc-gaming-card-v2__ring-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.djc-gaming-card-v2__info {
    padding: 6px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(2, 6, 23, 0.78);
    flex: 1;
}

.djc-gaming-card-v2__title {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.djc-gaming-card-v2__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: rgba(226, 232, 240, 0.75);
    flex-wrap: wrap;
}

.djc-gaming-card-v2__meta strong {
    color: #f8fafc;
}

.djc-gaming-card-v2__available {
    color: #38bdf8;
    font-weight: 700;
    margin-left: auto;
}

.djc-gaming-card-v2.djc-has-available-achievements {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 16px 32px rgba(56, 189, 248, 0.2);
}

.djc-unlock-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
}

.djc-unlock-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(4px);
}

.djc-unlock-card {
    position: relative;
    width: min(720px, 92vw);
    max-height: 82vh;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.95));
    border: 1px solid rgba(124, 92, 255, 0.35);
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.djc-unlock-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.djc-unlock-header h3 {
    margin: 0;
    font-size: 20px;
    color: #f8fafc;
}

.djc-unlock-subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.8);
    margin-top: 4px;
    font-weight: 700;
}

.djc-unlock-summary {
    font-size: 14px;
    color: #cbd5f5;
}

.djc-unlock-list {
    overflow: auto;
    padding-right: 6px;
    display: grid;
    gap: 12px;
}

.djc-unlock-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    min-height: 80px;
    box-sizing: border-box;
}

.djc-unlock-item.is-locked {
    opacity: 0.85;
}

.djc-unlock-icon img,
.djc-unlock-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: rgba(30, 41, 59, 0.8);
}

/* Fallback icon colors per rarity */
.djc-rarity-card-common .djc-unlock-fallback { filter: grayscale(100%); opacity: 0.6; }
.djc-rarity-card-uncommon .djc-unlock-fallback { filter: sepia(100%) saturate(300%) hue-rotate(-10deg); }
.djc-rarity-card-rare .djc-unlock-fallback { filter: sepia(20%) saturate(50%) brightness(1.2); }
.djc-rarity-card-epic .djc-unlock-fallback { filter: none; }
.djc-rarity-card-legendary .djc-unlock-fallback { filter: sepia(100%) saturate(500%) hue-rotate(240deg); }
.djc-rarity-card-mythic .djc-unlock-fallback { filter: sepia(100%) saturate(500%) hue-rotate(300deg); }

.djc-unlock-info {
    display: grid;
    gap: 4px;
}

.djc-unlock-name {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
}

.djc-unlock-desc {
    font-size: 13px;
    color: #94a3b8;
}

.djc-unlock-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #cbd5f5;
}

.djc-unlock-rarity {
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.djc-unlock-status {
    font-weight: 700;
    color: rgba(148, 163, 184, 0.9);
}

/* Unlocked / Locked visual distinction */
.djc-unlock-item.is-unlocked {
    opacity: 1;
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}
.djc-unlock-item.is-unlocked .djc-unlock-status {
    color: #22c55e;
    font-weight: 700;
}
.djc-unlock-item.is-locked {
    opacity: 0.65;
}
.djc-unlock-item.is-locked .djc-unlock-status {
    color: rgba(148, 163, 184, 0.7);
}

/* Rarity label colors per tier */
.djc-rarity-common { background: rgba(100,116,139,0.15); color: #94a3b8; }
.djc-rarity-uncommon { background: rgba(184,134,11,0.15); color: #d4a855; }
.djc-rarity-rare { background: rgba(192,192,210,0.20); color: #c0c0d2; }
.djc-rarity-epic { background: rgba(245,158,11,0.15); color: #fbbf24; }
.djc-rarity-legendary { background: rgba(168,85,247,0.20); color: #c084fc; }
.djc-rarity-mythic { background: linear-gradient(90deg, rgba(239,68,68,0.2), rgba(168,85,247,0.2)); color: #f0abfc; }

/* Rarity card backgrounds per tier */
.djc-unlock-item.djc-rarity-card-common {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(100, 116, 139, 0.4);
}
.djc-unlock-item.djc-rarity-card-uncommon {
    background: linear-gradient(135deg, rgba(180, 130, 70, 0.08) 0%, rgba(205, 165, 100, 0.04) 100%);
    border-color: rgba(184, 134, 11, 0.4);
    box-shadow: inset 0 0 20px rgba(184, 134, 11, 0.05);
}
.djc-unlock-item.djc-rarity-card-rare {
    background: linear-gradient(135deg, rgba(176, 196, 222, 0.25) 0%, rgba(192, 192, 210, 0.18) 50%, rgba(220, 225, 240, 0.22) 100%);
    border-color: rgba(192, 200, 220, 0.7);
    border-width: 2px;
    box-shadow: 0 0 15px rgba(192, 200, 220, 0.25), inset 0 0 25px rgba(220, 225, 240, 0.1);
    position: relative;
    overflow: hidden;
}
.djc-unlock-item.djc-rarity-card-rare::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(220, 225, 240, 0.2) 45%, transparent 50%);
    background-size: 200% 100%;
    animation: djc-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}
.djc-unlock-item.djc-rarity-card-epic {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.22) 0%, rgba(245, 158, 11, 0.18) 50%, rgba(255, 215, 0, 0.20) 100%);
    border-color: rgba(255, 193, 7, 0.7);
    border-width: 2px;
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.3), inset 0 0 25px rgba(255, 215, 0, 0.08);
    position: relative;
    overflow: hidden;
}
.djc-unlock-item.djc-rarity-card-epic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 215, 0, 0.25) 45%, transparent 50%);
    background-size: 200% 100%;
    animation: djc-shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}
.djc-unlock-item.djc-rarity-card-legendary {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(139, 92, 246, 0.25) 100%);
    border-color: rgba(168, 85, 247, 0.8);
    border-width: 2px;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
    position: relative;
    overflow: hidden;
}
.djc-unlock-item.djc-rarity-card-legendary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(168, 85, 247, 0.15) 45%, transparent 50%);
    background-size: 200% 100%;
    animation: djc-shimmer 3s ease-in-out infinite;
    pointer-events: none;
}
.djc-unlock-item.djc-rarity-card-mythic {
    background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(245,158,11,0.25), rgba(34,197,94,0.25), rgba(59,130,246,0.25), rgba(168,85,247,0.25));
    border-color: rgba(236, 72, 153, 0.8);
    border-width: 2px;
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.4), 0 0 10px rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
}
.djc-unlock-item.djc-rarity-card-mythic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 38%, transparent 45%);
    background-size: 200% 100%;
    animation: djc-shimmer 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes djc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Unlocked items override rarity bg with green tint */
.djc-unlock-item.is-unlocked.djc-rarity-card-common,
.djc-unlock-item.is-unlocked.djc-rarity-card-uncommon,
.djc-unlock-item.is-unlocked.djc-rarity-card-rare,
.djc-unlock-item.is-unlocked.djc-rarity-card-epic {
    border-color: rgba(34, 197, 94, 0.4);
}

.djc-unlock-progress {
    position: relative;
    height: 6px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}
.djc-unlock-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.djc-unlock-progress-text {
    position: absolute;
    right: 0;
    top: -16px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}
.djc-unlock-item.is-unlocked .djc-unlock-progress-fill {
    background: linear-gradient(90deg, #22c55e, #10b981);
}
.djc-unlock-item[data-djc-game-key]:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.08);
    transition: all 0.15s ease;
}

.djc-gaming-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.djc-gaming-carousel-controls.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.djc-carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.djc-carousel-btn:hover {
    transform: translateY(-1px) scale(1.02);
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.35);
}

.djc-carousel-btn:focus {
    outline: none;
    border-color: rgba(124, 92, 255, 0.85);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35);
}

/* Prevent theme reset.css #c36 from bleeding into ANY DJC UI */
.djc-account-widget button,
.djc-account-widget [type='button'],
.djc-account-widget [type='submit'],
.djc-profile-wrapper button,
.djc-profile-wrapper [type='button'],
.djc-profile-wrapper [type='submit'],
.djc-modal-overlay button,
.djc-modal-overlay [type='button'],
.djc-modal-overlay [type='submit'],
[class*="djc-"] button,
[class*="djc-"] [type='button'],
[class*="djc-"] [type='submit'] {
    border-color: transparent;
    color: inherit;
}
.djc-account-widget button:hover,
.djc-account-widget button:focus,
.djc-profile-wrapper button:hover,
.djc-profile-wrapper button:focus,
.djc-modal-overlay button:hover,
.djc-modal-overlay button:focus,
[class*="djc-"] button:hover,
[class*="djc-"] button:focus {
    background-color: inherit;
    color: inherit;
}

.djc-carousel-btn:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.djc-dropdown-divider {
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    margin: 8px 6px;
}

.djc-profile-card.djc-gaming-section .djc-achievement-ring {
    --ring-size: 30px;
    width: var(--ring-size);
    height: var(--ring-size);
    border-radius: 50%;
    background:
        conic-gradient(#38bdf8 var(--djc-progress), rgba(148, 163, 184, 0.25) 0);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    color: #f8fafc;
    position: relative;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.djc-profile-card.djc-gaming-section .djc-achievement-ring::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.95);
}

.djc-profile-card.djc-gaming-section .djc-achievement-ring span {
    position: relative;
    z-index: 1;
}

@media (max-width: 980px) {
    .djc-gaming-grid-v2 {
        gap: 12px;
    }

    .djc-profile-card.djc-gaming-section .djc-gaming-card-v2 {
        flex: 0 0 calc((100% - 12px) / 2.4);
        max-width: 200px;
        min-width: 150px;
    }

    .djc-gaming-carousel-controls {
        display: none;
    }
}


@media (max-width: 640px) {
    .djc-profile-card.djc-gaming-section .djc-gaming-card-v2 {
        flex: 0 0 calc((100% - 12px) / 1.6);
        max-width: 190px;
        min-width: 150px;
    }
}

.djc-status-bronze {
    border-color: rgba(198, 134, 66, 0.6);
}

.djc-status-silver {
    border-color: rgba(148, 163, 184, 0.7);
}

.djc-status-gold {
    border-color: rgba(245, 158, 11, 0.8);
}

.djc-status-platinum {
    border-color: rgba(56, 189, 248, 0.95);
    box-shadow: 0 22px 46px rgba(56, 189, 248, 0.25);
}

/* =====================================================
   Account Widget - Horizontal Pill Bar (Two-row layout)
   ===================================================== */
.djc-account-widget {
    position: fixed !important;
    right: 18px !important;
    left: auto !important;
    top: 24px !important;
    z-index: 10050;
    font-family: 'Nunito', 'Segoe UI', sans-serif;
}

/* The always-visible pill bar */
.djc-account-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 8px 14px 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    min-width: 0;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Row 1: Avatar + Name + Icons */
.djc-account-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Row 2: Level + XP bar full width */
.djc-account-row-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 0 2px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Avatar in bar */
.djc-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Avatar clickable trigger */
.djc-avatar-trigger {
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.djc-avatar-trigger:hover {
    transform: scale(1.05);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

.djc-avatar-trigger:active {
    transform: scale(0.95);
}

.djc-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.djc-account-initial {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.djc-account-name {
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.djc-account-status {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #0b1220;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.djc-account-status-playing {
    background: #22d3ee;
    color: #04131a;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.djc-account-status-online {
    background: #22c55e;
    color: #04120d;
}

.djc-account-level-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.djc-account-xp-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.djc-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #10b981);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.djc-xp-bar-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Icon buttons (theme toggle, menu) */
.djc-account-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.djc-account-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    text-decoration: none;
    position: relative;
}

/* Guest action buttons */
.djc-account-guest-actions {
    gap: 6px;
}

.djc-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

/* Compact guest widget on mobile and during game */
@media (max-width: 768px) {
    body.djc-game-active .djc-account-widget,
    .djc-account-widget {
        right: 10px !important;
        top: 10px !important;
    }
    
    /* Stack guest buttons vertically and make them smaller */
    .djc-account-guest-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    body.djc-game-active .djc-account-guest-actions .djc-btn-sm {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    /* Hide guest label text on mobile during game */
    body.djc-game-active .djc-account-name {
        display: none;
    }
    
    /* Make avatar slightly smaller during game */
    body.djc-game-active .djc-account-avatar {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    body.djc-game-active .djc-account-widget {
        right: auto !important;
        left: 10px !important;
        top: auto !important;
        bottom: 10px !important;
        z-index: 9000 !important;
        opacity: 0.35;
        pointer-events: none;
    }

    body.djc-game-active .djc-account-widget.is-collapsed {
        width: 32px !important;
        height: 32px !important;
    }

    body.djc-game-active .djc-account-widget.is-collapsed .djc-account-bar,
    body.djc-game-active .djc-account-widget.is-collapsed .djc-account-row-top,
    body.djc-game-active .djc-account-widget.is-collapsed .djc-account-avatar {
        width: 32px !important;
        height: 32px !important;
    }
}

/* Theme toggle */
.djc-theme-toggle .djc-icon-moon,
body.djc-light-theme .djc-theme-toggle .djc-icon-sun {
    display: none;
}
body.djc-light-theme .djc-theme-toggle .djc-icon-moon {
    display: block;
}

.djc-account-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.djc-account-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Legacy login btn - kept for backward compat */
.djc-account-login-btn {
    width: auto;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: #04120d;
}

.djc-account-login-btn:hover {
    background: linear-gradient(135deg, #16a34a, #059669);
    color: #fff;
}

/* Toggle button (used for bell icon opening panel) */
.djc-account-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.djc-account-toggle:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff;
}

/* Collapsed state - only show avatar */
.djc-account-widget.is-collapsed {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

.djc-account-widget.is-collapsed .djc-account-bar {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    gap: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

.djc-account-widget.is-collapsed .djc-account-row-top {
    gap: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

.djc-account-widget.is-collapsed .djc-account-avatar {
    width: 40px !important;
    height: 40px !important;
}

.djc-account-widget.is-collapsed .djc-account-name {
    display: none;
}

.djc-account-widget.is-collapsed .djc-account-status {
    display: none;
}

.djc-account-widget.is-collapsed .djc-account-icons {
    display: none;
}

.djc-account-widget.is-collapsed .djc-account-row-bottom {
    display: none;
}

.djc-account-widget.is-collapsed .djc-account-guest-actions {
    display: none;
}

/* Hint animation for new users */
@keyframes pulse-hint {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(0, 255, 255, 0); }
}

.djc-avatar-trigger.show-hint {
    animation: pulse-hint 2s ease-in-out 3;
}

.djc-avatar-trigger.show-hint::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 255, 255, 0.5);
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.djc-account-toggle:focus,
.djc-account-toggle:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Dropdown panel (below bar) */
.djc-account-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 300px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-8px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    transform-origin: top right;
}

.djc-account-widget.is-open .djc-account-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.djc-account-panel.is-collapsing {
    transform: translateY(-8px) scale(0.9);
    opacity: 0;
}

.djc-account-panel .djc-btn,
.djc-account-panel a {
    color: #e5e7eb;
    text-decoration: none;
}

.djc-account-panel a:hover {
    color: #fff;
}

.djc-account-panel .djc-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.djc-account-panel .djc-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.djc-account-panel .djc-btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: #04120d;
    border: none;
    font-weight: 700;
}

.djc-account-actions {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.djc-account-actions .djc-btn {
    width: 100%;
    text-align: center;
}

.djc-account-tab.is-active {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.djc-account-subpanel {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255,255,255,0.08);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.djc-account-subpanel.is-open {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

.djc-account-subpanel-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    font-weight: 700;
}

.djc-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.djc-account-item:last-child {
    border-bottom: none;
}

.djc-account-item-title {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 600;
}

.djc-account-item-meta {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 600;
}

.djc-account-events-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.djc-account-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.djc-account-event:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
}

.djc-account-event-title {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.djc-account-event-date {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 600;
    white-space: nowrap;
}

.djc-account-events-link {
    display: inline-flex;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0ff;
    text-decoration: none;
}

.djc-account-events-link:hover {
    text-decoration: underline;
}

.djc-account-empty {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.9);
    padding: 4px 0;
}

.djc-account-best-ranks {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255,255,255,0.08);
}

.djc-account-best-ranks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.9);
}

.djc-best-rank-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.djc-best-rank-game {
    font-weight: 600;
    color: #e5e7eb;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.djc-best-rank-score {
    font-weight: 700;
    color: #22c55e;
    white-space: nowrap;
}

/* Avatar picker */
.djc-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.djc-avatar-choice {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    background: #0b1220;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.djc-avatar-choice img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.djc-avatar-choice:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.4);
}

.djc-avatar-choice.selected {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
}

/* Avatar widget skin picker */
.djc-skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.djc-skin-choice {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.djc-skin-choice:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 92, 255, 0.6);
}

.djc-skin-choice.selected {
    border-color: #8b5cff;
    box-shadow: 0 0 0 2px rgba(139, 92, 255, 0.25);
}

.djc-skin-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(11, 18, 32, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
}

.djc-skin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #8b5cff, #3b82f6);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.djc-skin-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.djc-skin-name {
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.djc-skin-bar {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #10b981);
    opacity: 0.9;
}

.djc-skin-label {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #cbd5f5;
    font-weight: 700;
}

.djc-skin-preview--hero {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(30, 41, 59, 0.9));
}

.djc-skin-preview--compact .djc-skin-avatar {
    width: 28px;
    height: 28px;
}

.djc-skin-preview--arcade {
    background: linear-gradient(135deg, rgba(6, 10, 20, 0.95), rgba(10, 20, 40, 0.95));
    border-color: rgba(124, 92, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 0 18px rgba(124, 92, 255, 0.35);
}

/* Account widget skins */
.djc-account-widget.djc-account-skin-hero .djc-account-bar {
    background: linear-gradient(135deg, rgba(16, 24, 45, 0.9), rgba(25, 34, 64, 0.9));
    border: 1px solid rgba(124, 92, 255, 0.35);
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.2);
    padding: 10px 18px 10px 10px;
}

.djc-account-widget.djc-account-skin-hero .djc-account-avatar {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(139, 92, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 255, 0.2), 0 10px 22px rgba(0,0,0,0.35);
}

.djc-account-widget.djc-account-skin-hero .djc-account-name {
    font-size: 15px;
}

.djc-account-widget.djc-account-skin-hero .djc-account-level-badge {
    font-size: 12px;
    padding: 3px 10px;
}

.djc-account-widget.djc-account-skin-hero .djc-account-xp-bar {
    height: 9px;
}

.djc-account-widget.djc-account-skin-compact .djc-account-bar {
    padding: 6px 10px 6px 6px;
    border-radius: 14px;
    background: rgba(10, 15, 28, 0.85);
}

.djc-account-widget.djc-account-skin-compact .djc-account-avatar {
    width: 36px;
    height: 36px;
}

.djc-account-widget.djc-account-skin-compact .djc-account-name {
    font-size: 12px;
}

.djc-account-widget.djc-account-skin-compact .djc-account-level-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.djc-account-widget.djc-account-skin-compact .djc-account-xp-bar {
    height: 6px;
}

.djc-account-widget.djc-account-skin-arcade .djc-account-bar {
    background: linear-gradient(135deg, rgba(5, 8, 18, 0.95), rgba(10, 15, 30, 0.95));
    border: 1px solid rgba(124, 92, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35), 0 0 22px rgba(124, 92, 255, 0.35);
}

.djc-account-widget.djc-account-skin-arcade .djc-account-avatar {
    border: 2px solid rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), 0 0 14px rgba(34, 197, 94, 0.35);
}

.djc-account-widget.djc-account-skin-arcade .djc-xp-bar-fill {
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

@media (max-width: 768px) {
    .djc-account-widget {
        top: 8px !important;
        right: 8px !important;
    }

    .djc-account-bar {
        padding: 6px 8px;
        gap: 4px;
        border-radius: 14px;
    }

    .djc-account-row-top {
        gap: 6px;
    }

    .djc-account-avatar {
        width: 32px;
        height: 32px;
    }

    .djc-account-name {
        font-size: 12px;
    }

    .djc-account-xp-bar {
        min-width: 40px;
    }

    .djc-xp-bar-text {
        display: none;
    }

    .djc-account-row-bottom {
        gap: 6px;
    }

    .djc-account-panel {
        width: calc(100vw - 16px);
        right: 0;
    }
}

.djc-achievement.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.djc-achievement-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.djc-achievement-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

/* Profile card rarity ring colors */
.djc-achievement-card .djc-rarity-common { border-color: #9ca3af; }
.djc-achievement-card .djc-rarity-uncommon { border-color: #b8860b; }
.djc-achievement-card .djc-rarity-rare { border-color: #c0c0d2; }
.djc-achievement-card .djc-rarity-epic { border-color: #f59e0b; }
.djc-achievement-card .djc-rarity-legendary { border-color: #a855f7; }
.djc-achievement-card .djc-rarity-mythic { border-color: #ef4444; }

/* Leaderboard */
.djc-leaderboard {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.djc-leaderboard-header {
    background: var(--djc-primary);
    color: white;
    padding: 20px;
}

.djc-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--djc-border);
    transition: background 0.2s;
}

.djc-leaderboard-item:hover {
    background: var(--djc-light);
}

.djc-rank {
    font-size: 24px;
    font-weight: 700;
    color: var(--djc-primary);
    width: 60px;
    text-align: center;
}

.djc-rank-1 { color: #f59e0b; }
.djc-rank-2 { color: #9ca3af; }
.djc-rank-3 { color: #cd7f32; }

.djc-leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.djc-leaderboard-info {
    flex: 1;
}

.djc-leaderboard-name {
    font-weight: 600;
    margin: 0;
}

.djc-leaderboard-level {
    font-size: 12px;
    color: #6b7280;
}

.djc-leaderboard-xp {
    font-size: 18px;
    font-weight: 600;
    color: var(--djc-primary);
}

/* Notifications */
.djc-notification {
    display: flex;
    align-items: start;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--djc-primary);
    transition: background 0.2s;
}

.djc-notification:hover {
    background: var(--djc-light);
}

.djc-notification.unread {
    background: #eff6ff;
}

.djc-notification-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 50%;
}

.djc-notification-content {
    flex: 1;
}

.djc-notification-title {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.djc-notification-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.djc-notification-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .djc-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .djc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .djc-achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .djc-leaderboard-item {
        padding: 10px 15px;
    }

    .djc-rank {
        font-size: 18px;
        width: 40px;
    }
}

/* Celebration modal */
.djc-celebration-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(34, 197, 94, 0.18), transparent 45%),
                radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.18), transparent 50%),
                rgba(3, 7, 18, 0.65);
    z-index: 10060;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.djc-celebration-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.djc-celebration-card {
    position: relative;
    max-width: 440px;
    width: calc(100% - 32px);
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 26px 28px;
    color: #f8fafc;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 40px rgba(56, 189, 248, 0.2);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    animation: djcCelebrateIn 0.45s ease forwards;
}

.djc-celebration-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2), 0 0 50px rgba(59, 130, 246, 0.2);
    pointer-events: none;
}

.djc-celebration-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #38bdf8;
    margin-bottom: 10px;
}

.djc-celebration-message {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.djc-celebration-subtitle {
    font-size: 14px;
    color: rgba(248, 250, 252, 0.7);
    margin: 0;
}

.djc-celebration-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.2);
}

.djc-celebration-icon img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.djc-celebration-spark {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.8);
    filter: blur(0.2px);
    animation: djcSpark 1.8s ease-in-out infinite;
}

.djc-celebration-spark:nth-child(1) { top: -10px; left: 25%; animation-delay: 0s; }
.djc-celebration-spark:nth-child(2) { top: 12px; right: 18%; animation-delay: 0.3s; background: rgba(59, 130, 246, 0.9); }
.djc-celebration-spark:nth-child(3) { bottom: -8px; left: 30%; animation-delay: 0.6s; background: rgba(244, 114, 182, 0.9); }
.djc-celebration-spark:nth-child(4) { bottom: 6px; right: 22%; animation-delay: 0.9s; background: rgba(250, 204, 21, 0.9); }

@keyframes djcCelebrateIn {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    60% { opacity: 1; transform: scale(1.03) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes djcSpark {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

@media (max-width: 600px) {
    .djc-celebration-card {
        padding: 22px 20px;
    }

    .djc-celebration-message {
        font-size: 20px;
    }
}


/* Enhanced Avatar Widget Styles */
.djc-account-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: djc-pulse-badge 2s ease-in-out infinite;
}

@keyframes djc-pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Old XP bar overrides removed - now styled inline in the account bar */

.djc-achievement-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.djc-account-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.djc-account-item-content {
    flex: 1;
    min-width: 0;
}

.djc-rarity-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Daily Quests Grid Styling - Modern Card Design */
.djc-quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.djc-quest-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.djc-quest-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.djc-quest-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
}

.djc-quest-item:hover::before {
    opacity: 1;
}

.djc-quest-item.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(5, 150, 105, 0.05));
    border-color: rgba(34, 197, 94, 0.3);
    opacity: 0.85;
}

.djc-quest-item.completed::before {
    background: linear-gradient(180deg, #22c55e, #059669);
    opacity: 1;
}

.djc-quest-item.is-attention {
    animation: quest-pulse 2s ease-in-out infinite;
    border-color: rgba(251, 191, 36, 0.5);
}

@keyframes quest-pulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); 
    }
}

.djc-quest-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.djc-quest-item.completed .djc-quest-status {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.djc-quest-status .djc-check {
    font-size: 24px;
    line-height: 1;
}

.djc-quest-status .djc-quest-progress-text {
    position: static;
    transform: none;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.djc-quest-status .djc-claim-btn {
    background: linear-gradient(135deg, #22c55e, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.djc-quest-status .djc-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(34, 197, 94, 0.4);
}

.djc-quest-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.djc-quest-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
}

.djc-quest-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.djc-quest-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.djc-quest-start,
.djc-quest-checkin,
.djc-quest-coming-soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.djc-quest-start {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.djc-quest-start:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
}

.djc-quest-checkin {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 6px 16px;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.djc-quest-checkin:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

.djc-quest-coming-soon {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
}

.djc-quest-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.1);
}

.djc-quest-timer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .djc-quest-item {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .djc-quest-reward {
        width: 100%;
        margin-top: 8px;
    }
}

.djc-quest-progress-bar {
    position: relative;
    height: 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 7px;
    overflow: hidden;
    margin-top: 4px;
}

.djc-quest-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.djc-quest-progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 600;
    color: white;
    z-index: 2;
}

/* Skeleton Loading */
.djc-rank-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.djc-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: djc-skeleton-loading 1.5s ease-in-out infinite;
}

.djc-skeleton-line:nth-child(1) { width: 85%; }
.djc-skeleton-line:nth-child(2) { width: 70%; }
.djc-skeleton-line:nth-child(3) { width: 90%; }

@keyframes djc-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.djc-account-best-ranks.loaded .djc-rank-skeleton {
    display: none;
}

.djc-account-best-ranks:not(.loaded) .djc-account-best-ranks-list > :not(.djc-rank-skeleton) {
    display: none;
}
