/* Assessment Page Styling */
body {
    background: radial-gradient(circle at 50% 20%, rgba(15, 29, 56, 0.95) 0%, #070d19 80%);
    color: #ffffff;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

.text-muted {
    color: #94a3b8 !important;
}

/* Navigation Bar */
.navbar {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 0.8rem 1rem;
    background-color: #070d19 !important;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #ffffff !important;
}

/* Assessment Container & Cards */
.assessment-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card, .assessment-card, .question-container, .question-area {
    background: rgba(15, 29, 56, 0.85) !important;
    border: 1px solid rgba(0, 242, 254, 0.25) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header, .assessment-card .card-header {
    background: rgba(0, 242, 254, 0.08) !important;
    border-bottom: 1px solid rgba(0, 242, 254, 0.15) !important;
    font-weight: 600;
    color: #ffffff !important;
}

.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
    color: #ffffff !important;
}

/* Question Navigation */
.question-nav {
    position: sticky;
    top: 1rem;
}

.question-nav .nav-link {
    color: #6c757d;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-nav .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.question-nav .nav-link.answered {
    background-color: #e9ecef;
    color: #0d6efd;
}

/* Question Area */
.question-area {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Options */
.option-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.option-item.selected {
    background: #e7f1ff;
    border-color: #86b7fe;
}

/* Buttons */
.btn-action {
    min-width: 120px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.btn-outline-primary {
    border-width: 2px;
}

/* Timer */
#timeRemaining {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .question-nav {
        margin-bottom: 2rem;
    }
    
    .btn-action {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animation for question transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-transition {
    animation: fadeIn 0.3s ease-out;
}

/* Assessment Styles */
.assessment-section {
    padding: 2rem 0;
    min-height: calc(100vh - 56px);
}

/* Assessment Selection */
.assessment-option {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.assessment-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #0d6efd;
}

.assessment-option.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.assessment-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
}

.assessment-icon.technical {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.assessment-icon.behavioral {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.assessment-icon.personality {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.assessment-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.assessment-meta span {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Assessment Instructions */
.instruction-list {
    list-style: none;
    padding: 0;
}

.instruction-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
}

.instruction-list li:last-child {
    border-bottom: none;
}

.instruction-list .instruction-icon {
    color: #0d6efd;
    margin-right: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Assessment Sidebar */
.assessment-sidebar {
    position: sticky;
    top: 2rem;
}

.question-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.question-nav-item {
    aspect-ratio: 1;
    border: none;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.question-nav-item:hover {
    background-color: #e9ecef;
}

.question-nav-item.current {
    background-color: #0d6efd;
    color: white;
}

.question-nav-item.answered {
    background-color: #198754;
    color: white;
}

.question-nav-item.answered::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
}

/* Question Container */
.question-container {
    background: white;
    border-radius: 12px;
    min-height: 500px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.question-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.question-category {
    background-color: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #ffffff !important;
}

/* Multiple Choice Questions */
.option-container {
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    background-color: rgba(15, 29, 56, 0.6);
    color: #ffffff;
}

.option-item:hover {
    border-color: #00f2fe;
    background-color: rgba(0, 242, 254, 0.15);
}

.option-item.selected {
    border-color: #00f2fe;
    background-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.option-item input {
    margin-right: 1rem;
    transform: scale(1.2);
}

.option-text {
    flex: 1;
    font-weight: 500;
    color: #ffffff;
}

.option-letter {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.option-item.selected .option-letter {
    background-color: #00f2fe;
    color: #070d19;
}

/* Ranking Questions */
.ranking-container {
    border: 2px dashed rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    padding: 1rem;
    min-height: 200px;
    background: rgba(7, 13, 25, 0.5);
}

.ranking-item {
    background: rgba(15, 29, 56, 0.8);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.ranking-item:hover {
    border-color: #00f2fe;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.ranking-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.ranking-number {
    background-color: #00f2fe;
    color: #070d19;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.ranking-text {
    flex: 1;
    color: #ffffff;
}

.drag-handle {
    color: #94a3b8;
    margin-left: 1rem;
    cursor: grab;
}

.drag-handle:hover {
    color: #00f2fe;
}

/* Text Input Questions */
.text-input-container {
    position: relative;
}

.text-input {
    width: 100%;
    min-height: 120px;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.15s ease;
    background-color: rgba(7, 13, 25, 0.8);
    color: #ffffff;
}

.text-input:focus {
    border-color: #00f2fe;
    outline: none;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.character-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Rating & Likert Scale Questions */
.rating-container, .likert-container {
    background-color: rgba(7, 13, 25, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.rating-scale, .likert-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-option, .likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 10px;
}

.rating-circle, .likert-circle {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(0, 242, 254, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: all 0.15s ease;
    background-color: rgba(15, 29, 56, 0.9);
    color: #ffffff;
}

.rating-option:hover .rating-circle, .likert-option:hover .likert-circle {
    border-color: #00f2fe;
    background-color: rgba(0, 242, 254, 0.2);
    transform: scale(1.1);
}

.rating-option.selected .rating-circle,
.likert-circle.selected,
.likert-option.selected .likert-circle {
    border-color: #00f2fe !important;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%) !important;
    color: #070d19 !important;
    font-weight: 800 !important;
    transform: scale(1.15) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5) !important;
}

.rating-option.selected, .likert-option.selected {
    background-color: rgba(0, 242, 254, 0.15);
}

.rating-label, .likert-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    text-align: center;
    line-height: 1.2;
    max-width: 90px;
}

.likert-subscale-info {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 242, 254, 0.15);
    color: #94a3b8;
}

/* Question Actions */
.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.question-actions .btn {
    min-width: 120px;
}

/* Timer */
.timer-warning {
    animation: pulse 1s infinite;
}

.timer-danger {
    animation: pulse 0.5s infinite;
    color: #dc3545 !important;
}

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

/* Assessment Complete */
.success-icon {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.completion-stats {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.completion-stats h4 {
    color: #0d6efd;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .assessment-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .question-nav {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (max-width: 767.98px) {
    .assessment-section {
        padding: 1rem 0;
    }
    
    .assessment-option {
        margin-bottom: 1rem;
    }
    
    .assessment-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .question-container {
        min-height: 400px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .option-item {
        padding: 0.75rem;
    }
    
    .rating-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .rating-scale {
        gap: 0.5rem;
    }
    
    .rating-circle {
        width: 35px;
        height: 35px;
    }
    
    .likert-container {
        padding: 1rem;
    }
    
    .likert-scale {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .likert-option {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        padding: 0.5rem;
        border-radius: 8px;
        transition: background-color 0.15s ease;
    }
    
    .likert-option:hover {
        background-color: rgba(13, 110, 253, 0.05);
    }
    
    .likert-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .likert-label {
        font-size: 0.6rem;
        max-width: none;
        text-align: left;
        flex: 1;
        margin-left: 0.5rem;
    }
    
    .question-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .question-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .question-nav {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .ranking-item {
        padding: 0.5rem 0.75rem;
    }
    
    .ranking-number {
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
    }
    
    .completion-stats .row {
        text-align: center;
    }
    
    .completion-stats .col-4 {
        margin-bottom: 1rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .option-item,
    .ranking-item,
    .text-input {
        border-width: 3px;
    }
    
    .question-nav-item {
        border: 2px solid #000;
    }
    
    .rating-circle {
        border-width: 4px;
    }
    
    .likert-circle {
        border-width: 4px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .assessment-option,
    .option-item,
    .ranking-item {
        transition: none;
    }
    
    .assessment-option:hover,
    .success-icon {
        transform: none;
        animation: none;
    }
    
    .timer-warning,
    .timer-danger {
        animation: none;
    }
}

/* Print styles */
@media print {
    .assessment-sidebar,
    .question-actions,
    .navbar {
        display: none;
    }
    
    .question-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .option-item {
        break-inside: avoid;
    }
}

/* Full Screen Assessment Mode */
#fullScreenAssessment {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f8f9fa;
    z-index: 9999;
    overflow: hidden;
}

.fullscreen-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.timer-display {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-block;
}

.timer-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.fullscreen-content {
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 1rem 0;
}

.question-navigation-panel {
    height: 100%;
    position: sticky;
    top: 1rem;
}

.question-navigation-panel .card {
    height: calc(100vh - 120px);
    overflow-y: auto;
}

.question-content-panel {
    height: 100%;
}

.question-content-panel .card {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.question-content-panel .card-body {
    flex: 1;
    overflow-y: auto;
}

/* Timer warning states for fullscreen */
.timer-warning .timer-text {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.timer-danger .timer-text {
    color: #dc3545;
    animation: pulse 0.5s infinite;
}

/* Fullscreen exit button styling */
#fullscreenExitBtn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

#fullscreenExitBtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Responsive adjustments for fullscreen */
@media (max-width: 768px) {
    .fullscreen-header .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fullscreen-content .row {
        flex-direction: column;
    }
    
    .question-navigation-panel {
        height: auto;
        margin-bottom: 1rem;
    }
    
    .question-navigation-panel .card {
        height: auto;
        max-height: 300px;
    }
    
    .question-content-panel .card {
        height: auto;
        min-height: 400px;
    }
}
