/* TopEarnWays - Enhanced CSS with Tailwind Support */
/* This file provides custom styles and works with Tailwind CDN */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Background - Critical for login/register pages */
body {
    background: linear-gradient(to bottom right, #581c87, #1e3a8a, #312e81) !important;
    min-height: 100vh !important;
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* Ensure body background is always applied */
body.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #581c87, #1e3a8a, #312e81) !important;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-slide-down {
    animation: slideUp 0.5s ease-out reverse;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-counter {
    animation: countUp 1s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 3D Card Effect - Replaces Glass */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-4px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #22d3ee, #3b82f6, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-gradient {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    transform: scale(1);
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-gradient:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(to right, #3b82f6, #9333ea);
}

.btn-secondary {
    background: linear-gradient(to right, #4ade80, #06b6d4);
}

/* Stat Cards - 3D Style */
.stat-card {
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: perspective(1000px) rotateX(0deg);
}

.stat-card:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive Fixes */
@media (max-width: 640px) {
    .text-6xl {
        font-size: 2.5rem;
    }
    
    .text-8xl {
        font-size: 3.5rem;
    }
    
    .btn-gradient {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .glass-card {
        padding: 16px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .text-6xl {
        font-size: 4rem;
    }
    
    .text-8xl {
        font-size: 5rem;
    }
}

/* Ensure proper spacing */
.min-h-screen {
    min-height: 100vh;
}

/* Fix for gradient backgrounds */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Group hover effects */
.group:hover .group-hover\:scale-125 {
    transform: scale(1.25);
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Transition utilities */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Hover scale */
.hover\:scale-110:hover {
    transform: scale(1.1);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Cursor pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Z-index */
.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* Position utilities */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Grid utilities */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Spacing */
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-16 {
    margin-top: 4rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Max width */
.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Height */
.h-1 {
    height: 0.25rem;
}

/* Border radius */
.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-20 {
    opacity: 0.2;
}

/* Responsive breakpoints */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:text-8xl {
        font-size: 6rem;
        line-height: 1;
    }
    
    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Additional responsive fixes */
@media (max-width: 640px) {
    .text-6xl {
        font-size: 2rem !important;
    }
    
    .text-8xl {
        font-size: 3rem !important;
    }
    
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mb-16 {
        margin-bottom: 2rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }
}

/* Ensure proper display */
.flex {
    display: flex !important;
}

.grid {
    display: grid !important;
}

/* Fix for gradient backgrounds */
.from-purple-900 {
    --tw-gradient-from: #581c87;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(88, 28, 135, 0));
}

.via-blue-900 {
    --tw-gradient-to: rgba(30, 58, 138, 0);
    --tw-gradient-stops: var(--tw-gradient-from), #1e3a8a, var(--tw-gradient-to);
}

.to-indigo-900 {
    --tw-gradient-to: #312e81;
}

.from-cyan-400 {
    --tw-gradient-from: #22d3ee;
}

.via-blue-500 {
    --tw-gradient-stops: var(--tw-gradient-from), #3b82f6, var(--tw-gradient-to);
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

/* Additional input field styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none !important;
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3) !important;
}

/* Space utilities for forms */
.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Full width utility */
.w-full {
    width: 100%;
}

/* Max width */
.max-w-md {
    max-width: 28rem;
}

/* Padding utilities */
.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

/* Text color utilities */
.text-white\/70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-cyan-400 {
    color: #22d3ee;
}

.text-cyan-300 {
    color: #67e8f9;
}

.text-red-400 {
    color: #f87171;
}

.hover\:text-cyan-300:hover {
    color: #67e8f9;
}

/* Block display */
.block {
    display: block;
}

/* Text center */
.text-center {
    text-align: center;
}

/* Margin utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

/* Text size */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

/* Activation Required Button - Blinking */
@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-blink {
    animation: blink 1.5s ease-in-out infinite;
}

.activation-required-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, #f59e0b, #ef4444);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.3s;
}

.activation-required-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* Mobile Responsive Dashboard */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .text-4xl {
        font-size: 1.5rem;
    }
    
    .text-3xl {
        font-size: 1.25rem;
    }
    
    .text-2xl {
        font-size: 1.125rem;
    }
    
    .grid {
        gap: 0.75rem;
    }
    
    .glass-card {
        padding: 1rem;
    }
    
    .activation-required-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Sidebar Mobile Styles */
@media (max-width: 768px) {
    .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .sidebar-link span:last-child {
        display: inline;
    }
}

/* Ensure sidebar is hidden on mobile by default */
@media (max-width: 768px) {
    aside {
        transform: translateX(-100%);
    }
    
    aside.translate-x-0 {
        transform: translateX(0);
    }
}

/* 3D Card Styling - Professional & Modern */
.card-3d {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-3d::before {
    content: \ \;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-4px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-card-3d {
    padding: 24px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.action-card-3d {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card-3d:hover {
    transform: perspective(1000px) rotateY(5deg) translateY(-6px) scale(1.05);
    box-shadow: 
        0 16px 56px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Professional Activation Button - 3D Style */
.activation-required-btn-3d {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 
        0 8px 24px rgba(245, 158, 11, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s ease-in-out infinite;
}

.activation-required-btn-3d::before {
    content: \\;
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.activation-required-btn-3d:hover::before {
    left: 100%;
}

.activation-required-btn-3d:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(245, 158, 11, 0.6),
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.activation-required-btn-3d:active {
    transform: perspective(1000px) rotateX(0deg) translateY(0);
    box-shadow: 
        0 4px 12px rgba(245, 158, 11, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.activation-icon {
    font-size: 1.5rem;
    animation: rotate-icon 3s ease-in-out infinite;
}

.activation-text {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.activation-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.activation-required-btn-3d:hover .activation-arrow {
    transform: translateX(4px);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(245, 158, 11, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(245, 158, 11, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 20px rgba(245, 158, 11, 0.4);
    }
}

@keyframes rotate-icon {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* Remove old glass-card styles, replace with 3D */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobile responsive for 3D cards */
@media (max-width: 768px) {
    .card-3d {
        border-radius: 12px;
        padding: 16px;
    }
    
    .stat-card-3d {
        padding: 16px;
        min-height: 120px;
    }
    
    .action-card-3d {
        min-height: 80px;
        padding: 12px;
    }
    
    .activation-required-btn-3d {
        padding: 12px 24px;
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .activation-icon {
        font-size: 1.2rem;
    }
    
    .activation-text {
        font-size: 0.95rem;
    }
}

/* HELASMART Style Dashboard */
body.bg-gray-50 {
    background-color: #f9fafb;
}

/* Earnings Cards */
.bg-white {
    background-color: white;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.border-l-4 {
    border-left-width: 4px;
}

/* Sidebar Styles */
.bg-white {
    background-color: white;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-500 {
    color: #6b7280;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.text-purple-600 {
    color: #9333ea;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .p-6 {
        padding: 1rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
}
