/* Modern CRM Lead Extractor Design */

:root {
    --primary-purple: #9c88ff;
    --deep-purple: #7c5dfa;
    --light-purple: #b3a0ff;
    --purple-gradient: linear-gradient(135deg, #9c88ff 0%, #7c5dfa 100%);
    --fire-gradient: linear-gradient(135deg, #9c88ff 0%, #7c5dfa 100%);
    --cyber-gradient: linear-gradient(135deg, #9c88ff 0%, #7c5dfa 100%);
    --glow-gradient: linear-gradient(135deg, #9c88ff 0%, #7c5dfa 100%);
    --dark-bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 12px 48px rgba(156, 136, 255, 0.15);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Modern Dark Theme */
body {
    background: #0a0a0a;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(156, 136, 255, 0.08), transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(124, 93, 250, 0.06), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(179, 160, 255, 0.04), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="25" cy="25" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="0.8" fill="%23ffffff" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes subtleShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.container, .container-fluid {
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

/* Header */
.navbar {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(20px);
    border: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



.brand-text {
    font-family: 'Nunito', sans-serif;
    background: var(--fire-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-size: 1.8rem;
}

.bg-gradient-fire {
    background: linear-gradient(45deg, #ff6b6b, #feca57) !important;
    color: white !important;
    animation: pulse 2s infinite;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.bg-gradient-glow {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1.5rem;
}

.card-header h5, .card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #2d3748;
}

.card-body {
    padding: 2rem;
}

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

.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.5s;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #a8a8a8 0%, #7d7d7d 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

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

/* Form Controls */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* Custom Select Wrapper */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 3rem;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.select-wrapper:hover .select-arrow {
    color: var(--primary-purple);
}

/* Lead Scrubbing Section */
.card.bg-light {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.card.bg-light::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

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

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

/* Field Mapping */
.field-mapping-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.field-mapping-item:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* HTML Content Area */
#htmlContent {
    min-height: 250px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    border-radius: var(--border-radius);
    border: 2px solid #e2e8f0;
    background: #1a202c;
    color: #e2e8f0;
    transition: var(--transition);
    resize: vertical;
}

#htmlContent:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
    margin-bottom: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: #e2e8f0;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.table-hover tbody tr:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    transform: scale(1.01);
    transition: var(--transition);
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Status Indicators */
.status-connected {
    color: #38a169;
    text-shadow: 0 0 5px rgba(56, 161, 105, 0.3);
}

.status-disconnected {
    color: #e53e3e;
    text-shadow: 0 0 5px rgba(229, 62, 62, 0.3);
}

.status-connecting {
    color: #d69e2e;
    text-shadow: 0 0 5px rgba(214, 158, 46, 0.3);
}

/* Loading Animations */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse Animation for Important Elements */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Mobile Responsive Design */
@media (max-width: 1200px) {
    .container, .container-fluid {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .stats-card {
        margin-top: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }
    
    .container, .container-fluid {
        padding: 0 0.75rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .badge {
        font-size: 0.6em;
        padding: 0.3em 0.5em;
    }
    
    .card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .card-header h5::before {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        margin-right: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .feature-point {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    
    .feature-icon i {
        font-size: 1.25rem;
    }
    
    .stats-card {
        padding: 1.25rem 0.75rem;
        border-radius: 15px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .stat-sublabel {
        font-size: 0.8rem;
    }
    
    .field-mapping-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    h6 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container, .container-fluid {
        padding: 0 0.5rem;
    }
    
    .navbar {
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .navbar-text {
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-header h5::before {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        margin-right: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .d-grid.gap-2 {
        gap: 0.5rem !important;
    }
    
    .form-control, .form-select {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    #htmlContent {
        min-height: 180px;
        font-size: 0.75rem;
    }
    
    .table-responsive {
        max-height: 300px;
        font-size: 0.75rem;
    }
    
    .table thead th {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        margin-bottom: 0.75rem;
    }
    
    .feature-icon i {
        font-size: 1rem;
    }
    
    .stats-card {
        padding: 1rem 0.5rem;
        border-radius: 12px;
        margin-top: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-sublabel {
        font-size: 0.7rem;
    }
    
    .feature-point {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .field-mapping-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .alert {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .form-text {
        font-size: 0.75rem;
    }
    
    h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    h6 {
        font-size: 0.9rem;
    }
    
    .row {
        margin: 0 -0.25rem;
    }
    
    .row > * {
        padding: 0 0.25rem;
    }
    
    .mt-3 {
        margin-top: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .card:hover,
    .hover-lift:hover {
        transform: none;
        box-shadow: initial;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .card:active {
        transform: scale(0.99);
    }
    
    .form-control:focus,
    .form-select:focus {
        transform: none;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    
    .feature-icon i {
        font-size: 1.1rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Step Numbers */
.card-header h5::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.container {
    counter-reset: step-counter;
}

/* Floating Action Styles */
.floating-stats {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem;
    z-index: 1000;
    display: none;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Special Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

/* Progress Indicators */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke: #667eea;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s;
    transform: rotate(90deg);
    transform-origin: 50% 50%;
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

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

/* Form Text Styling */
.form-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Icon Enhancements */
.fas, .far {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Enhanced Button Styles */
.btn-lg {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-lg::after {
    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.6s;
}

.btn-lg:hover::after {
    left: 100%;
}

.btn-lg:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Badge Styling */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.8em;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.bg-gradient-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Enhanced Alert Styling */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.alert-info {
    background: linear-gradient(135deg, #cce7ff 0%, #b3d9ff 100%);
    border-left: 4px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

/* Enhanced Card Animations */
.card {
    animation: slideInUp 0.5s ease-out;
}

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

/* Step Animation Delay */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Border Styles */
.border-primary {
    border-color: #667eea !important;
}

.border-3 {
    border-width: 3px !important;
}

/* Improved Form Check Styles */
.form-check-label {
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
}

.form-check-input {
    margin-top: 0.2rem;
    border-radius: 5px;
    border: 2px solid #e2e8f0;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Success State Styling */
.text-success {
    color: #38a169 !important;
}

.text-danger {
    color: #e53e3e !important;
}

.text-warning {
    color: #d69e2e !important;
}

/* Container Enhancement */
.container-fluid {
    background: transparent;
}

/* Professional Spacing */
.mt-3 {
    margin-top: 2rem !important;
}

/* Advanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Gradient Backgrounds for Sections */
.section-gradient {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 1rem 0;
}

/* Enhanced Typography */
.fw-bold {
    font-weight: 600 !important;
}

/* Trendy UI Elements */
.hero-title {
    color: #ffffff;
    font-weight: 900;
    font-size: 2rem;
    line-height: 1.2;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: textGlow 3s ease-in-out infinite;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.feature-emoji {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    display: inline-block;
    animation: wiggle 2s infinite;
}

.step-emoji {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    animation: bounce 2s infinite;
}



.fire-emoji {
    margin-left: 0.5rem;
    animation: flame 1s infinite;
}



.step-title {
    font-weight: 700;
    background: var(--cyber-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trendy-tip {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #1a1a1a !important;
    font-weight: 500;
    text-shadow: none;
    line-height: 1.5;
}

.btn-trendy-analyze {
    background: var(--cyber-gradient);
    color: white;
    border: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-trendy-preview {
    background: var(--glow-gradient);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-trendy-export {
    background: var(--fire-gradient);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    animation: exportGlow 3s infinite;
}

.glow-card {
    animation: cardGlow 4s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

@keyframes textGlow {
    0%, 100% { 
        filter: brightness(1); 
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    }
    50% { 
        filter: brightness(1.2) drop-shadow(0 0 20px rgba(156, 136, 255, 0.5)); 
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(156, 136, 255, 0.7);
    }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes flame {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

@keyframes exportGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 107, 0.8), 0 0 40px rgba(254, 202, 87, 0.5); }
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 0, 128, 0.2); }
    50% { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 30px rgba(255, 0, 128, 0.4); }
}

/* Loading State Enhancements */
.btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
    animation: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Feature Icons and Stats */
.feature-icon {
    background: var(--neon-gradient);
    width: 80px;
    height: 80px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--glow);
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

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

.feature-icon i {
    color: white;
    filter: none;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: iconShimmer 2s infinite;
}

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

.feature-point {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.stats-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.stat-sublabel {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

/* Enhanced Step Numbers */
.card-header h5::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    position: relative;
}

.card-header h5::before {
    animation: stepPulse 2s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); }
}

/* Professional Color Enhancements */
.text-primary {
    color: #667eea !important;
}

.text-success {
    color: #10b981 !important;
}

/* Enhanced Alert Styling */
.alert-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
}

/* Premium Form Styling */
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Enhanced Table Styling */
.table thead th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1.25rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Header Theme Toggle */
.theme-toggle-header {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-left: 1rem;
}

.theme-toggle-header:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.25);
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
}

.moon-icon {
    opacity: 0;
    transform: scale(0);
}

/* Stats Placeholder */
.stats-placeholder {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: var(--primary-purple);
    border-radius: 50%;
    margin: 0 auto 0.5rem auto;
    box-shadow: 0 0 10px rgba(156, 136, 255, 0.5);
    animation: pulse 2s infinite;
}

.decoration-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Light Mode Styles */
body.light-mode {
    background: #ffffff;
    color: #1a1a1a;
}

body.light-mode::before {
    background: 
        radial-gradient(circle at 20% 30%, rgba(156, 136, 255, 0.08), transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(124, 93, 250, 0.06), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(179, 160, 255, 0.04), transparent 60%);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

body.light-mode .card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .hero-title {
    color: #1a1a1a;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

body.light-mode .hero-subtitle {
    color: #4a5568 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .theme-label {
    color: #4a5568;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .theme-toggle-header {
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .theme-toggle-header:hover {
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

body.light-mode .theme-toggle-header .sun-icon {
    opacity: 0;
    transform: scale(0);
}

body.light-mode .theme-toggle-header .moon-icon {
    opacity: 1;
    transform: scale(1);
}

body.light-mode .stats-placeholder {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .decoration-text {
    color: #4a5568;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .trendy-tip {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    text-shadow: none;
}

body.light-mode .form-text {
    color: #1a1a1a;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .step-title {
    color: #1a1a1a;
}

body.light-mode .feature-point {
    color: #1a1a1a;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .feature-icon {
    background: var(--purple-gradient);
}

body.light-mode .feature-icon i {
    color: white;
}

/* Footer Styling */
.footer-section {
    margin-top: 4rem;
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}



.footer-brand {
    background: var(--cyber-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Light mode footer */
body.light-mode .footer-section {
    background: rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .footer-text {
    color: #4a5568;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .btn-outline-light {
    color: #2d3748 !important;
    border-color: #2d3748 !important;
}

/* Floating Guide Button */
.floating-guide-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.floating-guide-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--purple-gradient);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(156, 136, 255, 0.4);
    transition: all 0.3s ease;
    animation: float-gentle 3s ease-in-out infinite;
}

.floating-guide-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(156, 136, 255, 0.6);
    color: white;
    text-decoration: none;
}

.floating-guide-btn i {
    font-size: 1.5rem;
    animation: lightbulb-glow 2s ease-in-out infinite alternate;
}

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

@keyframes lightbulb-glow {
    0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 25px rgba(255, 255, 255, 0.6); }
}

/* Premium Navbar Text */
.navbar-text {
    color: #4a5568 !important;
}

/* Mobile optimizations for theme toggle */
@media (max-width: 768px) {
    .navbar-nav {
        margin-left: auto;
    }
    
    .theme-toggle-header {
        margin-left: auto;
    }
    
    .floating-guide-container {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .floating-guide-btn {
        width: 50px;
        height: 50px;
    }
    
    .floating-guide-btn i {
        font-size: 1.2rem;
    }
    
    /* Mobile responsive adjustments */
    .container {
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .form-control {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.6rem;
    }
    
    .brand-text {
        font-size: 1.6rem;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 480px) {
    .container-fluid {
        padding: 0 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
        line-height: 1.2;
    }
    
    .brand-text {
        font-size: 1.4rem;
    }
    
    .floating-guide-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-guide-btn {
        width: 45px;
        height: 45px;
    }
    
    .floating-guide-btn i {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-card {
        padding: 0.75rem;
    }
    
    .form-floating label {
        font-size: 0.9rem;
    }
    
    .step-card {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
    
    .progress {
        height: 8px;
    }
}
    
    .badge {
        font-size: 0.55em;
        padding: 0.2em 0.4em;
    }
    
    .card-header h5::before {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        margin-right: 0.4rem;
    }
    
    .feature-icon {
        width: 35px;
        height: 35px;
        border-radius: 8px;
    }
    
    .feature-icon i {
        font-size: 0.9rem;
    }
    
    .stats-card {
        padding: 0.75rem 0.4rem;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-sublabel {
        font-size: 0.65rem;
    }
    
    h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-point {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }
    
    .form-text {
        font-size: 0.7rem;
        line-height: 1.3;
    }
    
    .table-responsive {
        font-size: 0.7rem;
        max-height: 250px;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-lg i {
        font-size: 0.8rem;
    }
}

/* Ultra-small screens */
@media (max-width: 320px) {
    .container-fluid {
        padding: 0 0.1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-header {
        padding: 0.5rem;
    }
    
    .feature-icon {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }
    
    .feature-icon i {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.65rem 0.9rem;
        font-size: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .feature-point {
        font-size: 0.7rem;
    }
    
    h4 {
        font-size: 0.95rem;
    }
    
    .form-control, .form-select {
        font-size: 0.8rem;
    }
}

/* Improved tap targets for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
    
    .form-check-input {
        transform: scale(1.2);
        margin-top: 0.1rem;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
    }
}

/* Optimize text readability on mobile */
@media (max-width: 576px) {
    body {
        line-height: 1.5;
    }
    
    .text-muted {
        color: #6b7280 !important;
    }
    
    .card-header h5 {
        line-height: 1.4;
    }
    
    .feature-point {
        line-height: 1.4;
    }
    
    .form-text {
        line-height: 1.4;
        margin-top: 0.4rem;
    }
}