/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Theme System */
:root {
    /* Default Theme (Ocean Blue) */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-color: rgba(0,0,0,0.1);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.1);
    --button-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Forest Green Theme */
body.theme-forest {
    --primary-gradient: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --secondary-gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --accent-color: #f39c12;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-color: rgba(0,0,0,0.1);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.1);
    --button-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
}

/* Sunset Orange Theme */
body.theme-sunset {
    --primary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --secondary-gradient: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    --primary-color: #ff6b6b;
    --secondary-color: #ee5a24;
    --accent-color: #feca57;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-color: rgba(0,0,0,0.1);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.1);
    --button-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

/* Lavender Purple Theme */
body.theme-lavender {
    --primary-gradient: linear-gradient(135deg, #a55eea 0%, #8854d0 100%);
    --secondary-gradient: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    --primary-color: #a55eea;
    --secondary-color: #8854d0;
    --accent-color: #fd79a8;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-color: rgba(0,0,0,0.1);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.1);
    --button-shadow: 0 10px 20px rgba(165, 94, 234, 0.3);
}

/* Midnight Dark Theme */
body.theme-midnight {
    --primary-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --secondary-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-light: #95a5a6;
    --bg-primary: #2c3e50;
    --bg-secondary: #34495e;
    --border-color: #4a5f7a;
    --shadow-color: rgba(0,0,0,0.3);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.3);
    --button-shadow: 0 10px 20px rgba(52, 73, 94, 0.3);
}

/* Coral Pink Theme */
body.theme-coral {
    --primary-gradient: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
    --secondary-gradient: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    --primary-color: #ff7675;
    --secondary-color: #fd79a8;
    --accent-color: #74b9ff;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-color: rgba(0,0,0,0.1);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.1);
    --button-shadow: 0 10px 20px rgba(255, 118, 117, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.theme-toggle i {
    color: var(--primary-color);
    font-size: 16px;
}

.theme-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 15px;
    margin-top: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.theme-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.theme-option:hover {
    background: var(--bg-secondary);
}

.theme-preview {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.theme-default-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-forest-preview {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.theme-sunset-preview {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.theme-lavender-preview {
    background: linear-gradient(135deg, #a55eea 0%, #8854d0 100%);
}

.theme-midnight-preview {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.theme-coral-preview {
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.logo-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-icon i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.logo-text h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.header-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Card Styles */
.card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px var(--shadow-color);
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.card h2 i {
    color: var(--primary-color);
}

.card h3 {
    color: var(--text-secondary);
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin: 5px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--button-shadow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--secondary-gradient);
    color: white;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Assessment History Styles */
.assessment-history .card {
    max-width: 1200px;
    margin: 0 auto;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Search Controls */
.search-controls {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-field label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-field input,
.search-field select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.search-results-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Assessment Table Styles */
.assessments-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.assessments-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.assessments-table th,
.assessments-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.assessments-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.assessments-table tr:hover {
    background: var(--bg-secondary);
}

.assessments-table td {
    color: var(--text-primary);
}

.assessment-id {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-light);
}

.assessment-name {
    font-weight: 500;
    color: var(--text-primary);
}

.assessment-counselor {
    color: var(--text-secondary);
}

.assessment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.assessment-actions {
    display: flex;
    gap: 5px;
}

.assessment-actions .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    margin: 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-number.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .assessments-table {
        font-size: 0.9rem;
    }
    
    .assessments-table th,
    .assessments-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .search-controls {
        padding: 1rem;
    }
    
    .page-numbers {
        gap: 0.25rem;
    }
    
    .page-number {
        padding: 0.4rem 0.6rem;
        min-width: 35px;
        font-size: 0.85rem;
    }
}

/* Assessment Details Styles */
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.details-header h2 {
    color: var(--text-primary);
    margin: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    color: var(--text-primary);
    margin: 0;
}

/* Assessment Info Styles */
.assessment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Link Styles */
.link-container {
    margin-bottom: 30px;
}

.link-item {
    margin-bottom: 20px;
}

.link-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.link-box {
    display: flex;
    gap: 10px;
}

.link-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
}

.link-box .btn {
    white-space: nowrap;
}

/* Status Styles */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.status-label {
    font-weight: 500;
    color: var(--text-primary);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.not-started {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.submission-info {
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.submission-info small {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.submission-info span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Participant Page Styles */
.participant-form {
    max-width: 800px;
    margin: 0 auto;
}

.progress-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.progress-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.progress-text {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.question-container {
    margin-bottom: 40px;
}

.question-display {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.question-number {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

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

.question-hint {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 20px;
}

.question-answer {
    margin-top: 20px;
}

.question-answer textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.question-answer textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.navigation-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Fixed Action Buttons */
.fixed-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 20px;
    box-shadow: 0 -5px 20px var(--shadow-color);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.action-buttons .btn {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Thank You Page Styles */
.thank-you-content {
    text-align: center;
    padding: 60px 20px;
}

.thank-you-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.thank-you-content h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.thank-you-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.thank-you-info {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.thank-you-info p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.thank-you-info strong {
    color: var(--text-primary);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-content {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content p {
    color: var(--text-primary);
    font-size: 1.1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Styles */
.compatibility-summary {
    margin-bottom: 40px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compatibility-level {
    margin-bottom: 30px;
}

.level-indicator {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--button-shadow);
}

.level-indicator.excellent {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.level-indicator.good {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

.level-indicator.moderate {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.level-indicator.major {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.results-column {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.result-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.counseling-recommendations {
    margin-bottom: 40px;
}

.recommendation-text {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Question Styles */
.questions-container {
    margin-top: 30px;
}

.question-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.question-number {
    font-weight: 600;
    color: var(--text-primary);
}

.compatibility-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.score-badge.aligned {
    background: #d4edda;
    color: #155724;
}

.score-badge.minor {
    background: #fff3cd;
    color: #856404;
}

.score-badge.moderate {
    background: #f8d7da;
    color: #721c24;
}

.score-badge.significant {
    background: #f5c6cb;
    color: #721c24;
}

.score-badge.major {
    background: #dc3545;
    color: white;
}

.question-text {
    padding: 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.answers-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
}

.answer-box {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.answer-box h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.answer-text {
    color: var(--text-primary);
    line-height: 1.5;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Assessment Type Selection */
.assessment-type-selection {
    margin-bottom: 30px;
}

.assessment-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.assessment-type-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.assessment-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-color);
}

.assessment-type-card.selected {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.assessment-type-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.default-assessment-type {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.default-assessment-type:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.default-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AI Report Section */
#aiReportSection {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}
#aiReportSection h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#aiReportContent {
    color: var(--text-primary);
    line-height: 1.6;
}
.ai-report-controls {
    margin-top: 30px;
    text-align: center;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-content h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.welcome-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-icon {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: var(--button-shadow);
}

.welcome-icon i {
    font-size: 3rem;
    color: white;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.welcome-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-title h2 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.dashboard-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Assessments */
.recent-assessments {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0;
}

.assessments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.assessment-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.assessment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.assessment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.assessment-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.assessment-counselor {
    color: var(--text-light);
    font-size: 0.9rem;
}

.assessment-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.assessment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.assessment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.assessment-actions {
    display: flex;
    gap: 10px;
}

/* Assessment Creation Form */
.creation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.creation-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.creation-form {
    max-width: 600px;
}

.assessment-type-selection {
    margin-bottom: 30px;
}

.assessment-type-selection label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.type-option {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.type-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.type-option.selected {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.type-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.type-option:nth-child(2) .type-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.type-content {
    flex: 1;
}

.type-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.type-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

.type-check {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.type-option.selected .type-check {
    opacity: 1;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* History Header */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.history-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .assessments-grid {
        grid-template-columns: 1fr;
    }
    
    .type-options {
        grid-template-columns: 1fr;
    }
    
    .type-option {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Selected Type Display Styles */
.selected-type-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.selected-type-display h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.type-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.type-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.type-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.type-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Assessment Type Selection Styles */
.assessment-type-selection {
    margin-bottom: 30px;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 20px;
}

.header-content h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-content h2 i {
    color: var(--primary-color);
}

.selection-description {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.assessment-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.assessment-type-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.assessment-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-color);
}

.assessment-type-card.selected {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.assessment-type-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.default-assessment-type {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.default-assessment-type:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.default-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assessment-type-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.assessment-type-description {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

.assessment-type-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.assessment-type-questions {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.selection-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.selection-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.selection-actions .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .assessment-types-grid {
        grid-template-columns: 1fr;
    }
    
    .selection-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .selection-header h2 {
        font-size: 1.3rem;
    }
}

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

/* Enhanced AI Report Styles */
.ai-generation-progress {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
    color: var(--primary-color);
}

.progress-step.completed {
    opacity: 1;
    color: var(--secondary-color);
}

.progress-step i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.progress-step span {
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-report-header {
    background: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.model-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.generation-time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.ai-report-content {
    padding: 20px;
    line-height: 1.6;
}

.ai-report-content h1,
.ai-report-content h2,
.ai-report-content h3,
.ai-report-content h4 {
    color: var(--text-primary);
    margin: 20px 0 10px 0;
}

.ai-report-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.ai-report-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.ai-report-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.ai-report-content p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.ai-report-content ul,
.ai-report-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.ai-report-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.ai-report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.ai-report-content th,
.ai-report-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.ai-report-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.ai-report-content tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.ai-report-footer {
    background: var(--bg-secondary);
    padding: 15px 20px;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.ai-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.ai-error i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.ai-error h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.ai-error p {
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* AI Model Selection */
.ai-model-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-model-selection label {
    font-weight: 600;
    color: var(--text-primary);
}

.ai-model-selection select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 200px;
}

.ai-model-selection select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Report Actions */
.report-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.report-actions .btn {
    margin: 0;
}

/* History Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.modal-overlay[style*='display: none'] {
    opacity: 0;
    pointer-events: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal[style*="display: block"] {
    display: flex !important;
}

.question-preview-modal {
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: white;
    border-radius: 12px;
    margin: 0 auto;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.modal-header button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.history-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--card-shadow);
    z-index: 1001;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-warning {
    border-left: 4px solid #ffc107;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification i {
    font-size: 1.2rem;
}

.notification-success i {
    color: #28a745;
}

.notification-error i {
    color: #dc3545;
}

.notification-warning i {
    color: #ffc107;
}

.notification-info i {
    color: #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced AI Report Controls */
.ai-report-controls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-generation-progress {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-step {
        flex-direction: row;
        text-align: left;
    }
    
    .ai-report-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .report-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .ai-model-selection {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .history-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .history-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Questions and Answers Display */
.questions-overview {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.questions-overview h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.assessment-meta {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.assessment-meta p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.export-section {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.export-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.export-controls .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.export-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.export-controls .btn i {
    font-size: 1.1rem;
}

.ai-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-model-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-model-select:hover {
    border-color: var(--primary-color);
}

.ai-model-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

/* Responsive design for export controls */
@media (max-width: 768px) {
    .export-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .ai-model-select {
        width: 100%;
        text-align: center;
    }
    
    .export-controls .btn {
        width: 100%;
        justify-content: center;
    }
}

.ai-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-model-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-model-select:hover {
    border-color: var(--primary-color);
}

.ai-model-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

/* Responsive design for export controls */
@media (max-width: 768px) {
    .export-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .ai-model-select {
        width: 100%;
        text-align: center;
    }
    
    .export-controls .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Category Sections */
.category-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.category-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.category-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}

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

.answers-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.answer-simple {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.answer-simple strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.answer-simple p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.no-questions-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .export-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .ai-model-select {
        width: 100%;
        text-align: center;
    }
    
    .export-controls .btn {
        width: 100%;
        justify-content: center;
    }
    
    .answers-simple {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .question-item {
        padding: 16px;
    }
    
    .questions-overview {
        padding: 20px;
    }
    
    .category-section {
        padding: 20px;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
}

/* Question Preview Modal */
.question-preview-modal {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.question-preview-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-preview-modal .modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.question-preview-modal .modal-body {
    padding: 0;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-info {
    padding: 20px 25px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.preview-type-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.preview-type-info p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.preview-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.preview-meta span {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.questions-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-controls {
    padding: 20px 25px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.preview-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-filter label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.preview-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    min-width: 150px;
}

.preview-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.preview-search input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.preview-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 25px 20px 25px;
    max-height: 400px;
}

.preview-question-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.preview-question-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.preview-question-number {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.preview-question-section {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.preview-question-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.preview-question-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.preview-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.preview-no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.question-preview-modal .modal-footer {
    padding: 20px 25px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Quick Look Button Styles */
.quick-look-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-look-btn:hover {
    background: var(--primary-dark, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quick-look-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-look-btn i {
    font-size: 0.75rem;
}

/* Assessment Type Card Enhancements */
.assessment-type-card {
    position: relative;
    transition: all 0.3s ease;
}

.assessment-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.assessment-type-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.assessment-type-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .question-preview-modal {
        width: 95%;
        margin: 20px auto;
    }
    
    .preview-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .preview-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preview-filter select {
        min-width: auto;
    }
    
    .assessment-type-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* Version: 1.4 - Fixed Quick Look button visibility and hover states */