/* ==========================================================================
   CloudSync (cs.gyxkk.cc) Core Stylesheet
   Design System: Premium Clean White / High Contrast Minimalist
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* Color Variables */
:root {
  --bg-primary: #f8fafc; /* 极干净的浅石板底色 */
  --bg-secondary: #ffffff; /* 纯白 */
  --bg-glass: #ffffff; /* 卡片采用纯白底 */
  --bg-glass-hover: #ffffff;
  --border-glow: #e2e8f0;
  
  --cyan: #0061ff; /* 经典活力蓝 (Dropbox Blue) */
  --cyan-glow: rgba(0, 97, 255, 0.08);
  --purple: #4f46e5; /* 靛蓝点缀色 */
  --purple-glow: rgba(79, 70, 229, 0.08);
  --accent-gradient: linear-gradient(135deg, #0061ff, #4f46e5);
  
  --text-primary: #0f172a; /* 高对比度深石板灰 */
  --text-secondary: #334155; /* 中灰 */
  --text-muted: #64748b; /* 辅助灰 */
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
  
  --transition-smooth: all 0.2s ease-in-out;
  --shadow-premium: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Layout Elements */
.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  color: var(--cyan);
  background: #f1f5f9;
}

.nav-btn.primary {
  background: var(--cyan);
  color: #fff;
}

.nav-btn.primary:hover {
  background: #0052cc;
  color: #fff;
}

/* Footer */
footer {
  padding: 24px 0;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Page Transitions */
.fade-in {
  animation: pageFadeIn 0.25s ease-out forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dual Panel Grid (Landing Page) */
.console-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin: 24px 0;
  flex: 1;
}

@media (max-width: 900px) {
  .console-grid {
    grid-template-columns: 1fr;
  }
}

/* White Panels */
.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
}

.panel-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Drag and Drop File Dropzone */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--border-radius-sm);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--cyan);
  background: #f0f7ff;
}

.dropzone-icon {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--cyan);
}

.dropzone-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 2px;
}

.dropzone-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.file-input {
  display: none;
}

/* Custom UI Inputs & Buttons */
.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-control {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 97, 255, 0.08);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--cyan);
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: #0052cc;
  color: #fff;
}

.btn-cyan {
  background: #ffffff;
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

.btn-cyan:hover {
  background: var(--cyan);
  color: #fff;
}

.btn-danger {
  background: #fff;
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* Alert Notification Bars */
.alert {
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.1);
  color: #c53030;
}

.alert-success {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

.alert-info {
  background: rgba(0, 97, 255, 0.04);
  border-color: rgba(0, 97, 255, 0.08);
  color: #1e3a8a;
}

/* Quota / Storage Progress Meter */
.quota-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}

.quota-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.quota-bar-wrapper {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Upload Progress Modal/Overlay */
.upload-progress-card {
  margin-top: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
}

.upload-file-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.upload-bar-wrapper {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.upload-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--cyan);
  transition: width 0.1s linear;
}

/* Grid & Tables for Files List */
.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.file-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.file-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
  font-size: 14px;
  transition: background 0.15s;
}

.file-row:last-child {
  border-bottom: none;
}

.file-row:hover {
  background: #f8fafc;
}

.file-row.header-row {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-col.name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-icon {
  font-size: 16px;
  color: var(--cyan);
}

.file-col.actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.action-icon-btn {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.action-icon-btn:hover {
  background: #f1f5f9;
  color: var(--cyan);
  border-color: var(--cyan);
}

.action-icon-btn.delete:hover {
  background: #fef2f2;
  border-color: var(--danger);
  color: var(--danger);
}

.action-icon-btn.share:hover {
  background: #f5f3ff;
  border-color: var(--purple);
  color: var(--purple);
}

/* Sharing Modal & Popup Cards */
.share-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.share-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.share-modal-card {
  width: 100%;
  max-width: 440px;
  transform: translateY(12px);
  transition: var(--transition-smooth);
  background: #fff;
  border: 1px solid #cbd5e1;
}

.share-modal-backdrop.active .share-modal-card {
  transform: translateY(0);
}

.share-link-box {
  display: flex;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  padding: 4px;
}

.share-link-input {
  background: transparent !important;
  border: none !important;
  flex: 1;
  color: var(--cyan) !important;
  font-family: monospace !important;
  font-weight: 600;
}

/* Real-time Transmission Dashboard */
.transfer-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

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

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.room-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(0, 97, 255, 0.3); }
  70% { transform: scale(1.1); opacity: 0.5; box-shadow: 0 0 0 6px rgba(0, 97, 255, 0); }
  100% { transform: scale(0.9); opacity: 0; box-shadow: 0 0 0 0 rgba(0, 97, 255, 0); }
}

/* Real-time Clipboard Chat-like Area */
.clipboard-display {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  padding: 10px;
  min-height: 200px;
  max-height: 280px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Transfer Verification Code Input screen */
.verification-card {
  width: 100%;
  max-width: 360px;
  margin: 40px auto;
}

.digit-group {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 16px 0;
}

.digit-input {
  width: 44px;
  height: 50px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  color: var(--cyan);
  text-align: center;
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.digit-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 97, 255, 0.08);
  background: #ffffff;
}

/* CSS Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex-row-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
