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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

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

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

main {
    padding: 40px;
}

.paste-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

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

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

.char-count {
    text-align: right;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.form-hint {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.result-content h3 {
    color: #28a745;
    margin-bottom: 20px;
}

.result-url {
    margin-bottom: 20px;
}

.result-url label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.url-box {
    display: flex;
    gap: 10px;
}

.url-box input {
    flex: 1;
}

.copy-btn,
.delete-btn,
.new-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn {
    background: #667eea;
    color: white;
}

.copy-btn:hover {
    background: #5568d3;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.new-btn {
    background: #28a745;
    color: white;
    width: 100%;
    padding: 12px;
}

.new-btn:hover {
    background: #218838;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none;
}

.content-area {
    margin-top: 20px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.content-info {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.content-actions {
    display: flex;
    gap: 10px;
}

.content-wrapper {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.content-wrapper pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.content-wrapper code {
    color: #333;
}

.password-prompt {
    text-align: center;
    padding: 40px;
}

.password-prompt h3 {
    margin-bottom: 20px;
    color: #555;
}

.password-prompt .form-group {
    max-width: 400px;
    margin: 0 auto;
}

.password-prompt input {
    margin-bottom: 15px;
}

footer {
    padding: 30px 40px;
    background: #f8f9fa;
    text-align: center;
    color: #666;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* 模式切换 */
.mode-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.mode-content {
    margin-top: 20px;
}

/* 文件上传 */
.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8e8ff;
}

.file-upload-content p {
    margin: 10px 0;
    color: #666;
}

.file-hint {
    font-size: 12px;
    color: #999;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.file-info span:first-child {
    font-weight: 600;
    color: #333;
}

.file-info span:last-child {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.remove-file-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

.remove-file-btn:hover {
    background: #c82333;
}

/* 文件预览 */
.file-preview {
    text-align: center;
    padding: 40px;
}

.file-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.file-details h3 {
    margin-bottom: 10px;
    color: #333;
}

.file-details p {
    color: #666;
    margin: 5px 0;
}

/* 下载按钮 */
.download-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

.download-btn:hover {
    background: #218838;
    text-decoration: none;
    color: white;
}

/* 粘贴提示 */
.paste-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
    font-size: 14px;
    word-break: break-word;
}

.paste-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.paste-notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mode-switch {
        flex-direction: column;
    }

    header h1 {
        font-size: 2em;
    }

    main {
        padding: 20px;
    }
}
