/* ===== CUSTOM CSS - Feria TAM & EUCS Research ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Primary Palette - Deep Blue & Teal */
    --primary: #1a73e8;
    --primary-light: #4a9af5;
    --primary-dark: #0d47a1;
    --secondary: #00bfa5;
    --secondary-light: #64ffda;
    --accent: #7c4dff;
    --accent-light: #b388ff;
    
    /* Backgrounds */
    --bg-dark: #0a0e1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2235;
    --bg-surface: #151c2e;
    --bg-glass: rgba(17, 24, 39, 0.7);
    
    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Status */
    --success: #00c853;
    --warning: #ffc107;
    --danger: #ff5252;
    --info: #29b6f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #7c4dff 100%);
    --gradient-secondary: linear-gradient(135deg, #00bfa5 0%, #1a73e8 100%);
    --gradient-accent: linear-gradient(135deg, #7c4dff 0%, #e040fb 100%);
    --gradient-hero: linear-gradient(160deg, #0a0e1a 0%, #111827 40%, #1a1f3a 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(26, 115, 232, 0.15);
    
    /* Borders */
    --border-color: rgba(148, 163, 184, 0.1);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ===== NAVBAR ===== */
.navbar-custom {
    background: rgba(10, 14, 26, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar-custom .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.navbar-custom .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(26, 115, 232, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    background: var(--gradient-hero);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(26, 115, 232, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(124, 77, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(26, 115, 232, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    padding: 14px 36px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.35);
    color: #fff;
}

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

.btn-outline-custom {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    padding: 14px 36px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(26, 115, 232, 0.05);
}

/* ===== CARDS ===== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.glass-card:hover {
    border-color: rgba(26, 115, 232, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

.card-icon.blue { background: rgba(26, 115, 232, 0.12); color: var(--primary-light); }
.card-icon.teal { background: rgba(0, 191, 165, 0.12); color: var(--secondary); }
.card-icon.purple { background: rgba(124, 77, 255, 0.12); color: var(--accent-light); }
.card-icon.green { background: rgba(0, 200, 83, 0.12); color: var(--success); }
.card-icon.orange { background: rgba(255, 193, 7, 0.12); color: var(--warning); }
.card-icon.red { background: rgba(255, 82, 82, 0.12); color: var(--danger); }
.card-icon.info { background: rgba(41, 182, 246, 0.12); color: var(--info); }

/* ===== FORM STYLES ===== */
.form-section {
    min-height: 100vh;
    padding: 100px 0 60px;
    background: var(--bg-dark);
}

.form-container {
    max-width: 720px;
    margin: 0 auto;
}

.form-control-custom,
.form-select-custom {
    background: var(--bg-surface) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: var(--transition) !important;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15) !important;
    outline: none !important;
}

.form-control-custom::placeholder {
    color: var(--text-muted) !important;
}

.form-label-custom {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-select-custom option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== QUESTIONNAIRE ===== */
.question-group {
    margin-bottom: 2.5rem;
}

.question-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.question-group-badge {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tam { background: rgba(26, 115, 232, 0.15); color: var(--primary-light); }
.badge-eucs { background: rgba(0, 191, 165, 0.15); color: var(--secondary); }

.question-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.question-item:hover {
    border-color: rgba(26, 115, 232, 0.15);
}

.question-text {
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.likert-scale {
    display: flex;
    gap: 0;
    justify-content: center;
}

.likert-option {
    flex: 1;
    text-align: center;
}

.likert-option input[type="radio"] {
    display: none;
}

.likert-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1.5px solid transparent;
}

.likert-option label .likert-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.likert-option label:hover {
    background: rgba(26, 115, 232, 0.05);
}

.likert-option label:hover .likert-num {
    border-color: var(--primary);
    color: var(--primary-light);
}

.likert-option input[type="radio"]:checked + label {
    background: rgba(26, 115, 232, 0.08);
    border-color: rgba(26, 115, 232, 0.2);
}

.likert-option input[type="radio"]:checked + label .likert-num {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

.likert-option input[type="radio"]:checked + label .likert-text {
    color: var(--primary-light);
    font-weight: 600;
}

/* ===== PROGRESS BAR ===== */
.progress-wrapper {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.progress-custom {
    height: 6px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
}

.progress-custom .progress-bar {
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== STATS CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

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

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ===== TABLE STYLES ===== */
.table-custom {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-custom table {
    margin-bottom: 0;
    color: var(--text-primary);
}

.table-custom thead th {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: rgba(26, 115, 232, 0.03);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* ===== RESULT PAGE ===== */
.result-section {
    padding: 100px 0 60px;
    background: var(--bg-dark);
    min-height: 100vh;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
}

.chart-container canvas {
    max-height: 280px !important;
    width: 100% !important;
}

/* ===== THANK YOU ===== */
.thankyou-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    text-align: center;
}

.thankyou-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: pulse-glow 2s ease infinite;
}

/* ===== LOGIN ===== */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
}

/* ===== FOOTER ===== */
.footer-custom {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.2);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(0, 200, 83, 0.1);
    }
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease both;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ===== FLOATING PARTICLES ===== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; width: 6px; height: 6px; }
.particle:nth-child(3) { top: 30%; left: 60%; animation-delay: 2s; }
.particle:nth-child(4) { top: 70%; left: 30%; animation-delay: 3s; width: 5px; height: 5px; }
.particle:nth-child(5) { top: 15%; left: 85%; animation-delay: 4s; }
.particle:nth-child(6) { top: 80%; left: 55%; animation-delay: 5s; width: 3px; height: 3px; }

/* ===== STEP INDICATOR ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 3rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    transition: var(--transition);
}

.step-circle.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

.step-circle.completed {
    background: var(--success);
    border-color: transparent;
    color: #fff;
}

.step-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step-label.active {
    color: var(--primary-light);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
}

.step-line.completed {
    background: var(--primary);
}

/* ===== ADMIN SIDEBAR (for dashboard) ===== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-content {
    flex: 1;
    padding: 100px 30px 40px;
}

/* ===== VARIABLE RESULT CARDS ===== */
.var-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.var-result-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.var-result-card.excellent::after { background: var(--success); }
.var-result-card.good::after { background: var(--primary); }
.var-result-card.neutral::after { background: var(--warning); }
.var-result-card.poor::after { background: var(--danger); }

.var-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.var-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

.var-category {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.category-excellent { background: rgba(0, 200, 83, 0.1); color: var(--success); }
.category-good { background: rgba(26, 115, 232, 0.1); color: var(--primary-light); }
.category-neutral { background: rgba(255, 193, 7, 0.1); color: var(--warning); }
.category-poor { background: rgba(255, 82, 82, 0.1); color: var(--danger); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .likert-option label {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .likert-option label .likert-num {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .likert-option label .likert-text {
        display: none;
    }
    
    .step-label {
        display: none;
    }
    
    .step-line {
        width: 30px;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .admin-content {
        padding: 90px 15px 30px;
    }

    .chart-container {
        padding: 1rem;
    }

    .chart-container canvas {
        max-height: 220px !important;
    }
}

@media (max-width: 576px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== ALERT CUSTOM ===== */
.alert-custom {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
}

.alert-custom.alert-danger {
    border-color: rgba(255, 82, 82, 0.3);
    background: rgba(255, 82, 82, 0.05);
}

.alert-custom.alert-success {
    border-color: rgba(0, 200, 83, 0.3);
    background: rgba(0, 200, 83, 0.05);
}
