/* AI Cancer Diagnosis Research - Main Stylesheet */
/* Color Palette: Teal (#2EC4D6), Purple (#7B4DFF), Deep Blue (#1F3A8A) */

:root {
    /* Primary Colors */
    --primary-teal: #2EC4D6;
    --primary-purple: #7B4DFF;
    --deep-blue: #1F3A8A;
    
    /* Supporting Colors */
    --light-bg: #F6F9FC;
    --card-bg: #FFFFFF;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --soft-glow: #8BE9FD;
    
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #1F3A8A 0%, #3B82F6 50%, #7B4DFF 100%);
    --btn-gradient: linear-gradient(135deg, #2EC4D6, #3B82F6, #7B4DFF);
    --accent-gradient: linear-gradient(135deg, #2EC4D6, #7B4DFF);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(46, 196, 214, 0.3);
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Roboto+Mono:wght@400;500&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.mono {
    font-family: 'Roboto Mono', monospace;
}

/* Likert Scale */
.likert-scale {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.likert-options {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 100%;
}

.likert-option {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.likert-option:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
}

.likert-option.selected {
    border-color: var(--primary-teal);
    background: var(--primary-teal);
    color: white;
    box-shadow: var(--shadow-glow);
}

.likert-option.selected .likert-number {
    color: white;
}

.likert-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-teal);
    margin-bottom: 4px;
}

.likert-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.likert-option.selected .likert-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Validation states for likert scale */
.likert-scale.needs-selection {
    border: 2px dashed #dc3545;
    border-radius: 8px;
    padding: 10px;
}

.likert-scale.needs-selection .likert-option {
    border-color: #dc3545;
}

/* Navigation */
.navbar-custom {
    background: var(--deep-blue);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-custom .navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-gradient {
    background: linear-gradient(135deg, #8BE9FD, #2EC4D6, #3B82F6, #7B4DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.navbar-custom .nav-link {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background: rgba(46, 196, 214, 0.2);
    color: var(--primary-teal);
}

/* Buttons */
.btn-primary-custom {
    background: var(--btn-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-secondary-custom {
    background: transparent;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: var(--primary-teal);
    color: white;
}

/* Cards */
.card-custom {
    background: var(--card-bg);
    border: 1px solid rgba(46, 196, 214, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Hero Section */
.hero-section {
    background: var(--hero-gradient);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; }

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Glowing Orb Animation */
.glowing-orb {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(46, 196, 214, 0.3) 0%, rgba(123, 77, 255, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    position: relative;
    animation: pulse-glow 3s ease-in-out infinite;
}

.glowing-orb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary-teal) 0%, var(--primary-purple) 100%);
    border-radius: 50%;
    opacity: 0.8;
}

.glowing-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(46, 196, 214, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(46, 196, 214, 0.5);
    }
}

/* Orbiting Nodes */
.orbiting-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--soft-glow);
    border-radius: 50%;
    animation: orbit 8s linear infinite;
}

.orbiting-node:nth-child(1) { animation-delay: 0s; }
.orbiting-node:nth-child(2) { animation-delay: -2s; }
.orbiting-node:nth-child(3) { animation-delay: -4s; }
.orbiting-node:nth-child(4) { animation-delay: -6s; }

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

/* Progress Bar */
.progress-custom {
    height: 10px;
    background: rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-custom {
    height: 100%;
    background: var(--btn-gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Form Styles */
.form-control-custom {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control-custom:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(46, 196, 214, 0.15);
    outline: none;
}

.form-label-custom {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Option Cards */
.option-card {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-card:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
    transform: translateX(4px);
}

.option-card.selected {
    background: linear-gradient(135deg, rgba(46, 196, 214, 0.15), rgba(123, 77, 255, 0.1));
    border-color: var(--primary-teal);
}

.option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(46, 196, 214, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-card.selected .option-indicator {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.option-card.selected .option-indicator::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Likert Scale */
.likert-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0;
}

.likert-option {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.likert-option:hover {
    border-color: var(--primary-teal);
}

.likert-option.selected {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: white;
}

/* Stats Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Charts */
.chart-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 16px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.bar-container {
    flex: 1;
    height: 32px;
    background: rgba(46, 196, 214, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--btn-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 1s ease;
}

.bar-fill.teal { background: var(--primary-teal); }
.bar-fill.purple { background: var(--primary-purple); }
.bar-fill.blue { background: #3B82F6; }

/* Pie/Donut Chart */
.donut-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.donut-chart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--card-bg);
    border-radius: 50%;
}

/* Footer */
.footer-custom {
    background: var(--deep-blue);
    color: white;
    padding: 40px 0 20px;
}

.footer-custom a {
    color: var(--primary-teal);
    text-decoration: none;
}

.footer-custom a:hover {
    text-decoration: underline;
}

/* Section Headers */
.section-header {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Question Badge */
.question-badge {
    background: var(--btn-gradient);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
}

/* Checkbox Cards */
.checkbox-group {
    display: block;
    padding: 10px 0;
}

.checkbox-card {
    background: var(--card-bg);
    border: 2px solid rgba(46, 196, 214, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: 500;
}

.checkbox-card:hover {
    border-color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.05);
    transform: translateX(4px);
}

.checkbox-card.selected {
    background: linear-gradient(135deg, rgba(46, 196, 214, 0.15), rgba(123, 77, 255, 0.1));
    border-color: var(--primary-teal);
}

.checkbox-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(46, 196, 214, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-card.selected .checkbox-indicator {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.checkbox-card.selected .checkbox-indicator::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-card span {
    font-weight: 600;
}

/* Range Slider */
.range-container {
    padding: 20px 0;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 8px;
}

.range-value {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-teal);
    font-family: 'Roboto Mono', monospace;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(46, 196, 214, 0.2);
    border-radius: 10px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background: var(--btn-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 196, 214, 0.4);
}

/* Tables */
.table-custom {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-custom th {
    background: var(--deep-blue);
    color: white;
    font-weight: 600;
    padding: 16px;
    text-align: left;
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(46, 196, 214, 0.1);
}

.table-custom tr:hover {
    background: rgba(46, 196, 214, 0.05);
}

/* Badges */
.badge-custom {
    background: rgba(46, 196, 214, 0.15);
    color: var(--primary-teal);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.6s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .likert-scale {
        flex-wrap: wrap;
    }
    
    .likert-option {
        flex: 1 1 30%;
    }
}

/* Consent Section */
.consent-box {
    background: rgba(46, 196, 214, 0.05);
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.consent-icon {
    color: var(--primary-teal);
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Tabs for Results */
.nav-tabs-custom {
    border-bottom: 2px solid rgba(46, 196, 214, 0.2);
    margin-bottom: 24px;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--primary-teal);
    background: rgba(46, 196, 214, 0.1);
}

.nav-tabs-custom .nav-link.active {
    background: var(--primary-teal);
    color: white;
}

/* Filters */
.filter-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-select {
    border: 2px solid rgba(46, 196, 214, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
}

/* Live Counter */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 196, 214, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
