/* Color Scheme: Soft White (#f2f2f2) and Soft Black (#121314) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --soft-white: #f2f2f2;
    --soft-black: #121314;
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #121314 0%, #2a2b2c 100%);
    --gradient-secondary: linear-gradient(135deg, #f2f2f2 0%, #e8e8e8 100%);
    --shadow-light: 0 4px 20px rgba(18, 19, 20, 0.1);
    --shadow-medium: 0 8px 30px rgba(18, 19, 20, 0.15);
    --shadow-heavy: 0 15px 50px rgba(18, 19, 20, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--soft-white);
    color: var(--soft-black);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

body.chat-open {
    overflow-x: hidden !important;
}

main, .page-content, .modern-hero, .hero-grid, .container {
    transform: none !important;
    transition: transform 0s !important;
}




.hero-live-earnings {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    z-index: 4;
}

.live-earnings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(18, 19, 20, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 80% 50%, rgba(18, 19, 20, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.live-earnings-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.earnings-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.live-earnings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--soft-black);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.live-earnings-header h2 i {
    color: var(--soft-black);
    animation: none;
}

.refresh-indicator {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(18, 19, 20, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.refresh-indicator:hover {
    opacity: 1;
    transform: scale(1.05);
}

.refresh-indicator.spinning i {
    animation: spin 1s linear infinite;
}

.refresh-indicator i {
    color: var(--soft-black);
    font-size: 0.75rem;
}

.live-earnings-header p {
    font-size: 0.9rem;
    color: #666;
}

.live-earnings-feed {
    background: transparent;
    border-radius: 15px;
    padding: 1rem;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
}

.earnings-container {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    min-width: max-content;
}

.live-earnings-feed::-webkit-scrollbar {
    height: 6px;
}

.live-earnings-feed::-webkit-scrollbar-track {
    background: rgba(18, 19, 20, 0.05);
    border-radius: 3px;
}

.live-earnings-feed::-webkit-scrollbar-thumb {
    background: rgba(18, 19, 20, 0.2);
    border-radius: 3px;
}

.live-earnings-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(18, 19, 20, 0.3);
}

.earnings-loading {
    text-align: center;
    padding: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.earnings-loading i {
    font-size: 1.2rem;
    color: var(--soft-black);
    animation: spin 1s linear infinite;
}

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

/* Loading shimmer effect */
.earning-skeleton {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    min-width: 200px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(18, 19, 20, 0.08);
    text-align: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.earning-skeleton::before {
    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 1.5s infinite;
}

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

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    margin: 0 auto 1rem;
}

.skeleton-text {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
    margin: 0 auto;
}

.earning-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 120px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(18, 19, 20, 0.08);
    animation: slideInRight 0.5s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    flex-shrink: 0;
    margin: 0.25rem 0;
    transition: box-shadow 0.3s ease;
}

.earning-item:hover {
    box-shadow: var(--shadow-medium);
}

.earning-item:nth-child(1) { animation-delay: 0.1s; }
.earning-item:nth-child(2) { animation-delay: 0.2s; }
.earning-item:nth-child(3) { animation-delay: 0.3s; }
.earning-item:nth-child(4) { animation-delay: 0.4s; }
.earning-item:nth-child(5) { animation-delay: 0.5s; }

.earning-item.new-earning {
    animation: newEarningPulse 0.6s ease;
}

@keyframes newEarningPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Removed top border for cleaner look */

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

.earning-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(18, 19, 20, 0.1);
    background: #f8f9fa;
    margin: 0 auto;
}

.earning-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.earning-avatar-fallback {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.earning-username {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--soft-black);
    margin-bottom: 0.1rem;
}

.earning-amount {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
    line-height: 1.3;
}

/* Modern Hero Section */
.modern-hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 100px 0;
    overflow: hidden;
}

/* Ensure hero section doesn't interfere with chat */
.page-content {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    transform: none !important;
    transition: none !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--soft-white);
    z-index: 1;
    transition: background 0.3s ease;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(18, 19, 20, 0.03) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(18, 19, 20, 0.03) 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--soft-black);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    border: 1px solid rgba(18, 19, 20, 0.05);
}

