/* ============================================ */
/* MAIN CUSTOM STYLES FOR TRENDCLASH */
/* ============================================ */

/* Base styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

/* Screen visibility management */
.app-screen {
    display: none;
    min-height: 100%;
    width: 100%;
}

.app-screen.visible {
    display: flex;
}

.app-screen.hidden {
    display: none;
}

/* Footer visibility management */
footer {
    display: flex;
    transition: opacity 0.3s ease;
}

footer.visible {
    display: flex;
    opacity: 1;
}

footer.hidden {
    display: none;
    opacity: 0;
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.gradient-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.2);
}

/* Accent glow effect */
.glow-accent {
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.3), 0 0 80px rgba(34, 211, 238, 0.1);
}

/* Button styles */
.btn-primary {
    background-color: #22d3ee;
    color: #0f172a;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(71, 85, 105, 0.3);
    color: #f1f5f9;
    border: 2px solid rgba(71, 85, 105, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(71, 85, 105, 0.4);
    border-color: rgba(34, 211, 238, 0.5);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary:disabled:hover {
    transform: none;
}

/* Card hover effects */
.feature-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(34, 211, 238, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 31, 58, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.8);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.9);
}

/* Text shadow for better readability */
.text-shadow-sm {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Countdown digits */
.countdown-digit {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* Touch targets for mobile */
@media (max-width: 768px) {
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Language toggle styles */
.lang-toggle {
    cursor: pointer;
    font-weight: 600;
}

.lang-toggle:hover {
    opacity: 0.8;
}

.lang-toggle.active {
    background-color: #22d3ee;
    color: #0f172a;
}

/* Responsive font scaling */
@media (max-width: 640px) {
    .responsive-heading {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .responsive-subheading {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

/* Icon container */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(34, 211, 238, 0.1);
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Rank change animation */
@keyframes rankPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.rank-changed {
    animation: rankPulse 0.5s ease-in-out;
}

/* Owner Dashboard Button Colors */
.btn-owner-primary {
    background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
    color: #0f172a;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-owner-primary::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.7s;
}

.btn-owner-primary:hover::before {
    left: 100%;
}

.btn-owner-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(34, 211, 238, 0.5);
    background: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
}

.btn-owner-secondary {
    background: rgba(71, 85, 105, 0.4);
    color: #f1f5f9;
    border: 2px solid rgba(34, 211, 238, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-owner-secondary:hover {
    transform: translateY(-2px);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.6);
    box-shadow: 0 10px 20px rgba(34, 211, 238, 0.2);
}

.btn-owner-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #475569;
}

.btn-owner-secondary:disabled:hover {
    transform: none;
    background-color: #475569;
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: none;
}

.btn-owner-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #f1f5f9;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-owner-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.btn-owner-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #0f172a;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-owner-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.btn-owner-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-owner-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

/* Owner Dashboard Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-pending {
    background-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.status-inactive {
    background-color: #64748b;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.5);
}

.status-error {
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Owner Dashboard Card Enhancements */
.owner-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(34, 211, 238, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.owner-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.1);
    transform: translateY(-5px);
}

.owner-card-header {
    border-bottom: 1px solid rgba(34, 211, 238, 0.1);
    background: rgba(34, 211, 238, 0.05);
}

/* Typography */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f1f5f9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f1f5f9;
}

p {
    color: #cbd5e1;
    line-height: 1.6;
}

/* Arabic text support */
[dir="rtl"] {
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', system-ui, sans-serif;
}

[dir="rtl"] p {
    line-height: 1.8;
}

/* Utility classes */
.text-slate-500 {
    color: #64748b;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-300 {
    color: #cbd5e1;
}

.text-slate-200 {
    color: #e2e8f0;
}

.text-slate-100 {
    color: #f1f5f9;
}

.text-cyan-400 {
    color: #22d3ee;
}

.bg-cyan-500 {
    background-color: #22d3ee;
}

.bg-slate-800 {
    background-color: #1e293b;
}

.bg-slate-900 {
    background-color: #0f172a;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin modal specific styles */
#admin-dashboard-modal .modal-content {
    width: 90% !important;
    max-width: 1200px !important;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

/* Edit User modal - higher z-index to appear above All Users modal (z-index: 9999) */
#edit-user-modal {
    z-index: 10000 !important;
}

/* Form validation styles */
input:invalid, select:invalid {
    border-color: #ef4444 !important;
}

input:valid, select:valid {
    border-color: #10b981 !important;
}

/* Price range validation */
.price-range-valid {
    color: #10b981;
}

.price-range-invalid {
    color: #ef4444;
}

/* Countdown timer animation */
@keyframes pulseWarning {
    0%, 100% {
        color: #f59e0b;
    }
    50% {
        color: #ef4444;
    }
}

.countdown-warning {
    animation: pulseWarning 1s infinite;
}

/* ============================================ */
/* CHALLENGE CARD STYLES */
/* ============================================ */

.challenge-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(34, 211, 238, 0.1);
}

.challenge-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.challenge-card .btn-primary {
    transition: all 0.3s ease;
}

.challenge-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(34, 211, 238, 0.3);
}

/* ============================================ */
/* CAPACITY INDICATOR STYLES */
/* ============================================ */

.capacity-indicator {
    margin: 0.75rem 0;
}

.capacity-indicator .progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(71, 85, 105, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.25rem 0;
}

.capacity-indicator .progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.capacity-indicator .progress-fill.bg-green-500 {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.capacity-indicator .progress-fill.bg-yellow-500 {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.capacity-indicator .progress-fill.bg-red-500 {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.badge-full {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Challenge full button styling */
.challenge-card .btn-primary:disabled {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
}

.challenge-card .btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Tooltip for disabled buttons */
.challenge-card .btn-primary[title] {
    position: relative;
}

.challenge-card .btn-primary[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border: 1px solid rgba(71, 85, 105, 0.5);
    z-index: 10;
    margin-bottom: 0.5rem;
}

/* Challenge details capacity styling */
#detail-joined .text-red-400 {
    color: #ef4444;
    font-weight: 600;
}

#detail-joined .text-green-400 {
    color: #10b981;
    font-weight: 600;
}

/* Joined challenge button styles */
.btn-joined {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #0f172a;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.btn-joined:hover {
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Challenge button states */
.challenge-join-btn.joinable {
    background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
    cursor: pointer;
}

.challenge-join-btn.joined {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    cursor: not-allowed;
    opacity: 0.8;
}

/* Challenge status indicators */
.challenge-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.status-available {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-joined {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-in-progress {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-completed {
    background-color: rgba(100, 116, 139, 0.2);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* ============================================ */
/* FILTER BAR STYLES */
/* ============================================ */

.filter-bar {
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-label {
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid rgba(71, 85, 105, 0.5);
    background-color: rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 44px;
    min-width: 44px;
}

.filter-btn:hover {
    background-color: rgba(71, 85, 105, 0.5);
    border-color: rgba(34, 211, 238, 0.5);
    color: #f1f5f9;
}

.filter-btn.active {
    background-color: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.6);
    color: #22d3ee;
}

.filter-btn.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.filter-btn.coming-soon:hover {
    background-color: rgba(71, 85, 105, 0.3);
    border-color: rgba(71, 85, 105, 0.5);
    color: #cbd5e1;
}

.badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-left: 0.25rem;
}

/* Tooltip for coming soon */
.filter-btn.coming-soon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(71, 85, 105, 0.5);
    z-index: 10;
}

.filter-btn.coming-soon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-label {
        margin-bottom: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================ */
/* DASHBOARD BUTTON STYLES */
/* ============================================ */

.owner-dashboard-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #f1f5f9;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.owner-dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.owner-dashboard-btn:hover::before {
    left: 100%;
}

.owner-dashboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

.admin-dashboard-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #f1f5f9;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.admin-dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.admin-dashboard-btn:hover::before {
    left: 100%;
}

.admin-dashboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

/* ============================================ */
/* GENERATE ANALYSIS MODAL STYLES */
/* ============================================ */

/* Larger modal for analysis template */
.modal-content.max-w-2xl {
    max-width: 42rem;
}

/* Analysis preview styling */
#analysis-preview {
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    min-height: 200px;
    max-height: 300px;
}

#analysis-preview::-webkit-scrollbar {
    width: 8px;
}

#analysis-preview::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

#analysis-preview::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.3);
    border-radius: 4px;
}

#analysis-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.5);
}

/* Price range display styling */
#analysis-price-range-min,
#analysis-price-range-max,
#analysis-price-range-min2,
#analysis-price-range-max2 {
    font-weight: 600;
    color: #22d3ee;
}

