/**
 * STYLES POUR LA PAGE PALIERS - MODE STREAMLABS
 * Goalbar dynamiques, top donateurs, timeline
 */

/* ============================================
   DONATION GOALS GLOBAUX
   ============================================ */
.global-goals-header {
    text-align: center;
    margin-bottom: 1rem;
}

.global-goals-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

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

.global-goal-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.global-goal-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.global-goal-item.reached {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.global-goal-item .goal-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}

.global-goal-item.reached .goal-amount {
    color: #10b981;
}

.global-goal-item .goal-content {
    flex: 1;
}

.global-goal-item .goal-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.3;
}

.global-goal-item .goal-badge {
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ============================================
   TOP DONATEURS - LEADERBOARD
   ============================================ */
.donors-leaderboard {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.donor-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.donor-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 111, 177, 0.2);
}

.donor-card.top-donor {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 111, 177, 0.1));
    border-color: #FFD700;
}

.donor-rank {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.donor-card.top-donor .donor-rank {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.donor-info {
    flex: 1;
}

.donor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.donor-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.donor-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

/* ============================================
   GOALBAR PAR STREAMER - STYLE ZEVENT
   ============================================ */
.streamers-goals-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
}

.streamer-goal-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeInScale 0.5s ease forwards;
    opacity: 0;
}

.streamer-goal-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 111, 177, 0.2);
}

.streamer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.streamer-avatar {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden !important;
    flex-shrink: 0;
    border: 3px solid var(--border);
    position: relative;
}

.streamer-avatar img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.streamer-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.toggle-goals-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-goals-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.toggle-goals-btn.expanded {
    transform: rotate(180deg);
}

/* Donation Goals List */
.donation-goals-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donation-goal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.donation-goal-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.donation-goal-item.reached {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.donation-goal-item .goal-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: right;
}

.donation-goal-item.reached .goal-amount {
    color: #10b981;
}

.donation-goal-item .goal-content {
    flex: 1;
}

.donation-goal-item .goal-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.donation-goal-item .goal-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.donation-goal-item .goal-badge {
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.streamer-progress-container {
    width: 100%;
}

.streamer-progress {
    position: relative;
    margin-bottom: 0.75rem;
}

.streamer-progress .progress-bar {
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border);
    position: relative;
}

.streamer-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    position: relative;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.streamer-progress .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.streamer-progress .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
    white-space: nowrap;
}

.streamer-amount-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.streamer-amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.streamer-goal-amount {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.streamer-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.streamer-stats span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================
   TIMELINE DONATIONS RÉCENTES
   ============================================ */
.donations-timeline {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 1rem;
}

.donations-timeline::-webkit-scrollbar {
    width: 8px;
}

.donations-timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.donations-timeline::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.donation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.donation-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.donation-icon {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.donation-content {
    flex: 1;
}

.donation-user {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.donation-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.donation-meta {
    text-align: right;
}

.donation-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.donation-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   ÉTATS
   ============================================ */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 111, 177, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #ff4444;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header h2 {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .streamers-goals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .donor-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .donor-rank {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .donor-name {
        font-size: 1.1rem;
    }
    
    .donor-amount {
        font-size: 1.25rem;
    }
    
    .donation-item {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .donation-icon {
        font-size: 1.5rem;
        min-width: 30px;
    }
    
    .streamer-goal-card {
        padding: 1.5rem;
    }
    
    .streamer-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .streamer-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .donors-leaderboard {
        gap: 0.75rem;
    }
    
    .donor-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .donor-info {
        width: 100%;
    }
    
    .donation-item {
        flex-direction: column;
        text-align: center;
    }
    
    .donation-meta {
        text-align: center;
    }
}