.hero-badge i {
    color: #ffd700;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--soft-black);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(18, 19, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(18, 19, 20, 0.4);
    background: linear-gradient(135deg, #2a2b2c 0%, #121314 100%);
}

.btn-outline {
    background: white;
    color: var(--soft-black);
    border: 2px solid rgba(18, 19, 20, 0.1);
    box-shadow: var(--shadow-light);
}

.btn-outline:hover {
    background: var(--soft-black);
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--soft-black);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Hero Visual Cards */
.hero-visual {
    position: relative;
    height: 500px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.visual-card {
    position: absolute;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(18, 19, 20, 0.05);
}

.main-card {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    padding: 2rem;
    z-index: 3;
}

.secondary-card {
    top: 10%;
    right: -5%;
    width: 180px;
    padding: 1.5rem;
    z-index: 2;
    animation-delay: 0.5s;
}

.tertiary-card {
    bottom: 10%;
    left: -5%;
    width: 180px;
    padding: 1.5rem;
    z-index: 2;
    animation-delay: 0.7s;
}

.quaternary-card {
    bottom: 5%;
    right: -10%;
    width: 180px;
    padding: 1.5rem;
    z-index: 2;
    animation-delay: 0.8s;
}

/* Recent Earner Cards */
.recent-earner-card {
    padding: 1rem;
}

.recent-earner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.earner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(18, 19, 20, 0.1);
    background: #f8f9fa;
    flex-shrink: 0;
}

.earner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.earner-avatar-fallback {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.earner-info {
    flex: 1;
    min-width: 0;
}

.earner-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--soft-black);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.earner-amount {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}



.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--soft-black);
}

.card-header i {
    color: #ffd700;
    font-size: 1.2rem;
}

.earning-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--soft-black);
}

.earning-growth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 500;
}

.earning-growth i {
    font-size: 0.8rem;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mini-stat i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.mini-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--soft-black);
    line-height: 1;
}

.mini-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    animation: fadeInUp 0.8s ease 1.2s both;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(18, 19, 20, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--soft-black);
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Removed pulse animation for professional look */

/* Responsive Design */
@media (max-width: 768px) {
    .live-earnings-section {
        padding: 40px 0 30px;
    }

    .live-earnings-header h2 {
        font-size: 1.25rem;
    }

    .live-earnings-feed {
        padding: 0.75rem;
        max-height: 200px;
    }

    .modern-hero {
        min-height: 80vh;
        padding: 80px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
        max-width: none;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-visual {
        height: 300px;
        order: -1;
    }

    .main-card {
        width: 240px;
        padding: 1.5rem;
    }

    .secondary-card,
    .tertiary-card {
        width: 150px;
        padding: 1rem;
    }

    .amount {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .earning-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .earning-left {
        width: 100%;
    }

    .earning-time {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .live-earnings-header h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }

    .hero-visual {
        height: 250px;
    }

    .main-card {
        width: 200px;
        padding: 1.2rem;
    }

    .secondary-card,
    .tertiary-card {
        width: 130px;
        padding: 0.8rem;
    }

    .amount {
        font-size: 2rem;
    }

    .mini-number {
        font-size: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }
}

/* Section Styles */
section {
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--soft-black);
    margin-bottom: 1rem;
}

/* Chat Sidebar Compatibility Fixes for Dashboard */
/* Prevent layout collapse when chat opens */
body.chat-open {
    overflow-x: hidden !important;
    position: relative !important;
}

body.chat-open .page-content,
body.chat-open main {
    transform: none !important;
    transition: none !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body.chat-open .modern-hero {
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

body.chat-open .hero-grid {
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

body.chat-open .container {
    transform: none !important;
    width: 100% !important;
    max-width: 1200px !important;
    position: relative !important;
    margin: 0 auto !important;
}

/* Ensure dashboard layout stays stable */
.modern-hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
}

/* Prevent horizontal scrolling issues */
.hero-visual,
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

/* Fix for mobile when chat is open */
@media (max-width: 768px) {
    body.chat-open .page-content {
        transform: none !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    body.chat-open .modern-hero {
        transform: none !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    body.chat-open .hero-grid {
        transform: none !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}