/* Custom Styles for InternJunction Quiz System */

/* Header and Logo Styles */
.custom-header {
    padding: 4px 0 !important;
}

.navbar {
    --bs-navbar-padding-y: 4px !important;
}

.custom-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-right: 0 !important;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo-image {
    width: 25px;
    height: 25px;
    object-fit: contain;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.custom-logo:hover .logo-image {
    transform: scale(1.1);
}

.custom-nav {
    gap: 10px;
}

.custom-nav .nav-link {
    color: #222222 !important;
    font-weight: 500;
    padding: 6px 14px !important;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.custom-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(10, 115, 176, 0.1), transparent);
    transition: left 0.5s ease;
}

.custom-nav .nav-link:hover::before {
    left: 100%;
}

.custom-nav .nav-link:hover {
    color: #0a73b0 !important;
    background-color: rgba(10, 115, 176, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 115, 176, 0.2);
}

.custom-nav .nav-button.active {
    background: linear-gradient(135deg, #0a73b0, #085a8a);
    color: white !important;
    box-shadow: 0 4px 15px rgba(10, 115, 176, 0.3);
}

.custom-nav .nav-button.active:hover {
    background: linear-gradient(135deg, #085a8a, #064a73);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 115, 176, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-image {
        width: 22px;
        height: 22px;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        image-rendering: pixelated;
    }
    
    .custom-nav {
        gap: 8px;
    }
    
    .custom-nav .nav-link {
        padding: 5px 12px !important;
        font-size: 0.9rem;
    }
}

/* Quiz Modal Fullscreen Styles */
.modal-fullscreen {
    padding: 0 !important;
}

.modal-fullscreen .modal-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
}

.modal-fullscreen .modal-content {
    height: 100vh;
    border: 0;
    border-radius: 0;
}

/* Question Card Styles */
.question-card {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.question-card .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

/* Option Selection Styles */
.form-check-input:checked + .form-check-label {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    transition: all 0.3s ease;
}

.form-check-label {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-check-label:hover {
    background-color: #f5f5f5;
}

/* Timer and Counter Styles */
#timerDisplay, #questionCounter {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Quiz Selection Page Styles */
.quiz-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.quiz-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.quiz-icon i {
    transition: transform 0.3s ease;
}

.quiz-card:hover .quiz-icon i {
    transform: scale(1.1);
}

.detail-item {
    padding: 10px 0;
    text-align: center;
}

.detail-item i {
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: block;
}

.detail-item strong {
    font-size: 1.1rem;
    color: #333;
    display: block;
}

/* Button Styles */
.btn {
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007bff !important;
}

/* Card Styles */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .question-card {
        min-height: 60vh;
        padding: 1rem !important;
    }
    
    .modal-fullscreen .modal-dialog {
        margin: 0;
        width: 100%;
        height: 100%;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus States for Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success/Error States */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .modal {
        position: static !important;
        display: block !important;
    }
}
