/* =============================================
   VIOLA TV - ASSESSMENT TEST STYLES
   Premium glassmorphism design with animations
   ============================================= */

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

:root {
    --primary: #f89a59;
    --primary-light: #fdaa68;
    --accent: #fe7773;
    --gradient: linear-gradient(135deg, #f89a59, #fdaa68, #fe7773);
    --gradient-hover: linear-gradient(135deg, #fe7773, #fdaa68, #f89a59);
    --dark-bg: #0a0e1a;
    --dark-card: rgba(255, 255, 255, 0.04);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --success: #00d68f;
    --error: #ff4d6a;
    --warning: #ffaa00;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-glow: 0 0 40px rgba(248, 154, 89, 0.15);
}

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

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--dark-bg);
}

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

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

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

/* === BASE === */
.assessment-page {
    min-height: 100vh;
    background: var(--dark-bg);
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.assessment-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(248, 154, 89, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(254, 119, 115, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(253, 170, 104, 0.03) 0%, transparent 50%);
    z-index: 0;
    animation: bgShift 45s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgShift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-2%, 1%) rotate(1deg);
    }

    66% {
        transform: translate(1%, -1%) rotate(-0.5deg);
    }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.1;
    animation: particleFloat 25s infinite linear;
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-duration: 28s;
    animation-delay: 0s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(2) {
    left: 30%;
    top: 70%;
    animation-duration: 32s;
    animation-delay: -3s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(3) {
    left: 50%;
    top: 40%;
    animation-duration: 26s;
    animation-delay: -7s;
}

.particle:nth-child(4) {
    left: 70%;
    top: 80%;
    animation-duration: 30s;
    animation-delay: -5s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(5) {
    left: 85%;
    top: 15%;
    animation-duration: 34s;
    animation-delay: -10s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(6) {
    left: 15%;
    top: 90%;
    animation-duration: 29s;
    animation-delay: -2s;
}

.particle:nth-child(7) {
    left: 25%;
    top: 30%;
    animation-duration: 31s;
    animation-delay: -4s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(8) {
    left: 45%;
    top: 60%;
    animation-duration: 27s;
    animation-delay: -8s;
    width: 2px;
    height: 2px;
}

.particle:nth-child(9) {
    left: 65%;
    top: 10%;
    animation-duration: 35s;
    animation-delay: -12s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(10) {
    left: 75%;
    top: 50%;
    animation-duration: 30s;
    animation-delay: -6s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(11) {
    left: 95%;
    top: 85%;
    animation-duration: 29s;
    animation-delay: -1s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(12) {
    left: 5%;
    top: 45%;
    animation-duration: 33s;
    animation-delay: -9s;
    width: 3px;
    height: 3px;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.1;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* === HEADER BAR === */
.assess-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.assess-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.assess-logo span {
    color: var(--primary);
}

.assess-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    color: var(--primary);
}

/* === MAIN CONTAINER === */
.assess-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 24px 60px;
}

/* === PROGRESS STEPPER === */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    gap: 0;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-muted);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.step-circle .check-icon {
    display: none;
}

.step-indicator.active .step-circle {
    background: var(--gradient);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 30px rgba(248, 154, 89, 0.4);
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 214, 143, 0.3);
}

.step-indicator.completed .step-circle .step-num {
    display: none;
}

.step-indicator.completed .step-circle .check-icon {
    display: inline;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: var(--text-primary);
}

.step-line {
    width: 120px;
    height: 2px;
    background: var(--glass-border);
    margin: 0 16px;
    position: relative;
    overflow: hidden;
}

.step-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--gradient);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-line.filled::after {
    width: 100%;
}

/* === GLASS CARD === */
.glass-card {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    padding: 48px;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.6s ease-out;
}

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

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === STEP SECTIONS === */
.step-section {
    display: none;
}

.step-section.active {
    display: block;
    animation: stepSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === STEP 1: USER INFO === */
.step-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.6;
}

/* === FORM STYLES === */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-label .required {
    color: var(--accent);
    margin-left: 2px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    background: rgba(248, 154, 89, 0.05);
    box-shadow: 0 0 0 3px rgba(248, 154, 89, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.error-msg {
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 4px;
}

.error-msg.visible {
    display: flex;
}

/* === BUTTONS === */
.btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 36px;
}

.btn {
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(248, 154, 89, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(248, 154, 89, 0.45);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* === STEP 2: EXAM === */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.exam-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.exam-badge i {
    color: var(--primary);
}

.timer-badge.warning {
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(254, 119, 115, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(254, 119, 115, 0);
    }
}

.question-progress {
    width: 100%;
    height: 4px;
    background: var(--glass);
    border-radius: 4px;
    margin-bottom: 36px;
    overflow: hidden;
}

.question-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question card */
.question-card {
    margin-bottom: 32px;
    animation: questionFadeIn 0.4s ease-out;
}

@keyframes questionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 28px;
    color: var(--text-primary);
}

/* Answer options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    background: rgba(248, 154, 89, 0.06);
    border-color: rgba(248, 154, 89, 0.2);
    transform: translateX(4px);
}

.option-item.selected {
    background: rgba(248, 154, 89, 0.1);
    border-color: var(--primary);
}

.option-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.option-item.disabled:hover {
    transform: none;
    background: var(--glass);
    border-color: var(--glass-border);
}

.option-item.selected.disabled {
    opacity: 1;
    background: rgba(248, 154, 89, 0.1);
    border-color: var(--primary);
}

.option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.option-item.selected .option-letter {
    background: var(--gradient);
    border-color: var(--primary);
    color: #fff;
}

/* Question navigation */
.question-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.question-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.q-dot {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.q-dot.current {
    background: var(--gradient);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(248, 154, 89, 0.3);
    color: #fff;
}

.q-dot.answered {
    background: rgba(0, 214, 143, 0.15);
    border-color: var(--success);
    color: var(--success);
}

.q-dot.answered.current {
    background: var(--gradient);
    border-color: var(--primary);
    color: #fff;
}

/* === RESULTS SCREEN === */
.results-section {
    display: none;
}

.results-section.active {
    display: block;
}

.text-center {
    text-align: center;
}

.animated-check {
    animation: checkPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast.visible {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 18px;
}

.toast span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-warning i {
    color: var(--warning);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-success i {
    color: var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-error i {
    color: var(--error);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-info i {
    color: var(--primary);
}

@media (max-width: 480px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: auto;
    }
}

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

    100% {
        transform: rotate(359deg);
    }
}

.fa-spin {
    animation: fa-spin 2s infinite linear;
    display: inline-block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .assess-header {
        padding: 14px 20px;
    }

    .assess-container {
        padding: 80px 16px 40px;
    }

    .glass-card {
        padding: 28px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .step-title {
        font-size: 22px;
    }

    .step-line {
        width: 60px;
    }

    .step-label {
        display: none;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-row .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .step-line {
        width: 40px;
        margin: 0 8px;
    }

    .question-dots {
        gap: 4px;
    }
}