/**
 * CapitalizeClub Custom Styles
 * Enhanced UI with smooth animations and modern design
 */

:root {
    --cc-primary: #4f46e5;
    --cc-primary-hover: #4338ca;
    --cc-secondary: #64748b;
    --cc-success: #10b981;
    --cc-warning: #f59e0b;
    --cc-danger: #ef4444;
    --cc-dark: #0f172a;
    --cc-dark-light: #1e293b;
    --cc-light: #f8fafc;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Enhancements */
* {
    transition: var(--transition-fast);
}

body {
    background: var(--gradient-primary);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Navbar Improvements */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--cc-warning) !important;
}

.nav-link {
    position: relative;
    transition: var(--transition);
    border-radius: var(--radius);
    padding: 0.5rem 1rem !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--cc-warning);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Card Improvements */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card.bg-dark {
    background: var(--gradient-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card.bg-primary {
    background: var(--gradient-primary) !important;
}

.card.bg-success {
    background: var(--gradient-success) !important;
}

.card.bg-warning {
    background: var(--gradient-warning) !important;
}

.card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Signal Card Enhancements */
.signal-card {
    position: relative;
    border-left: 4px solid var(--cc-primary);
    transition: var(--transition);
    overflow: hidden;
}

.signal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--cc-warning);
    transition: var(--transition);
}

.signal-card:hover::before {
    height: 100%;
}

.signal-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-left-color: var(--cc-warning);
}

/* Signal Card Price Display - Enhanced Contrast */
.signal-card .text-muted {
    color: #cbd5e1 !important; /* Much lighter gray for better contrast */
    font-weight: 500;
    font-size: 0.875rem;
}

.signal-card strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff !important; /* Ensure white text is pure white */
}

.signal-card .text-success {
    color: #34d399 !important; /* Brighter emerald green */
    font-weight: 700;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.signal-card .text-danger {
    color: #f87171 !important; /* Brighter red */
    font-weight: 700;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* Signal Card Badges - Better Visibility */
.signal-card .badge {
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    font-size: 0.813rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Button Improvements */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary {
    background: var(--cc-primary);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--cc-primary-hover);
}

.btn-warning {
    background: var(--cc-warning);
    color: var(--cc-dark);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Badge Improvements */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.813rem;
    transition: var(--transition);
}

.tier-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tier-free {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.tier-pro {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

.tier-elite {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--cc-dark);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.tier-badge:hover {
    transform: scale(1.05);
}

/* Form Improvements */
.form-control,
.form-select {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-check-input {
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--cc-primary);
    border-color: var(--cc-primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* Alert Improvements */
.alert {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

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

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    border-left: 4px solid var(--cc-success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    border-left: 4px solid var(--cc-danger);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
    border-left: 4px solid var(--cc-warning);
    color: var(--cc-dark);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
    border-left: 4px solid #3b82f6;
}

/* Table Improvements */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-dark {
    background: var(--gradient-card);
}

.table-dark thead th {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.813rem;
    letter-spacing: 0.05em;
}

.table-dark tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-dark tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}

/* Pagination Improvements */
.pagination {
    gap: 0.5rem;
}

.page-item .page-link {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: var(--transition);
    margin: 0;
}

.page-item .page-link:hover {
    background: var(--cc-primary);
    border-color: var(--cc-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.page-item.active .page-link {
    background: var(--cc-primary);
    border-color: var(--cc-primary);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
}

/* Modal Improvements */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Upgrade Prompt */
.upgrade-prompt {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 2px dashed var(--cc-warning);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upgrade-prompt::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.upgrade-prompt:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
    border-style: solid;
}

/* Content Stale Warning */
.content-stale-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-left: 4px solid var(--cc-warning);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Locked Content */
.locked-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    position: relative;
}

/* Progress Bar */
.progress {
    border-radius: var(--radius-lg);
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-lg);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

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

/* Confidence Indicators */
.confidence-high {
    color: var(--cc-success);
    font-weight: 700;
}

.confidence-medium {
    color: var(--cc-warning);
    font-weight: 600;
}

.confidence-low {
    color: var(--cc-danger);
    font-weight: 600;
}

/* Accordion Improvements */
.accordion-button {
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.accordion-button:not(.collapsed) {
    background: rgba(79, 70, 229, 0.1);
    box-shadow: inset 0 -1px 0 rgba(79, 70, 229, 0.2);
}

.accordion-button:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Improvements */
.dropdown-menu {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--gradient-card);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease-out;
}

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

.dropdown-item {
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin: 0.25rem 0.5rem;
}

.dropdown-item:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateX(5px);
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .tier-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--cc-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Container Improvements */
.container {
    animation: fadeInUp 0.5s ease-out;
}

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

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--cc-primary);
    border-radius: var(--radius-lg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cc-primary-hover);
}

/* ========================================
   Insight Cards
   ======================================== */

.insight-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    overflow: hidden;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--cc-primary);
}

.insight-card .card-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.insight-card .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 500;
}

.insight-card .locked-content {
    position: relative;
    filter: blur(3px);
    user-select: none;
}

.insight-card .alert-sm {
    margin-bottom: 0;
    border-radius: var(--radius-md);
}

/* Category badge colors */
.bg-danger { background-color: #ef4444 !important; }
.bg-success { background-color: #10b981 !important; }
.bg-primary { background-color: #4f46e5 !important; }
.bg-warning { background-color: #f59e0b !important; color: #000 !important; }
.bg-secondary { background-color: #64748b !important; }

