/* clipboard.im 风格 - 极简网络剪贴板 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.nav-logo svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--primary);
}

/* 主内容 */
.main {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}

.card h1 {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

/* 房间输入 */
.room-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 12px;
}

.domain {
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.room-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-size: 16px;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 特性 */
.features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.feature svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* 帮助区域 */
.help-section {
  color: var(--text-secondary);
  font-size: 14px;
}

.help-section h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 12px;
}

.help-section ol,
.help-section ul {
  padding-left: 20px;
  line-height: 2;
}

.help-section code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

/* 房间头部 */
.room-header {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.room-url .label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.url {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.url b {
  color: var(--primary);
}

.btn-icon {
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--border);
  color: var(--text);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 卡片头部 */
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 15px;
}

.card-header svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.card-header .status {
  margin-left: auto;
  font-size: 12px;
  font-weight: normal;
  color: #059669;
}

/* 剪贴板 */
.clipboard-card textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.clipboard-card textarea:focus {
  border-color: var(--primary);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.btn-text:hover {
  color: #dc2626;
}

/* 文件上传 */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.upload-zone svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-bottom: 12px;
}

.upload-zone p {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-zone .hint {
  color: var(--text-secondary);
  font-size: 13px;
}

.uploading {
  color: var(--primary);
  font-weight: 500;
}

.upload-fail {
  text-align: center;
  color: #e74c3c;
  font-size: 14px;
}
.upload-fail p { margin-bottom: 12px; }
.btn-retry {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-retry:hover { opacity: 0.85; }

/* 文件列表 */
.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 8px;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-download {
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.btn-download:hover {
  background: var(--primary-dark);
}

/* 返回首页 */
.back-home {
  text-align: center;
  margin-top: 24px;
}

.back-home a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.back-home a:hover {
  color: var(--primary);
}

/* 弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 20px;
  outline: none;
}

.modal-content input:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
}

#qrCode {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

/* 视图切换 */
.view.hidden {
  display: none;
}

/* 响应式 */
@media (max-width: 640px) {
  .main {
    padding: 16px;
  }
  
  .card {
    padding: 24px 20px;
  }
  
  .features {
    gap: 20px;
  }
  
  .room-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .room-actions {
    width: 100%;
  }
  
  .room-actions button {
    flex: 1;
  }
}
