/* Copyright Polymorph Corporation (2026) */

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

/*
 * Warm & Welcoming Color Palette
 * Designed for approachable, conversational AI persona
 */
:root {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --accent-primary: #3B82F6;    /* Warm blue */
    --accent-secondary: #10B981;  /* Soft teal */
    --accent-highlight: #F59E0B;  /* Warm amber */
    --border-light: #E5E7EB;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #E0F2FE 100%);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-bar {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.back-button {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.back-button:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Mode Selection View - Chat-First Landing Page */
.mode-selection {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    text-align: center;
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Primary CTA - Large, prominent button */
.primary-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: var(--accent-primary);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.primary-cta:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.primary-cta .arrow {
    font-size: 1.25rem;
}

/* Quick prompts section */
.quick-prompts {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.prompts-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.prompt-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prompt-button {
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.prompt-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: #EFF6FF;
}

/* Secondary option */
.secondary-option {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.divider-text {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.secondary-button {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.secondary-button:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Chat View */
.chat-view {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
}

.chat-view.active {
    display: flex;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-primary);
}

.message {
    max-width: 48rem;
    margin: 0 auto 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.message.user {
    background: #EFF6FF;
    border-left: 3px solid var(--accent-primary);
}

.message.assistant {
    background: white;
    border-left: 3px solid var(--accent-secondary);
    box-shadow: var(--shadow);
}

.message-role {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.message-content {
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-primary);
}

.input-container {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.input-wrapper {
    max-width: 48rem;
    margin: 0 auto;
    position: relative;
}

.input-box {
    width: 100%;
    padding: 1rem;
    padding-right: 3rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    background-color: white;
    color: var(--text-primary);
    font-size: 1rem;
    resize: none;
    outline: none;
    min-height: 52px;
    max-height: 200px;
    transition: border-color 0.2s;
}

.input-box:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-box:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-box::placeholder {
    color: var(--text-secondary);
}

.send-button {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #2563EB;
}

.send-button:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

.send-button svg {
    width: 1rem;
    height: 1rem;
}

.limit-message {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1rem;
    background-color: #FEE2E2;
    color: #991B1B;
    border-radius: 0.5rem;
    text-align: center;
    border-left: 3px solid #DC2626;
}

.welcome-message {
    max-width: 48rem;
    margin: 2rem auto;
    text-align: center;
    color: var(--text-secondary);
}

.welcome-message h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Suggestion buttons in chat welcome */
.suggestion-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.suggestion-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.suggestion-button:hover {
    background-color: #EFF6FF;
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.suggestion-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.suggestion-text {
    font-size: 0.9375rem;
    flex: 1;
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    color: #DC2626;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    background: #FEE2E2;
    border-radius: 0.375rem;
}

/* Vetting View */
.vetting-view {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
}

.vetting-view.active {
    display: flex;
}

.vetting-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-primary);
}

.vetting-content {
    max-width: 48rem;
    margin: 0 auto;
}

.vetting-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.vetting-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.vetting-intro p {
    color: var(--text-secondary);
}

.job-input-area {
    margin-bottom: 1.5rem;
}

.job-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    background-color: white;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.job-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.job-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.job-textarea::placeholder {
    color: var(--text-secondary);
}

.analyze-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.analyze-button:hover {
    background-color: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.analyze-button:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Display */
.vetting-results {
    display: none;
    margin-top: 2rem;
}

.vetting-results.active {
    display: block;
}

.overall-score {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-hover);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

.score-circle.strong { background: linear-gradient(135deg, #10B981 0%, #059669 100%); }
.score-circle.good { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.score-circle.partial { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); }
.score-circle.limited { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); }

.score-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
}

.match-category {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--text-primary);
}

.sub-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sub-score {
    background-color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.sub-score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.sub-score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.score-bar {
    height: 4px;
    background-color: var(--border-light);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.summary-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.summary-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.summary-text {
    line-height: 1.6;
    color: var(--text-primary);
}

.recommendation {
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.strengths-gaps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.list-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.list-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.list-section.strengths h3 {
    color: #10B981;
}

.list-section.gaps h3 {
    color: #F59E0B;
}

.list-section ul {
    list-style: none;
    padding: 0;
}

.list-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
    color: var(--text-primary);
}

.list-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.list-section.strengths li::before {
    background-color: #10B981;
}

.list-section.gaps li::before {
    background-color: #F59E0B;
}

/* Footer */
.footer {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-separator {
    color: var(--border-light);
}

.footer-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #2563EB;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .primary-cta {
        width: 100%;
        justify-content: center;
    }

    .prompt-buttons {
        width: 100%;
    }

    .sub-scores {
        grid-template-columns: 1fr;
    }

    .strengths-gaps {
        grid-template-columns: 1fr;
    }

    /* Responsive: stack suggestions on mobile */
    .suggestion-buttons {
        gap: 0.5rem;
    }

    .suggestion-button {
        padding: 0.875rem 1rem;
    }

    /* Stack footer vertically on mobile */
    .footer-content {
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-separator {
        display: none;
    }
}
