/* ============================================
   Design System & Variables
   ============================================ */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(99, 102, 241, 0.15);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --accent-glow: rgba(99, 102, 241, 0.3);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Base Styles & Reset
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Background Particles
   ============================================ */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Header
   ============================================ */
.header {
    padding: 48px 0 32px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 36px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 300;
}

/* ============================================
   Sections
   ============================================ */
.section {
    margin: 32px 0;
    padding: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    animation: fadeInUp 0.6s ease-out;
    transition: border-color var(--transition-normal);
}

.section:hover {
    border-color: var(--border-hover);
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-icon {
    font-size: 24px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-left: auto;
}

/* ============================================
   Resume Section
   ============================================ */
.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-card {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-normal);
}

.info-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.skills-container, .certificates-container {
    margin-top: 16px;
}

.skills-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: #a5b4fc;
    transition: all var(--transition-fast);
    cursor: default;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.cert-tag {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.cert-tag:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* ============================================
   Config Section
   ============================================ */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-icon {
    font-size: 16px;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.config-select {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.config-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.config-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Keywords */
.keywords-section {
    margin-bottom: 24px;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.keyword-btn {
    padding: 8px 18px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.keyword-btn:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-secondary);
}

.keyword-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: #a5b4fc;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.keyword-btn.active:hover {
    background: rgba(99, 102, 241, 0.25);
}

.add-keyword-wrapper {
    display: flex;
    gap: 4px;
}

.custom-keyword-input {
    padding: 8px 14px;
    width: 130px;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: all var(--transition-fast);
}

.custom-keyword-input:focus {
    border-color: var(--accent-primary);
    border-style: solid;
    background: rgba(99, 102, 241, 0.05);
}

.custom-keyword-input::placeholder {
    color: var(--text-muted);
}

.add-keyword-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.add-keyword-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

/* Requirements Tags */
.req-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.req-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.req-tag input[type="checkbox"] {
    display: none;
}

.req-tag-text {
    font-size: 13px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.req-tag.checked {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.req-tag.checked .req-tag-text {
    color: #6ee7b7;
}

.req-tag:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ============================================
   Platforms Section
   ============================================ */
.search-all-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.search-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.search-all-btn:hover::before {
    left: 100%;
}

.search-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.search-all-btn:active {
    transform: translateY(0);
}

.search-all-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.search-all-btn span:nth-child(2) {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.search-all-hint {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.platform-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.platform-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.platform-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.boss-logo { background: linear-gradient(135deg, #00c2b0, #00a89d); }
.zhilian-logo { background: linear-gradient(135deg, #1677ff, #4096ff); }
.job51-logo { background: linear-gradient(135deg, #ff6600, #ff8533); }
.city58-logo { background: linear-gradient(135deg, #ff5722, #ff7043); }
.liepin-logo { background: linear-gradient(135deg, #0070c0, #2196f3); }
.lagou-logo { background: linear-gradient(135deg, #11be8c, #00d68f); }

.platform-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.platform-info h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-tag {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
}

.platform-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.platform-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.platform-keyword-tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.platform-actions {
    margin-top: auto;
    padding-top: 8px;
}

.platform-search-btn {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.platform-search-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.platform-search-btn:active {
    transform: translateY(0);
}

/* ============================================
   Tips Section
   ============================================ */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.tip-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-normal);
}

.tip-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.tip-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.tip-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tip-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(99, 102, 241, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-family: var(--font-family);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Animations for staggered entry
   ============================================ */
.resume-section { animation-delay: 0.1s; }
.requirements-section { animation-delay: 0.2s; }
.platforms-section { animation-delay: 0.3s; }
.tips-section { animation-delay: 0.4s; }

.platform-card {
    animation: fadeInUp 0.5s ease-out both;
}

.platform-card:nth-child(1) { animation-delay: 0.35s; }
.platform-card:nth-child(2) { animation-delay: 0.4s; }
.platform-card:nth-child(3) { animation-delay: 0.45s; }
.platform-card:nth-child(4) { animation-delay: 0.5s; }
.platform-card:nth-child(5) { animation-delay: 0.55s; }
.platform-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   Links Modal & Edit Form
   ============================================ */
.edit-resume-btn,
.download-resume-btn {
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-fast);
}

.download-resume-btn {
    margin-left: auto;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.edit-resume-btn {
    margin-left: 8px;
}

.edit-resume-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    color: #a5b4fc;
}

.download-resume-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #6ee7b7;
}

.edit-form-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.edit-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-form-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.edit-input, .edit-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.edit-textarea {
    resize: vertical;
    line-height: 1.5;
}

.edit-input:focus, .edit-textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.save-resume-btn {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}

.save-resume-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.links-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.links-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.links-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    padding: 28px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.links-modal-overlay.show .links-modal {
    transform: scale(1) translateY(0);
}

.links-modal-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.links-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.links-modal-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-close-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.links-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.modal-link-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.modal-link-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.modal-link-name {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.modal-link-arrow {
    font-size: 18px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.modal-link-item:hover .modal-link-arrow {
    color: var(--accent-primary);
}

.links-modal-footer {
    margin-top: 20px;
    text-align: center;
}

.links-modal-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 32px 0 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .section {
        padding: 20px;
        margin: 20px 0;
        border-radius: var(--radius-lg);
    }
    
    .resume-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-desc {
        display: none;
    }
    
    .info-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .resume-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .search-all-btn span:nth-child(2) {
        font-size: 16px;
    }
}

/* ============================================
   AI Job Analyzer — Polished UI
   ============================================ */
.ai-section {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(30, 41, 59, 0.7));
    border: 1px solid rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
}

.ai-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.8), transparent);
}

.ai-section .section-header {
    margin-bottom: 24px;
}

.ai-input-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
}

.ai-textarea-wrapper {
    position: relative;
    width: 100%;
}

.ai-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 18px 20px;
    background: rgba(10, 14, 26, 0.85) !important;
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    color: #f1f5f9 !important;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.75;
    resize: vertical;
    min-height: 200px;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ai-textarea::placeholder {
    color: #64748b;
    line-height: 1.75;
}

.ai-textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 0 3px rgba(99, 102, 241, 0.15),
        0 0 30px rgba(139, 92, 246, 0.15);
}

.ai-char-count-inline {
    position: absolute;
    bottom: 12px;
    right: 18px;
    padding: 4px 10px;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
}

.ai-char-count-inline.warn {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.4);
}

.ai-char-count-inline.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
}

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

.ai-analyze-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-normal);
    box-shadow:
        0 4px 20px rgba(99, 102, 241, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-analyze-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.ai-analyze-btn:hover:not(:disabled) {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow:
        0 6px 30px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ai-analyze-btn:hover:not(:disabled)::before {
    left: 100%;
}

.ai-analyze-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ai-analyze-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: linear-gradient(135deg, #475569, #64748b);
    box-shadow: none;
}

.ai-clear-btn {
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}

.ai-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.ai-char-count {
    display: none; /* 改用 textarea 右下角内嵌 */
}

.ai-result {
    margin-top: 20px;
}

.ai-loading {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.ai-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.ai-loading-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.ai-error {
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #fca5a5;
}

.ai-error h4 {
    margin-bottom: 8px;
}

.ai-error-detail {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.ai-card {
    padding: 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.ai-card.verdict-good {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.ai-card.verdict-warn {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

.ai-card.verdict-bad {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

.ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 16px;
    flex-wrap: wrap;
}

.ai-score-big {
    font-size: 32px;
    letter-spacing: 2px;
}

.ai-verdict {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 700;
}

.ai-verdict.verdict-good {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.ai-verdict.verdict-warn {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.ai-verdict.verdict-bad {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.ai-verdict-reason {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 20px;
}

.ai-dimensions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.dim-row {
    display: grid;
    grid-template-columns: 120px 100px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.dim-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.dim-stars {
    color: #fbbf24;
    letter-spacing: 2px;
    font-size: 14px;
}

.dim-note {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.ai-warnings,
.ai-highlights {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.ai-warnings {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ai-highlights {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ai-warnings h4 {
    color: var(--danger);
    margin-bottom: 8px;
    font-size: 14px;
}

.ai-highlights h4 {
    color: var(--success);
    margin-bottom: 8px;
    font-size: 14px;
}

.ai-warnings ul,
.ai-highlights ul {
    list-style: none;
    padding-left: 0;
}

.ai-warnings li,
.ai-highlights li {
    padding: 4px 0 4px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.ai-warnings li::before {
    content: '⚠';
    position: absolute;
    left: 0;
}

.ai-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
}

.ai-history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ai-history-header h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.ai-history-header .ai-clear-btn {
    margin-left: auto;
}

.ai-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-history-item {
    padding: 14px 16px;
    background: var(--bg-card);
    border-left: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.ai-history-item:hover {
    background: var(--bg-card-hover);
}

.ai-history-item.verdict-good {
    border-left-color: var(--success);
}

.ai-history-item.verdict-warn {
    border-left-color: var(--warning);
}

.ai-history-item.verdict-bad {
    border-left-color: var(--danger);
}

.ai-history-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ai-history-stars {
    font-size: 14px;
}

.ai-history-verdict {
    padding: 2px 10px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    font-size: 12px;
    color: var(--accent-primary);
}

.ai-history-date {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.ai-history-reason {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
}

.ai-history-preview {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .dim-row {
        grid-template-columns: 90px 80px 1fr;
        font-size: 12px;
    }
    .ai-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ai-score-big {
        font-size: 24px;
    }
}

/* 平台"最近活跃"提示 */
.fresh-tip {
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #fbbf24;
    line-height: 1.5;
}

/* ============================================
   Application Tracker
   ============================================ */
.tracker-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    padding: 14px 12px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.tracker-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tracker-filter {
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 13px;
    font-family: var(--font-family);
    cursor: pointer;
}

.add-application-form {
    display: none;
    padding: 20px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    margin-bottom: 20px;
}

.add-application-form.show {
    display: block;
    animation: fadeInUp 0.3s;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-input {
    padding: 10px 14px;
    background: rgba(10, 14, 26, 0.85);
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    color: #f1f5f9;
    font-family: var(--font-family);
    font-size: 13px;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.7);
}

.form-input::placeholder { color: #64748b; }

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

.tracker-empty {
    padding: 40px 20px;
    text-align: center;
    background: rgba(10, 14, 26, 0.5);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: var(--text-secondary);
}

.tracker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tracker-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.tracker-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.tracker-item.need-followup {
    border-left: 3px solid var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.tracker-main {
    flex: 1;
    min-width: 0;
}

.tracker-title {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--text-primary);
}

.tracker-position {
    color: var(--text-secondary);
}

.tracker-salary {
    padding: 2px 10px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    font-size: 12px;
    color: #6ee7b7;
}

.tracker-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}

.followup-badge {
    color: var(--warning) !important;
    font-weight: 600;
}

.tracker-notes {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tracker-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.tracker-status-select {
    padding: 6px 10px;
    background: rgba(10, 14, 26, 0.9);
    border: 1.5px solid;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 12px;
    font-family: var(--font-family);
    cursor: pointer;
}

.tracker-delete {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tracker-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* AI 优化按钮 */
.ai-optimize-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}

.ai-optimize-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.ai-optimize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI 优化预览 modal */
.optimize-preview-body {
    padding: 20px 24px;
}

.optimize-section {
    margin-bottom: 16px;
}

.optimize-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.optimize-text {
    padding: 14px 16px;
    background: rgba(10, 14, 26, 0.8);
    border-radius: 10px;
    color: #f1f5f9;
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.optimize-text.original {
    border-left: 3px solid var(--text-muted);
}

.optimize-text.optimized {
    border-left: 3px solid var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.optimize-changes {
    padding: 14px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    margin-bottom: 16px;
}

.optimize-changes ul {
    margin-top: 8px;
    padding-left: 20px;
}

.optimize-changes li {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.optimize-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .tracker-item { flex-direction: column; }
    .tracker-actions { width: 100%; }
    .tracker-stats { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
}
