@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-effect:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.alien-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.stats-counter {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    font-variant-numeric: tabular-nums;
}

.stats-counter:hover {
    transform: scale(1.15);
    text-shadow: 0 0 20px currentColor;
    filter: brightness(1.3);
    animation: pulse-glow 0.6s ease-in-out;
}

.stats-counter:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

@keyframes pulse-glow {
    0%, 100% { 
        text-shadow: 0 0 20px currentColor; 
    }
    50% { 
        text-shadow: 0 0 30px currentColor, 0 0 40px currentColor; 
    }
}

.alien-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

.app-card {
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3), 0 0 20px rgba(102, 126, 234, 0.1);
}

.app-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Custom Scrollbar */

.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 114, 128, 0.5) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background-color: rgba(107, 114, 128, 0.5);
    border-radius: 2px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background-color: rgba(107, 114, 128, 0.7);
}

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progressFlow 120s linear forwards !important;
}

.progress-bar-extended {
    animation: progressFlowExtended 300s linear forwards;
}

@keyframes progressFlow {
    0% { width: 5% !important; }
    10% { width: 15% !important; }
    20% { width: 25% !important; }
    30% { width: 35% !important; }
    40% { width: 45% !important; }
    50% { width: 55% !important; }
    60% { width: 65% !important; }
    70% { width: 75% !important; }
    80% { width: 82% !important; }
    90% { width: 88% !important; }
    95% { width: 92% !important; }
    100% { width: 95% !important; }
}

@keyframes progressFlowExtended {
    0% { width: 5%; }
    8.33% { width: 15%; } /* 25s */
    16.67% { width: 25%; } /* 50s */
    25% { width: 35%; } /* 75s */
    33.33% { width: 45%; } /* 100s */
    41.67% { width: 55%; } /* 125s */
    50% { width: 65%; } /* 150s */
    58.33% { width: 72%; } /* 175s */
    66.67% { width: 78%; } /* 200s */
    75% { width: 83%; } /* 225s */
    83.33% { width: 87%; } /* 250s */
    91.67% { width: 90%; } /* 275s */
    100% { width: 93%; } /* 300s */
}

.progress-text-animated {
    animation: progressText 120s linear forwards;
}

.progress-text-extended {
    animation: progressTextExtended 300s linear forwards;
}

@keyframes progressText {
    0% { opacity: 1; }
    5% { opacity: 0; }
    6% { opacity: 1; }
    15% { opacity: 0; }
    16% { opacity: 1; }
    25% { opacity: 0; }
    26% { opacity: 1; }
    35% { opacity: 0; }
    36% { opacity: 1; }
    45% { opacity: 0; }
    46% { opacity: 1; }
    55% { opacity: 0; }
    56% { opacity: 1; }
    65% { opacity: 0; }
    66% { opacity: 1; }
    75% { opacity: 0; }
    76% { opacity: 1; }
    85% { opacity: 0; }
    86% { opacity: 1; }
    95% { opacity: 0; }
    96% { opacity: 1; }
}

@keyframes progressTextExtended {
    0% { opacity: 1; }
    2% { opacity: 0; }
    3% { opacity: 1; }
    8% { opacity: 0; }
    9% { opacity: 1; }
    15% { opacity: 0; }
    16% { opacity: 1; }
    25% { opacity: 0; }
    26% { opacity: 1; }
    35% { opacity: 0; }
    36% { opacity: 1; }
    50% { opacity: 0; }
    51% { opacity: 1; }
    65% { opacity: 0; }
    66% { opacity: 1; }
    80% { opacity: 0; }
    81% { opacity: 1; }
    95% { opacity: 0; }
    96% { opacity: 1; }
}

/* Top Supporters Styling */
.supporter-rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.supporter-rank-silver {
    background: linear-gradient(135deg, #c0c0c0, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.supporter-rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.supporter-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.supporter-item:hover::before {
    left: 100%;
}

.supporter-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(102, 126, 234, 0.5);
}

