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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.header .subtitle {
    color: #86868b;
    font-size: 16px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 48px;
    max-width: 560px;
    width: 100%;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0071e3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed #d2d2d7;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #0071e3;
    background: #f5f8ff;
}

.upload-icon {
    color: #86868b;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: #86868b;
}

.upload-btn {
    width: 100%;
    background: #0071e3;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s;
}

.upload-btn:hover:not(:disabled) {
    background: #0077ed;
}

.upload-btn:disabled {
    background: #d2d2d7;
    cursor: not-allowed;
}

.notice {
    font-size: 12px;
    color: #86868b;
    text-align: center;
    margin-top: 12px;
}

.copyright {
    margin-top: 8px;
}

.notice a {
    color: #0071e3;
    text-decoration: none;
}

.notice a:hover {
    text-decoration: underline;
}

.auto-delete-notice {
    font-size: 12px;
    color: #86868b;
    text-align: center;
    margin-bottom: 16px;
}

.legal-notice a {
    color: #0071e3;
    text-decoration: none;
}

.legal-notice a:hover {
    text-decoration: underline;
}

.loading {
    display: none;
    text-align: center;
    padding: 32px;
    color: #86868b;
}

.loading.show {
    display: block;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #d2d2d7;
    border-top-color: #0071e3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.error {
    display: none;
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.error.show {
    display: block;
}

.results {
    display: none;
    margin-top: 16px;
}

.results.show {
    display: block;
}

#resultsTitle {
    font-size: 15px;
    color: #86868b;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    color: #856404;
}

.file-list {
    list-style: none;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f5f5f7;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-list li span {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.download-btn {
    background: #0071e3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #0077ed;
}

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

.actions.show {
    display: flex;
}

.download-all-btn, .upload-another-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.download-all-btn {
    background: #0071e3;
    color: white;
    border: none;
}

.download-all-btn:hover {
    background: #0077ed;
}

.upload-another-btn {
    background: white;
    color: #0071e3;
    border: 2px solid #0071e3;
}

.upload-another-btn:hover {
    background: #f5f8ff;
}

.no-files {
    color: #86868b;
    font-size: 14px;
    padding: 16px 0;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #d2d2d7;
    text-align: center;
    font-size: 13px;
    color: #86868b;
    width: 100%;
    max-width: 560px;
}

.footer a {
    color: #0071e3;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.legal-container {
    max-width: 720px;
}

.back-link {
    display: inline-block;
    color: #0071e3;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
}

.back-link:hover {
    text-decoration: underline;
}

.last-updated {
    color: #86868b;
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-container section {
    margin-bottom: 28px;
}

.legal-container h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.legal-container p {
    font-size: 15px;
    line-height: 1.6;
    color: #424245;
    margin-bottom: 12px;
}

.legal-container ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.legal-container li {
    font-size: 15px;
    line-height: 1.6;
    color: #424245;
    margin-bottom: 8px;
}

.legal-container a {
    color: #0071e3;
}
