/* Tier System Styles */
.tier-display {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.tier-header:hover {
    background-color: var(--bg-secondary);
}

.tier-dropdown-arrow {
    margin-left: auto;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.tier-details {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Profile popup scrolling - overlay scrollbar */
.profile-popup {
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    padding-right: 0;
}

.profile-popup::-webkit-scrollbar {
    width: 6px;
    position: absolute;
}

.profile-popup::-webkit-scrollbar-track {
    background: transparent;
}

.profile-popup::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.profile-popup::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.profile-popup::-webkit-scrollbar-corner {
    background: transparent;
}

.profile-content {
    overflow-y: visible;
    padding-right: 1rem;
    margin-right: 0;
}

.tier-badge {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.tier-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, #FFD700, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #DDA0DD, #FFD700);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

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

.tier-icon {
    width: 24px;
    height: 24px;
}

.tier-emoji {
    font-size: 1.5rem;
}

.tier-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tier-points {
    margin: 0.1rem 0 0 0;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.tier-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tier-benefits {
    margin-bottom: 1rem;
}

.tier-benefits h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tier-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tier-benefits li {
    padding: 0.2rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.8rem;
}

.tier-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 0.7rem;
}

.tier-ladder h4 {
    margin: 0 0 0.6rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.tier-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.3rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 65px;
    opacity: 0.6;
}

.tier-item.unlocked {
    opacity: 1;
    border-color: var(--border-color);
}

.tier-item.current {
    border-color: #e91e63;
    background: rgba(233, 30, 99, 0.1);
    transform: scale(1.05);
}

.mini-tier-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 0.15rem;
}

.mini-tier-emoji {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.tier-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.1rem;
}

.tier-requirement {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
}

/* Dark mode adjustments */
[data-theme="dark"] .tier-display {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .tier-badge {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .progress-bar {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .tier-item {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .tier-item.current {
    background: rgba(233, 30, 99, 0.2);
}

/* Tiers Page Styles */
.tiers-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tiers-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.tiers-hero h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tiers-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.user-tier-status {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.tiers-progression {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.tiers-progression::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 40px;
    bottom: 40px;
    width: 4px;
    background: linear-gradient(180deg, #CD7F32, #C0C0C0, #FFD700, #E5E4E2, #B9F2FF, #4A4A4A);
    border-radius: 2px;
    z-index: 1;
}

.tier-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.tier-item:hover {
    transform: scale(1.02);
}

.tier-connector {
    position: absolute;
    left: 42px;
    top: 50%;
    width: 60px;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.tier-badge-container {
    position: relative;
    z-index: 3;
    margin-left: 0;
    margin-right: 2rem;
    flex-shrink: 0;
}

.tier-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid;
    background: var(--card-bg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.tier-badge::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 0deg, currentColor, transparent, currentColor);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    animation: rotate 3s linear infinite;
}

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

.bronze-badge { border-color: #CD7F32; color: #CD7F32; }
.silver-badge { border-color: #C0C0C0; color: #C0C0C0; }
.gold-badge { border-color: #FFD700; color: #FFD700; }
.platinum-badge { border-color: #E5E4E2; color: #E5E4E2; }
.diamond-badge { border-color: #B9F2FF; color: #B9F2FF; }
.adamantium-badge { border-color: #4A4A4A; color: #4A4A4A; }

.tier-badge img {
    width: 40px;
    height: 40px;
    z-index: 2;
    position: relative;
}

.tier-content {
    flex: 1;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.tier-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
}

.bronze .tier-content::before { background: linear-gradient(90deg, #CD7F32, #B8860B); }
.silver .tier-content::before { background: linear-gradient(90deg, #C0C0C0, #A8A8A8); }
.gold .tier-content::before { background: linear-gradient(90deg, #FFD700, #FFA500); }
.platinum .tier-content::before { background: linear-gradient(90deg, #E5E4E2, #D3D3D3); }
.diamond .tier-content::before { background: linear-gradient(90deg, #B9F2FF, #87CEEB); }
.adamantium .tier-content::before { background: linear-gradient(90deg, #4A4A4A, #2F2F2F); }

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

.tier-header h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.tier-level {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tier-range {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.tier-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.benefit-item:hover {
    background: var(--border-color);
    transform: translateX(5px);
}

.benefit-item i {
    color: var(--text-primary);
    width: 16px;
    text-align: center;
}

.benefit-item.coupon {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1), rgba(233, 30, 99, 0.05));
    border: 1px solid rgba(233, 30, 99, 0.2);
    color: #e91e63;
    font-weight: 600;
}

.benefit-item.coupon i {
    color: #e91e63;
}

.tier-item.current-tier .tier-content {
    border: 2px solid #e91e63;
    box-shadow: 0 0 30px rgba(233, 30, 99, 0.3);
    transform: scale(1.02);
}

.tier-item.current-tier .tier-badge {
    border-color: #e91e63;
    box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
}

.tier-item.current-tier .tier-content::after {
    content: 'Your Current Tier';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e91e63;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tier-progression {
    text-align: center;
    margin-top: 4rem;
}

.tier-progression h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.progression-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step i {
    font-size: 3rem;
    color: #e91e63;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Clickable tier display */
.tier-display {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tier-display:hover {
    transform: scale(1.02);
}

.tier-display::after {
    content: 'Click to view all tiers';
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tier-display:hover::after {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tier-display {
        padding: 1rem;
    }
    
    .tier-header {
        gap: 0.75rem;
    }
    
    .tier-badge {
        width: 50px;
        height: 50px;
    }
    
    .tier-icon {
        width: 28px;
        height: 28px;
    }
    
    .tier-emoji {
        font-size: 1.5rem;
    }
    
    .tier-info h3 {
        font-size: 1.1rem;
    }
    
    .tier-list {
        gap: 0.5rem;
    }
    
    .tier-item {
        min-width: 70px;
        padding: 0.5rem 0.25rem;
    }
    
    .mini-tier-icon {
        width: 20px;
        height: 20px;
    }
    
    .mini-tier-emoji {
        font-size: 1rem;
    }
    
    .tier-label {
        font-size: 0.7rem;
    }
    
    .tier-requirement {
        font-size: 0.6rem;
    }
    
    .tiers-page {
        padding: 1rem;
    }
    
    .tiers-hero h1 {
        font-size: 2rem;
    }
    
    .tiers-progression::before {
        left: 20px;
    }
    
    .tier-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2rem;
    }
    
    .tier-connector {
        display: none;
    }
    
    .tier-badge-container {
        margin: 0 0 1rem 0;
        align-self: flex-start;
    }
    
    .tier-content {
        margin-left: 1rem;
        width: calc(100% - 1rem);
    }
    
    .tier-connector {
        left: 22px;
        width: 40px;
    }
    
    .tier-benefits {
        grid-template-columns: 1fr;
    }
    
    .progression-steps {
        grid-template-columns: 1fr;
    }
}