/* Modern Professional Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    user-select: none; /* Disable text selection */
}

/* Disable right-click and text selection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Form Container */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    animation: slideUp 0.6s ease;
}

.exam-container {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header */
.exam-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.exam-header h1, .exam-header h2 {
    margin: 10px 0;
    font-size: 2.5rem;
}

.exam-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.exam-header .fas, .exam-header .fab {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Exam Header Layout */
.exam-container .exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.header-left h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header-left p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.header-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.timer, .progress {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group input[readonly] {
    background: #f8fafc;
    color: #4f46e5;
    font-weight: bold;
}

/* Buttons */
.btn-primary, .btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

/* Admin Login Button */
.admin-access {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.btn-admin {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    opacity: 0.9;
}

.btn-admin:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.3);
}

.btn-admin i {
    font-size: 11px;
}

.btn-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Exam Content */
.exam-content {
    padding: 40px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Question Styles */
.question {
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid #4f46e5;
    transition: all 0.3s ease;
}

.question:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.question-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.question-number {
    background: #4f46e5;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.question-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.question-type {
    background: #059669;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* MCQ Options */
.mcq-options {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.mcq-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcq-option:hover {
    border-color: #4f46e5;
    background: #f8faff;
}

.mcq-option input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.mcq-option.selected {
    border-color: #4f46e5;
    background: #f8faff;
}

/* Input Fields */
.answer-input, .answer-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 15px;
    transition: all 0.3s ease;
    resize: vertical;
}

.answer-input:focus, .answer-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.answer-textarea {
    min-height: 120px;
    font-family: inherit;
}

/* File Upload */
.file-upload {
    position: relative;
    margin-top: 15px;
}

.file-upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #059669;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-btn:hover {
    background: #047857;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Image Display */
.question-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
    margin-top: 30px;
}

.submit-warning {
    background: #fef3c7;
    color: #d97706;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.5s ease;
}

.success-icon {
    font-size: 4rem;
    color: #059669;
    margin-bottom: 20px;
}

.submission-details {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.submission-id-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.submission-id-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #4f46e5;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: white;
    color: #4f46e5;
    text-align: center;
    min-width: 200px;
}

.copy-btn {
    padding: 12px 20px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.copy-btn:active {
    background: #059669;
}

.result-message {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border-left: 5px solid #0ea5e9;
}

.result-message i {
    font-size: 1.5rem;
    color: #0ea5e9;
    margin-bottom: 10px;
}

.exam-completed-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.completion-note {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.completion-note i {
    color: #4f46e5;
    margin-right: 8px;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .exam-container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .header-left h2 {
        font-size: 1.4rem;
    }
    
    .header-left p {
        font-size: 0.8rem;
    }
    
    .header-right {
        flex-direction: row;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .timer, .progress {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .exam-content {
        padding: 15px;
        max-height: 65vh;
    }
    
    .question {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .question-number {
        align-self: flex-start;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .question-type {
        align-self: flex-start;
        font-size: 0.75rem;
    }
    
    .mcq-options {
        gap: 8px;
    }
    
    .mcq-option {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .answer-input, .answer-textarea {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .answer-textarea {
        min-height: 100px;
    }
    
    .question-image {
        max-height: 200px;
        margin: 10px 0;
    }
    
    .form-container {
        margin: 10px;
        padding: 25px;
    }
    
    .exam-header h1 {
        font-size: 2rem;
    }
    
    .input-group input {
        padding: 12px 12px 12px 45px;
        font-size: 0.9rem;
    }
    
    .btn-primary, .btn-submit {
        padding: 12px;
        font-size: 1rem;
    }
    
    .submit-section {
        padding-top: 20px;
        margin-top: 20px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 10px;
    }
    
    .submission-id-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .submission-id-input {
        min-width: auto;
        margin-bottom: 10px;
    }
    
    .copy-btn {
        align-self: center;
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    .exam-header {
        padding: 15px;
    }
    
    .exam-content {
        padding: 10px;
        max-height: 60vh;
    }
    
    .question {
        padding: 12px;
    }
    
    .question-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .mcq-option {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .answer-input, .answer-textarea {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .question-image {
        max-height: 150px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .exam-header h1 {
        font-size: 1.8rem;
    }
    
    .input-group i {
        left: 12px;
        font-size: 1rem;
    }
    
    .input-group input {
        padding: 10px 10px 10px 40px;
    }
    
    .timer, .progress {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .result-message, .submission-details {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Scrollbar Styling */
.exam-content::-webkit-scrollbar {
    width: 8px;
}

.exam-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.exam-content::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

.exam-content::-webkit-scrollbar-thumb:hover {
    background: #4338ca;
}

/* New Enhanced Features Styles */

/* Security Warning */
.security-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.security-warning .warning-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Time Warning */
.time-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.time-warning.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.time-warning.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.time-warning.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Question Navigation */
.question-navigation {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.question-counter {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.review-controls {
    display: flex;
    gap: 10px;
}

.review-btn, .jump-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.review-btn:hover, .jump-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Review Summary */
.review-summary {
    background: #f1f5f9;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.summary-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #475569;
}

/* Question Map Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 20px;
}

/* Question Grid */
#questionGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.question-grid-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
}

.question-grid-btn.current {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.question-grid-btn.answered {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.question-grid-btn.flagged {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.question-grid-btn.unanswered {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

.question-grid-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Map Legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
}

.dot.answered {
    background: #10b981;
    border-color: #10b981;
}

.dot.flagged {
    background: #f59e0b;
    border-color: #f59e0b;
}

.dot.current {
    background: #4f46e5;
    border-color: #4f46e5;
}

.dot.unanswered {
    background: white;
    border-color: #e2e8f0;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Community Links and Course Information */
.community-links, .course-info {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.community-links h3, .course-info h3 {
    color: #4f46e5;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-group {
    margin: 15px 0;
}

.link-group p {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.community-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.community-link.main-group {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
}

.community-link.page-link {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
}

.community-link.youtube-link {
    background: linear-gradient(135deg, #ff0000 0%, #ff4444 100%);
}

.community-link.course-details {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

/* Poll Section */
.poll-section {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.poll-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: left;
}

.poll-btn:hover {
    border-color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-1px);
}

.poll-btn.voted {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.vote-thanks {
    color: #059669;
    font-weight: 600;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Course List */
.upcoming-courses {
    margin-top: 20px;
}

.course-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.course-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
    line-height: 1.5;
}

.course-list li:last-child {
    border-bottom: none;
}

/* Responsive Design for New Features */
@media (max-width: 768px) {
    .question-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nav-controls {
        justify-content: space-between;
    }
    
    .review-controls {
        justify-content: center;
    }
    
    .summary-stats {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .security-warning, .time-warning {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    #questionGrid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .question-grid-btn {
        width: 35px;
        height: 35px;
    }
    
    .community-links, .course-info {
        margin: 15px 0;
        padding: 15px;
    }
    
    .poll-options {
        gap: 8px;
    }
    
    .poll-btn {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Final Submission Flow Styles */
.btn-done {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    justify-content: center;
}

.btn-done:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-done.disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
}

.btn-done.disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.vote-instruction {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

.vote-thanks {
    background: #d1edff;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    color: #0c5460;
    font-weight: bold;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.final-success {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 15px;
    margin: 20px 0;
    animation: fadeIn 0.5s ease;
}

.success-animation {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.final-success h3 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 24px;
}

.final-success p {
    color: #155724;
    margin-bottom: 10px;
    line-height: 1.6;
}

.formspree-status {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-weight: bold;
}

.final-note {
    font-style: italic;
    margin-top: 20px;
    opacity: 0.8;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Poll button enhancements */
.poll-btn.voted {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.poll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced exam completed actions */
.exam-completed-actions {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.completion-note {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* Completion Instructions Styling */
.completion-instructions {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid #e1bee7;
}

.completion-instructions h3 {
    color: #4a148c;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #4f46e5;
}

.step-number {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #2d1b69;
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.step-content p {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Responsive design for instructions */
@media (max-width: 768px) {
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .completion-instructions {
        padding: 20px 15px;
    }
}

/* Animation for step 2 to highlight voting requirement */
.step-item.voting-required {
    animation: pulseVote 2s infinite;
    border-left-color: #ffc107;
}

@keyframes pulseVote {
    0% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4); }
    100% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
}

.step-item.completed {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
}
