/* ============================================
   App Styles — 智汇简历助手
   Material Design 3 + Resume Preview
   ============================================ */

/* Resume preview inside .resume-canvas */
.resume-canvas {
    aspect-ratio: 1 / 1.414;
    overflow-y: auto;
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
    line-height: 1.7;
    color: #333;
}

.resume-canvas .resume-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.resume-canvas .resume-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.25rem;
}

.resume-canvas .resume-target {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.resume-canvas .match-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.resume-canvas .skills-section {
    margin-bottom: 1.5rem;
}

.resume-canvas .skills-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.resume-canvas .skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-canvas .skill-tag {
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-family: sans-serif;
}

.resume-canvas .resume-body {
    font-size: 0.9375rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Edit mode textarea */
.edit-textarea {
    width: 100%;
    min-height: 600px;
    font-family: 'Noto Sans SC', monospace;
    font-size: 14px;
    line-height: 1.8;
    padding: 1.5rem;
    border: 1px solid #c5c5d3;
    border-radius: 0.5rem;
    background: #f7f9fb;
    color: #191c1e;
    resize: vertical;
}

.edit-textarea:focus {
    outline: none;
    border-color: #00236f;
    ring: 1px solid #00236f;
}

/* Download dropdown */
.download-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 160px;
    background: white;
    border: 1px solid #c5c5d3;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 50;
}

.download-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #444651;
    transition: background-color 0.15s;
}

.download-dropdown a:hover {
    background: #f2f4f6;
    color: #00236f;
}

/* Skill analysis styles */
.skill-bar {
    height: 8px;
    border-radius: 4px;
    background: #e0e3e5;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

.skill-tag-gap {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Loading spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Print styles for PDF generation */
@media print {
    .resume-canvas {
        font-size: 11pt;
        line-height: 1.5;
    }
    .resume-canvas .resume-body {
        font-size: 10.5pt;
    }
}

/* Utility: line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