.supporter-amount {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.supporter-item:hover .supporter-amount {
    transform: scale(1.05);
    text-shadow: 0 0 10px currentColor;
}

.supporter-message {
    max-width: 200px;
    line-height: 1.3;
}

/* Enhanced scrollbar for supporters */
.supporters-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.supporters-scroll::-webkit-scrollbar {
    width: 6px;
}

.supporters-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.supporters-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-radius: 3px;
    transition: background 0.3s ease;
}

.supporters-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

/* Loading animation for supporters */
.supporter-loading {
    animation: supporterPulse 1.5s ease-in-out infinite;
}

@keyframes supporterPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Trophy glow effect */
.trophy-glow {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    animation: trophyGlow 2s ease-in-out infinite alternate;
}

@keyframes trophyGlow {
    from {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }
}

/* Supporter Tabs */
.supporter-tab {
    background: transparent;
    color: rgba(156, 163, 175, 0.8);
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.supporter-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.supporter-tab.active {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    position: relative;
}

.supporter-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 1px 1px 0 0;
}

/* Compact supporter layout */
.supporter-compact {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.supporter-compact:hover::before {
    left: 100%;
}

.supporter-compact:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.06);
    border-left: 2px solid rgba(102, 126, 234, 0.4);
}

.supporter-compact:last-child {
    border-bottom: none;
}

.supporter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.supporter-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supporter-amount-compact {
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.supporter-compact:hover .supporter-amount-compact {
    transform: scale(1.05);
    text-shadow: 0 0 8px currentColor;
}

.supporter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(156, 163, 175, 0.8);
    margin-bottom: 6px;
}

.supporter-rank-compact {
    font-weight: 600;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.supporter-date {
    font-size: 0.75rem;
    color: rgba(156, 163, 175, 0.7);
}

.supporter-message-compact {
    font-size: 0.75rem;
    color: rgba(209, 213, 219, 0.8);
    font-style: italic;
    line-height: 1.3;
    margin-top: 6px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding-left: 28px;
}

.supporter-compact:hover .supporter-message-compact {
    opacity: 1;
    max-height: 40px;
}

/* Recent supporter specific styling */
.recent-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

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

/* Fixed Supporter Access Button */
.fixed-supporter-btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fixed-supporter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
}

.fixed-supporter-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .fixed-supporter-btn {
        top: 1rem !important;
        right: 1rem !important;
        padding: 0.75rem !important;
    }
    
    .fixed-supporter-btn span {
        display: none;
    }
    
    .fixed-supporter-btn i {
        margin-right: 0 !important;
    }
}

/* Modal scrolling fixes */
#request-detail-modal {
    /* Prevent body scroll when modal is open */
    overscroll-behavior: contain;
    touch-action: none;
}

#request-detail-modal .overflow-y-auto {
    /* Ensure proper scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    /* Force hardware acceleration */
    transform: translateZ(0);
    will-change: scroll-position;
}

/* Custom scrollbar for modal content */
#request-detail-modal .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
}

#request-detail-modal .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#request-detail-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 3px;
}

#request-detail-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
    transition: background 0.2s ease;
}

#request-detail-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Mobile specific modal adjustments */
@media (max-width: 640px) {
    #request-detail-modal {
        /* Ensure full viewport height on mobile */
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }
    
    #request-detail-modal .absolute {
        /* Use full height on mobile */
        height: 100%;
    }
    
    #request-detail-modal .max-h-full {
        /* Ensure modal can use full height */
        max-height: calc(100vh - 4rem);
        max-height: calc(100dvh - 4rem);
    }
    
    /* Ensure scrollable area has minimum height */
    #request-detail-modal .flex-1 {
        min-height: 0;
        flex: 1 1 0%;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    #request-detail-modal .overflow-y-auto {
        /* Better momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translate3d(0, 0, 0);
    }
}

/* Additional mobile touch fixes */
@media (hover: none) and (pointer: coarse) {
    #request-detail-modal .overflow-y-auto {
        /* Force touch scrolling on mobile devices */
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain;
    }
    
    /* Ensure modal content is properly sized */
    #request-detail-modal .flex-col {
        height: 100%;
    }
    
    /* Make sure scrollable area takes available space */
    #request-detail-modal .flex-1 {
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    #request-detail-modal .flex-1 > div {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}