/* Custom styles for TaskTon app */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Header gradient with wave animation */
.header-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    position: relative;
    overflow: hidden;
}

/* Wave animation container */
.wave-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Wave animations */
.wave {
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: wave 3s linear infinite;
}

.wave1 {
    animation-delay: 0s;
}

.wave2 {
    animation-delay: 1s;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

.wave3 {
    animation-delay: 2s;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

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

/* Premium checkmark styling */
.premium-checkmark {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* VIP button animation */
.vip-button {
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.vip-button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

/* Fixed Balance Card Styling */
.balance-card-fixed {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: none !important;
    transform: none !important;
    position: relative;
    z-index: 30;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.balance-card-fixed:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.balance-card-fixed:active {
    transform: none !important;
}

/* Ensure mobile-first responsive design */
@media (max-width: 768px) {
    .max-w-md {
        max-width: 100vw;
        width: 100vw;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Button hover effects */
button {
    transition: all 0.3s ease-in-out;
}

button:hover {
    transform: scale(0.98);
}

button:active {
    transform: scale(0.95);
}

/* Task item hover effect */
.task-item {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Withdraw button animation */
.withdraw-btn {
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.withdraw-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Navigation button styling - NO BLUE HIGHLIGHT */
.nav-button {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.nav-button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.nav-button:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Navigation icon and text styling */
.nav-icon-home {
    background: #1f2937 !important;
    border-radius: 0.5rem !important;
}

.nav-icon-team {
    background: transparent !important;
}

.nav-text-home {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

.nav-text-team {
    color: #9ca3af !important;
}

/* Team active state */
.nav-icon-team.active {
    background: #1f2937 !important;
    border-radius: 0.5rem !important;
}

.nav-icon-team.active svg {
    color: white !important;
}

.nav-text-team.active {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Home inactive state */
.nav-icon-home.inactive {
    background: transparent !important;
}

.nav-icon-home.inactive svg {
    color: #9ca3af !important;
}

.nav-text-home.inactive {
    color: #9ca3af !important;
    font-weight: normal !important;
}

/* Remove all focus styles from buttons */
button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

button:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Fixed bottom navigation styling */
.fixed-bottom-nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Task list scrollable area */
.task-list-container {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive text sizing */
@media (max-width: 375px) {
    .text-xl {
        font-size: 1.125rem;
    }
    
    .text-lg {
        font-size: 1rem;
    }
}

/* Touch-friendly button sizing */
button, .clickable {
    min-height: 44px;
    min-width: 44px;
}

/* Prevent text selection on interactive elements */
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Loading animation for buttons */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Ensure proper viewport handling */
.main-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* iOS Safari viewport fix */
@supports (-webkit-touch-callout: none) {
    .main-container {
        min-height: -webkit-fill-available;
    }
}

/* Modal animations */
#withdrawalModal, #postModal {
    animation: fadeIn 0.3s ease-out;
}

#withdrawalModal.hidden, #postModal.hidden {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Modal content animation */
#withdrawalModal .bg-white, #postModal .bg-white {
    animation: slideUp 0.3s ease-out;
}

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

/* Star icon glow effect */
.star-glow {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
    animation: starGlow 2s ease-in-out infinite alternate;
}

@keyframes starGlow {
    from {
        filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
    }
    to {
        filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
    }
}

/* Premium icon styling */
.premium-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.premium-icon:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.1);
}

/* Shimmer effect for loading states */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Enhanced task item styling */
.task-item {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.task-item:hover {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

/* Improved button styling */
.premium-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
}

.premium-button:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

/* Team page styling */
.team-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Remove all browser default focus styles */
* {
    outline: none !important;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

*:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Specific navigation button styling */
#homeBtn, #teamBtn {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

#homeBtn:focus, #teamBtn:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

#homeBtn:active, #teamBtn:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* POST Modal specific styling */
#postModal textarea {
    resize: none;
    font-family: inherit;
}

#postModal textarea:focus {
    outline: none;
    border-color: #f59e0b;
}

/* Prevent balance card from moving */
.balance-card-fixed * {
    pointer-events: auto;
}

.balance-card-fixed {
    pointer-events: auto;
}