/* Challenge info grid */
.grid-cols-1.md\:grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Generate Analysis button styling */
.generate-analysis-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #f1f5f9;
    font-weight: 600;
    transition: all 0.3s ease;
}

.generate-analysis-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

/* Copy button styling */
#copy-analysis-template {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #0f172a;
    font-weight: 600;
    transition: all 0.3s ease;
}

#copy-analysis-template:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* Input validation for analysis modal */
#analysis-target-high:invalid,
#analysis-target-low:invalid {
    border-color: #ef4444 !important;
}

#analysis-target-high:valid,
#analysis-target-low:valid {
    border-color: #10b981 !important;
}

/* Responsive adjustments for analysis modal */
@media (max-width: 768px) {
    .modal-content.max-w-2xl {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #analysis-preview {
        min-height: 150px;
        max-height: 250px;
        font-size: 0.875rem;
    }
}

/* ============================================ */
/* PROFIT SIMULATOR STYLES */
/* ============================================ */

/* Larger modal for profit simulator */
.modal-content.max-w-4xl {
    max-width: 56rem;
    max-height: 90vh;
    overflow-y: auto;
}

/* Scrollbar styling for simulator modal */
.modal-content.max-w-4xl::-webkit-scrollbar {
    width: 10px;
}

.modal-content.max-w-4xl::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 5px;
}

