/* Career Prep System - Integrated Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-image: url('/static/images/wallpaper2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.97);
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-top: 5px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

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

.config-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.config-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.question-info {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.criteria-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.criteria-section h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.criteria-section ul {
    margin-left: 20px;
}

.criteria-section li {
    color: #666;
    margin-bottom: 5px;
    line-height: 1.5;
}

.score-display {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid #e0e0e0;
    transition: all 0.5s ease;
}

.score-circle.passed {
    border-color: #28a745;
    background: #d4edda;
}

.score-circle.failed {
    border-color: #dc3545;
    background: #f8d7da;
}

.score-value {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
}

.score-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-message {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.status-message.success {
    background: #d4edda;
    border: 2px solid #28a745;
}

.status-message.info {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
}

.status-message h3 {
    color: #333;
    margin-bottom: 10px;
}

.status-message p {
    color: #666;
    margin-bottom: 5px;
}

.skill-breakdown {
    margin-bottom: 30px;
}

.skill-breakdown h3 {
    color: #333;
    margin-bottom: 15px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.skill-item {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-item.good {
    background: #d4edda;
    border: 2px solid #28a745;
}

.skill-item.needs-work {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.skill-name {
    font-weight: 600;
    color: #333;
}

.skill-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
}

.recommendations h3 {
    color: #333;
    margin-bottom: 15px;
}

.resources-list {
    display: grid;
    gap: 15px;
}

.resource-card {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.resource-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.resource-header h4 {
    color: #333;
    flex: 1;
}

.cost-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.cost-badge.free {
    background: #28a745;
    color: white;
}

.cost-badge.discount {
    background: #17a2b8;
    color: white;
}

.cost-badge.trial {
    background: #ffc107;
    color: #333;
}

.cost-badge.paid {
    background: #6c757d;
    color: white;
}

.resource-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.resource-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.resource-type,
.resource-skills {
    font-size: 0.9rem;
    color: #999;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 100px auto 20px;
}

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

#loading-text {
    text-align: center;
    color: white;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Intelligent Threshold Styles */
.ai-info {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.ai-info p {
    color: #333;
    margin: 0;
    font-size: 0.95rem;
}

.threshold-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.threshold-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.threshold-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.threshold-value {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
}

.threshold-reasoning {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.threshold-explanation {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.threshold-explanation h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.threshold-explanation p {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

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

.criticality-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: capitalize;
    align-self: flex-start;
}

.criticality-badge.critical {
    background: #dc3545;
    color: white;
}

.criticality-badge.important {
    background: #ffc107;
    color: #333;
}

.criticality-badge.nice-to-have {
    background: #6c757d;
    color: white;
}


/* Skill-grouped resources */
.skill-resources {
    margin-bottom: 2rem;
}

.skill-header {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.resource-header h5 {
    margin: 0;
    flex: 1;
}

.badge-free {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-student-credits {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-student-discount {
    background: #eab308;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-student-program {
    background: #a855f7;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-discount {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-paid {
    background: #6b7280;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-type {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.resource-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}


/* Sidebar Layout */
.app-container {
    position: relative;
    min-height: 100vh;
}

.history-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.history-sidebar.collapsed {
    transform: translateX(-350px);
}

.history-sidebar.collapsed .btn-icon {
    transform: rotate(0deg);
}

.history-sidebar:not(.collapsed) .btn-icon {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.history-sidebar.collapsed .btn-icon {
    transform: rotate(180deg);
}

.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.round-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

.round-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.round-item.expanded {
    background: #e7f3ff;
    border-left-color: #2196F3;
}

.round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.round-title {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.round-score {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
}

.round-score.passed {
    color: #4caf50;
}

.round-score.failed {
    color: #f44336;
}

.round-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.round-item.expanded .round-details {
    display: block;
}

.question-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.question-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.question-skill {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.answer-text {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 5px;
}

.resources-summary {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.resources-summary h5 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #333;
}

.resource-link {
    display: block;
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.resource-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.main-content {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
}

/* Adjust container for sidebar layout */
.main-content .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Toggle button when sidebar is collapsed */
.sidebar-toggle-btn {
    position: fixed;
    left: 10px;
    top: 20px;
    z-index: 99;
    background: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1rem;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.sidebar-toggle-btn.has-rounds {
    background: #667eea;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 2px 20px rgba(102, 126, 234, 0.8);
    }
}

.history-sidebar.collapsed ~ .main-content .sidebar-toggle-btn {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-sidebar {
        width: 300px;
    }
    
    .history-sidebar.collapsed {
        transform: translateX(-300px);
    }
    
    .main-content .container {
        padding: 20px 15px;
    }
}
