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

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

.container {
   max-width: 1000px;
   margin: 0 auto;
   background: white;
   border-radius: 12px;
   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: 30px;
   text-align: center;
}

.header h1 { 
   font-size: 28px; 
   margin-bottom: 5px; 
}

.header p { 
   opacity: 0.9; 
   font-size: 14px; 
}

.content { 
   padding: 30px; 
}

.section {
   background: #f8f9fa;
   border-radius: 8px;
   padding: 25px;
   margin-bottom: 25px;
}

.section h2 {
   color: #667eea;
   margin-bottom: 20px;
   font-size: 20px;
   display: flex;
   align-items: center;
}

.section h2::before {
   content: '📁';
   margin-right: 10px;
   font-size: 24px;
}

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

label {
   display: block;
   margin-bottom: 8px;
   color: #333;
   font-weight: 500;
}

input[type="file"], 
select, 
textarea {
   width: 100%;
   padding: 12px;
   border: 2px solid #e0e0e0;
   border-radius: 6px;
   font-size: 14px;
   transition: border 0.3s;
}

input[type="file"]:focus, 
select:focus, 
textarea:focus {
   outline: none;
   border-color: #667eea;
}

textarea {
   resize: vertical;
   min-height: 100px;
   font-family: inherit;
}

button {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
   border: none;
   padding: 12px 30px;
   border-radius: 6px;
   cursor: pointer;
   font-size: 15px;
   font-weight: 500;
   transition: transform 0.2s, box-shadow 0.2s;
}

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

button:disabled {
   background: #ccc;
   cursor: not-allowed;
   opacity: 0.6;
   transform: none;
}

.message {
   background: #d4edda;
   color: #155724;
   padding: 12px 20px;
   border-radius: 6px;
   margin-bottom: 20px;
   border-left: 4px solid #28a745;
}

.list {
   background: white;
   border-radius: 8px;
   overflow: hidden;
}

.item {
   padding: 15px 20px;
   border-bottom: 1px solid #e0e0e0;
   display: flex;
   align-items: center;
   justify-content: space-between;
   transition: background 0.2s;
}

.item:hover { 
   background: #f8f9fa; 
}

.item:last-child { 
   border-bottom: none; 
}

.item-info {
   flex: 1;
   min-width: 0;
}

.item-name {
   font-weight: 500;
   color: #333;
   margin-bottom: 5px;
   word-break: break-all;
}

.item-meta {
   font-size: 13px;
   color: #666;
}

.item-actions {
   display: flex;
   gap: 8px;
   margin-left: 15px;
}

.btn-small {
   padding: 6px 12px;
   font-size: 13px;
   text-decoration: none;
   background: #667eea;
   color: white;
   border-radius: 4px;
   transition: background 0.2s;
}

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

.btn-delete { 
   background: #dc3545; 
}

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

.btn-view {
   background: #17a2b8;
}

.btn-view:hover {
   background: #138496;
}

.btn-copy {
   background: #28a745;
}

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

.empty {
   text-align: center;
   color: #999;
   padding: 40px;
   font-size: 15px;
}

.text-preview, .text-full {
   background: #f8f9fa;
   padding: 10px;
   border-radius: 4px;
   margin-top: 8px;
   font-size: 13px;
   color: #555;
}

.text-preview pre, .text-full pre {
   margin: 0;
   white-space: pre-wrap;
   word-break: break-all;
   font-family: 'Courier New', Courier, monospace;
}

.text-full {
   max-height: 300px;
   overflow-y: auto;
}

/* 文件选择提示 */
#fileInfo {
   margin-top: 10px;
   padding: 12px 15px;
   background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
   border-radius: 6px;
   color: #2e7d32;
   font-size: 13px;
   border-left: 4px solid #4CAF50;
   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
   animation: slideIn 0.3s ease;
}

@keyframes slideIn {
   from {
       opacity: 0;
       transform: translateY(-10px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

/* 进度条容器 */
#progressContainer {
   margin-top: 20px;
   padding: 20px;
   background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
   border-radius: 10px;
   border: 1px solid #ddd;
   box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#progressBarWrapper {
   background: #f0f0f0;
   border-radius: 10px;
   overflow: hidden;
   height: 35px;
   position: relative;
   box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#progressBar {
   background: linear-gradient(90deg, #4CAF50, #45a049);
   height: 100%;
   width: 0%;
   transition: width 0.3s ease;
   box-shadow: 0 2px 4px rgba(76, 175, 80, 0.4);
   border-radius: 10px;
   position: relative;
   overflow: hidden;
}

#progressBar::after {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   bottom: 0;
   right: 0;
   background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
   animation: shimmer 2s infinite;
}

@keyframes shimmer {
   0% { transform: translateX(-100%); }
   100% { transform: translateX(100%); }
}

#progressText {
   margin-top: 8px;
   font-size: 14px;
   font-weight: bold;
   color: #333;
   text-align: center;
}

#speedText {
   font-family: 'Courier New', monospace;
   font-weight: bold;
   font-size: 14px;
   color: #2196F3;
}

#uploadedSize,
#totalSize {
   font-weight: bold;
}

#statusText {
   font-style: italic;
   animation: pulse 2s infinite;
}

@keyframes pulse {
   0%, 100% { opacity: 1; }
   50% { opacity: 0.7; }
}

/* 响应式设计 */
@media (max-width: 768px) {
   body {
       padding: 10px;
   }
   
   .container {
       border-radius: 8px;
   }
   
   .header {
       padding: 20px;
   }
   
   .header h1 {
       font-size: 22px;
   }
   
   .content {
       padding: 15px;
   }
   
   .section {
       padding: 15px;
   }
   
   .item {
       flex-direction: column;
       align-items: flex-start;
       gap: 10px;
   }
   
   .item-actions {
       width: 100%;
       margin-left: 0;
       justify-content: flex-end;
   }
   
   button {
       width: 100%;
   }
}

/* 上传日志样式 */
.log-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.log-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.log-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

.log-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.log-table tbody tr:hover {
    background: #f8f9fa;
}

.log-table tbody tr:last-child {
    border-bottom: none;
}

.log-table td {
    padding: 12px 15px;
    color: #333;
}

.log-filename {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .log-table {
        font-size: 11px;
    }
    
    .log-table th,
    .log-table td {
        padding: 8px 10px;
    }
    
    .log-filename {
        max-width: 150px;
    }
}