.modal-content.max-w-4xl::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.6);
    border-radius: 5px;
}

.modal-content.max-w-4xl::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.8);
}

/* Purple slider styling */
.slider-purple {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #8b5cf6, #7c3aed);
    outline: none;
}

.slider-purple::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.slider-purple::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Simulator button styles */
.btn-simulator {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #f1f5f9;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-simulator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.btn-simulator:hover::before {
    left: 100%;
}

.btn-simulator:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

/* Simulator card styles */
.simulator-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.simulator-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.1);
}

/* Advanced options animation */
#simulator-advanced-options {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#simulator-advanced-options.show {
    max-height: 500px;
}

#simulator-advanced-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Chart container */
#simulator-chart {
    width: 100% !important;
    height: 192px !important;
}

/* Scenario cards */
.scenario-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.scenario-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.1);
}

/* Badge styles */
.badge-novice {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.badge-pro {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.badge-master {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* CTA section */
.simulator-cta {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    animation: pulseCTA 2s infinite;
}

@keyframes pulseCTA {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    }
}

/* Responsive adjustments for simulator */
@media (max-width: 768px) {
    .modal-content.max-w-4xl {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        padding: 0.5rem;
    }
    
    #simulator-chart {
        height: 150px !important;
    }
    
    .grid-cols-1.sm\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    @media (min-width: 640px) {
        .grid-cols-1.sm\:grid-cols-3 {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }
}

/* Input focus states for simulator */
#simulator-entry-fee:focus,
#simulator-starting-bankroll:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

/* Checkbox styling */
#simulator-reinvest-profits:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

#simulator-reinvest-profits:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Number input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 24px;
}

/* Tooltip for simulator */
.simulator-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.simulator-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: #cbd5e1;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 0.875rem;
    line-height: 1.4;
}

.simulator-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.simulator-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

/* Keep modals usable on mobile */
#deposit-modal .modal-content,
#withdraw-modal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-content {
        max-width: calc(100% - 1rem) !important;
        margin: 0.5rem !important;
    }
    .modal-content .gradient-card,
    .modal-content .rounded-2xl {
        padding: 1rem !important;
    }
    /* Stack modal action buttons vertically on mobile */
    .modal-content .flex.gap-4 {
        flex-direction: column;
    }
    .modal-content .flex.gap-4 button {
        width: 100%;
    }
    /* Stack all detail rows vertically on mobile */
    .modal-content .flex.justify-between {
        flex-direction: column;
        gap: 0.25rem;
    }
    /* Transaction History – table → cards on mobile */
    #transaction-history-modal .overflow-x-auto {
        overflow-x: visible;
    }
    #transaction-history-modal table,
    #transaction-history-modal tbody,
    #transaction-history-modal tr,
    #transaction-history-modal td {
        display: block;
        width: 100%;
    }
    #transaction-history-modal thead {
        display: none;
    }
    #transaction-history-modal tr {
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 0.5rem;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        background: rgba(30, 41, 59, 0.4);
    }
    #transaction-history-modal td {
        padding: 0.35rem 0;
        border: none;
        text-align: left !important;
    }
    /* Commission History – table → cards on mobile */
    #commission-history-modal .overflow-x-auto {
        overflow-x: visible;
    }
    #commission-history-modal table,
    #commission-history-modal tbody,
    #commission-history-modal tr,
    #commission-history-modal td {
        display: block;
        width: 100%;
    }
    #commission-history-modal thead {
        display: none;
    }
    #commission-history-modal tr {
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 0.5rem;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        background: rgba(30, 41, 59, 0.4);
    }
    #commission-history-modal td {
        padding: 0.35rem 0;
        border: none;
        text-align: left !important;
    }
    /* Deposit modal – stack network buttons vertically on mobile */
    #deposit-modal .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }
    /* Deposit modal – address input wraps and gives space for Copy button */
    #deposit-modal #deposit-address {
        font-size: 0.65rem;
        overflow-wrap: break-word;
        word-break: break-all;
        padding-right: 4rem;
    }
    /* Withdraw modal – stack network buttons vertically on mobile */
    #withdraw-modal .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Recent Transactions mobile responsiveness */
#wallet-content .space-y-3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    #wallet-content .flex.items-center.justify-between.p-3 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    #wallet-content .text-right {
        text-align: left !important;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Recent Transactions heading mobile fix */
@media (max-width: 480px) {
    #wallet-content .flex.justify-between.items-center.mb-4 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.25rem;
    }
}
