/* Compressed Interview Assessment Styles */
:root {
    --primary-color: #10b981;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --background: #ffffff;
    --surface: #f9fafb;
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.top-nav {
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

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

/* Candidate Management */
.candidate-management {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.candidate-header h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.btn-add {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: #059669;
    transform: translateY(-1px);
}

.candidates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.candidate-chip {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-sm);
}

.candidate-name {
    font-weight: 600;
}

.candidate-exp {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.remove-candidate {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.remove-candidate:hover {
    color: var(--danger-color);
}

.no-candidates {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Assessment Form */
.assessment-form {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.section {
    margin-bottom: 2rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

/* Basic Info */
.basic-info {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .basic-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

.basic-info input {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

.basic-info input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Question Items */
.question-item {
    margin-bottom: 1.5rem;
}

.question-item label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: var(--font-size-base);
}

/* Multi-Candidate Response System */
.multi-candidate-response {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.no-candidates-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
}

.candidate-response-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.candidate-response-row:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .candidate-response-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 1rem 0;
    }
}

.candidate-response-row:hover {
    background: rgba(16, 185, 129, 0.02);
    border-radius: var(--radius-sm);
}

.candidate-name {
    min-width: 100px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .candidate-name {
        min-width: 140px;
    }
}

.candidate-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Bar Scale System */
.bar-scale-container {
    flex: 1;
}

.scale-bar {
    height: 32px;
    background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.scale-bar:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.1);
}

.scale-bar:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.scale-bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.scale-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.scale-value-indicator {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: white;
    border: 2px solid;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
    z-index: 2;
}

.scale-labels-container {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding: 0 0.25rem;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.scale-numbers {
    display: flex;
    justify-content: space-between;
    margin-top: 0.125rem;
    padding: 0 0.25rem;
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.scale-numbers span {
    width: 16px;
    text-align: center;
}

/* Scale Bar Types */
.rating-bar {
    background: linear-gradient(90deg, #fef2f2 0%, #ecfdf5 100%);
}

.nps-bar {
    background: linear-gradient(90deg, #fef2f2 0%, #fff7ed 50%, #ecfdf5 100%);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .scale-bar {
        height: 36px;
        border-radius: 18px;
        margin: 0.5rem 0;
    }
    
    .scale-bar-fill {
        border-radius: 17px;
    }
    
    .scale-value-indicator {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .scale-labels-container {
        font-size: 13px;
        margin-top: 0.5rem;
    }
    
    .scale-numbers {
        font-size: 11px;
        margin-top: 0.25rem;
    }
    
    .scale-numbers span {
        width: 18px;
    }
}

@media (max-width: 480px) {
    .scale-bar {
        height: 40px;
        border-radius: 20px;
        margin: 0.75rem 0;
    }
    
    .scale-bar-fill {
        border-radius: 19px;
    }
    
    .scale-value-indicator {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .nps-bar .scale-numbers span {
        font-size: 9px;
        width: calc(100% / 11 - 0.1rem);
    }
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-base);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn.primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn.secondary:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 480px) {
    .actions {
        flex-direction: column;
    }
}

/* Results Section */
.results-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.results-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.candidate-result-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.candidate-result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.candidate-result-card h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
}


.assessment-info {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* History Modal */
.large-modal {
    width: 95%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.history-content {
    max-height: 60vh;
    overflow-y: auto;
}

.no-history {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 3rem;
    background: var(--surface);
    border-radius: var(--radius-md);
}

.history-item {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

.history-header h4 {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.history-date {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.history-details {
    margin-bottom: 1rem;
}

.history-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.75rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .history-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.candidates-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.candidate-tag {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-xs);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-small.secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-small.secondary:hover {
    background: var(--border-light);
    border-color: var(--primary-color);
}

.btn-small.danger {
    background: var(--danger-color);
    color: white;
}

.btn-small.danger:hover {
    background: #dc2626;
}

/* Email Templates */
.email-templates {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.email-template {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.template-header h4 {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: #059669;
    transform: translateY(-1px);
}

.template-content {
    padding: 1rem;
}

.template-content pre {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
    background: none;
}

/* Button Styling Updates */
.nav-links button {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-links button:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Section Descriptions */
.section-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 1rem;
    font-style: italic;
}

/* Question Explanations */
.question-explanation {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-style: italic;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-light);
}

/* Candidate Ranking */
.candidate-ranking {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    min-height: 100px;
}

.ranking-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
}

.ranking-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.rank-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.rank-handle {
    color: var(--text-muted);
    font-size: 20px;
    cursor: grab;
    flex-shrink: 0;
}

.rank-handle:active {
    cursor: grabbing;
}

.rank-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rank-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.rank-exp {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.rank-score {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .ranking-item {
        flex-wrap: wrap;
    }
    
    .rank-score {
        width: 100%;
        text-align: right;
        margin-top: 0.5rem;
    }
}

/* Additional Notes */
.additional-notes {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.note-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-item label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-base);
}

.candidate-notes {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.candidate-notes:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.candidate-notes::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Print Styles */
@media print {
    .top-nav, .candidate-management, .actions, .modal, .email-templates {
        display: none !important;
    }
    
    body {
        font-size: 12px;
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .assessment-form, .results-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .question-explanation {
        font-size: 10px;
    }
    
    .candidate-ranking, .additional-notes {
        page-break-inside: avoid;
    }
}
