/**
 * STYLES COMMUNS POUR LA PAGE PALIERS
 * Utilisé par les modes Tipeeestream ET Streamlabs
 */

/* ============================================
   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
   ============================================ */
.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 {
    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);
    }
}

/* ============================================
   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 {
        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 !important;
        height: 50px !important;
        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;
    }
}


/* ========================================
   SECTION HERO - BARRE DE PROGRESSION
   ======================================== */

.hero-progress-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, 
        rgba(255, 111, 177, 0.1) 0%, 
        rgba(165, 107, 255, 0.1) 50%,
        rgba(255, 143, 196, 0.1) 100%
    );
    border-radius: 24px;
    padding: 3rem;
    border: 2px solid rgba(255, 111, 177, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-progress-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 111, 177, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(165, 107, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-progress-container {
    margin-bottom: 2rem;
}

.progress-bar-hero {
    position: relative;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    overflow: visible;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.progress-fill-hero {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, 
        #ff6fb1 0%, 
        #c084fc 50%, 
        #a56bff 100%
    );
    border-radius: 30px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1.5rem;
    box-shadow: 0 4px 16px rgba(255, 111, 177, 0.4);
    overflow: hidden;
}

.progress-fill-hero::before {
    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-hero 3s infinite;
}

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

.progress-fill-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.progress-amount-label {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
}

/* Marqueurs de paliers */
.progress-milestone {
    position: absolute;
    bottom: -22px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.milestone-marker {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-milestone:hover .milestone-marker {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    transform: scale(1.3);
}

.milestone-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* Marqueurs atteints */
.progress-milestone.reached .milestone-marker {
    background: linear-gradient(135deg, #10b981, #34d399);
    border-color: #10b981;
    animation: pulse-milestone 2s ease-in-out infinite;
}

@keyframes pulse-milestone {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.progress-milestone.reached .milestone-label {
    color: #10b981;
    font-weight: 700;
}

/* Informations de progression */
.hero-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-value-hero {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #ff6fb1, #a56bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label-hero {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.progress-percentage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 111, 177, 0.1);
    border-radius: 16px;
    border: 2px solid rgba(255, 111, 177, 0.3);
}

.percentage-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.percentage-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animation d'objectif atteint */
.hero-progress-section.goal-reached .progress-fill-hero {
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #34d399 50%, 
        #6ee7b7 100%
    );
}

/* ========================================
   RESPONSIVE HERO
   ======================================== */

@media (max-width: 768px) {
    .hero-progress-section {
        padding: 2rem;
    }
    
    .progress-bar-hero {
        height: 50px;
    }
    
    .progress-amount-label {
        font-size: 1.2rem;
        padding-right: 1rem;
    }
    
    .hero-progress-info {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .progress-percentage {
        order: -1;
        width: 100%;
    }
    
    .stat-value-hero {
        font-size: 1.75rem;
    }
    
    .percentage-value {
        font-size: 2.5rem;
    }
    
    .milestone-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-progress-section {
        padding: 1.5rem;
    }
    
    .progress-bar-hero {
        height: 40px;
    }
    
    .progress-amount-label {
        font-size: 1rem;
    }
    
    .stat-value-hero {
        font-size: 1.5rem;
    }
    
    .percentage-value {
        font-size: 2rem;
    }
}
