/* style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

header {
    margin-bottom: 20px;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.qr-code {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
    display: block;
}

.actions .action-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.action-card h2 {
    margin-top: 0;
    font-size: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-secondary {
    background-color: #28a745;
    color: #fff;
}

.find-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.find-form input[type="text"] {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.create-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
}

.code-display {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

#copy-btn {
    margin-bottom: 20px;
}

.content-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    white-space: pre-wrap; /* a尊重换行和空格 */
    word-wrap: break-word;
    margin-bottom: 20px;
}

.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 100px;
    border: 2px dashed #007bff;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* 移除手机端点击高亮 */
}

.file-upload-wrapper:hover, .file-upload-wrapper.dragover {
    background-color: #e2e6ea;
    border-color: #0056b3;
}

.file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.progress-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background-color: #28a745;
    width: 0%;
    transition: width 0.2s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
}

.file-upload-text {
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.file-list {
    margin-bottom: 20px;
    text-align: left;
}

.file-item {
    background-color: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #495057;
    display: flex;
    align-items: center;
}

.file-item::before {
    content: '📄';
    margin-right: 8px;
}

.files-container {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 20px;
}

.file-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.file-card:last-child {
    margin-bottom: 0;
}

.file-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.file-icon {
    font-size: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-thumbnail {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    display: block;
    transition: opacity 0.2s;
}

.file-thumbnail:hover {
    opacity: 0.8;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
    word-break: break-all;
}

.file-size {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.btn-download {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
    margin-left: 15px;
}

.btn-download:hover {
    background-color: #e0e0e0;
}

.text-center {
    text-align: center;
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}
