body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 18px;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.back-link {
    text-decoration: none;
    background: #6b7280;
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: bold;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

h1, h2 {
    margin-top: 0;
}

p {
    line-height: 1.8;
    color: #374151;
}

input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    margin-bottom: 12px;
    box-sizing: border-box;
    font-size: 15px;
}

button {
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

.status-box {
    margin-top: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.status-line {
    margin-bottom: 8px;
    line-height: 1.8;
}

.message {
    margin-top: 14px;
    min-height: 22px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #374151;
    line-height: 1.7;
    white-space: pre-line;
}

.message:empty {
    display: none;
}

.message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.message.success {
    background: #ecfdf5;
    color: #166534;
    border-color: #86efac;
}

.message.waiting {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.muted {
    color: #6b7280;
}

.action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resume-panel {
    display: none;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #86efac;
    background: #ecfdf5;
    border-radius: 14px;
    color: #14532d;
}

.resume-panel.show {
    display: block;
}

.resume-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.resume-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.resume-meta-item {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 8px;
}

.resume-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal-mask.show {
    display: flex;
}

.modal-card {
    width: min(480px, calc(100vw - 32px));
    background: white;
    border: 1px solid #dbe2ea;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20);
    padding: 24px 20px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.modal-icon.info {
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: #1d4ed8;
}

.modal-icon.success {
    background: linear-gradient(135deg, #dbeafe, #dcfce7);
    color: #166534;
}

.modal-icon.warning {
    background: linear-gradient(135deg, #fef3c7, #fee2e2);
    color: #92400e;
}

.modal-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #111827;
}

.modal-body {
    color: #4b5563;
    line-height: 1.8;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.modal-actions button {
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.modal-actions .primary {
    background: #2563eb;
    color: white;
}

.modal-actions .secondary {
    background: #6b7280;
    color: white;
}

.modal-actions .danger {
    background: #ef4444;
    color: white;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 20px 12px;
    }

    .card {
        padding: 18px 14px;
        border-radius: 16px;
    }

    .top-row h1 {
        font-size: 24px;
        margin-bottom: 0;
    }

    .action-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .action-row button {
        width: 100%;
    }

    .resume-meta {
        grid-template-columns: 1fr;
    }

    .resume-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .modal-card {
        width: min(100vw - 20px, 520px);
        padding: 18px 14px;
        border-radius: 18px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        font-size: 13px;
        line-height: 1.7;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}
