/* ExitGGh - 完整视频站样式 */
:root {
  --primary: #FF4136; --primary-dim: #cc332b;
  --accent: #0074D9; --accent-dim: #005bb5;
  --bg-deep: #0a0a1a; --bg-card: #111122; --bg-card-hover: #1a1a33;
  --bg-surface: #16162a; --bg-input: #0d0d20;
  --text-primary: #e8e8f0; --text-secondary: #8888aa; --text-dim: #555577;
  --border: #1e1e3a; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans SC",sans-serif;
  background: var(--bg-deep); color: var(--text-primary);
  min-height: 100vh; display: flex; flex-direction: column;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

/* Nav */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,26,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: var(--primary);
  color: #fff; border-radius: 8px; font-weight: bold; font-size: 15px;
}
.brand-text { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.brand-highlight { color: var(--primary); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--primary); background: rgba(255,65,54,0.1); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { font-size: 13px; color: var(--text-secondary); }
.btn-login, .btn-logout {
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); border: none;
}
.btn-login { background: var(--primary); color: #fff; }
.btn-login:hover { background: var(--primary-dim); }
.btn-logout { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* Main */
.main-content { flex: 1; max-width: 1200px; margin: 0 auto; padding: 20px 24px; width: 100%; }

/* Category bar */
.category-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.cat-tag {
  padding: 5px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: all var(--transition);
}
.cat-tag:hover { border-color: var(--primary); color: var(--text-primary); }
.cat-tag.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Video grid */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.video-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.video-card:hover {
  transform: translateY(-3px); border-color: rgba(255,65,54,0.3);
  box-shadow: 0 6px 24px rgba(255,65,54,0.1); background: var(--bg-card-hover);
}
.video-thumb {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--bg-surface); display: flex; align-items: center;
  justify-content: center; overflow: hidden;
}
.video-thumb video { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-icon {
  position: absolute; width: 50px; height: 50px;
  background: rgba(255,65,54,0.85); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; opacity: 0; transform: scale(0.8);
  transition: all var(--transition);
}
.video-card:hover .video-thumb-icon { opacity: 1; transform: scale(1); }
.video-card-info { padding: 12px; }
.video-card-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  margin-bottom: 6px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }

/* Loading / Empty */
.loading-state, .empty-state {
  grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-dim);
}
.loader {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top: 3px solid var(--primary); border-radius: 50%;
  margin: 0 auto 12px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { font-size: 40px; margin-bottom: 10px; }

/* Modal (video player) */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal-content {
  background: var(--bg-card); border-radius: var(--radius);
  max-width: 900px; width: 100%; max-height: 90vh;
  overflow-y: auto; border: 1px solid var(--border);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%; font-size: 20px;
  cursor: pointer; z-index: 10; display: flex;
  align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--primary); }
#videoPlayer { width: 100%; max-height: 65vh; display: block; background: #000; }
.video-detail { padding: 16px 20px; }
.video-detail-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.video-detail-meta { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--text-dim); }
.meta-category {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: rgba(255,65,54,0.15); color: var(--primary); font-size: 12px;
}
.video-detail-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }

/* Comments Section */
.comments-section { padding: 0 20px 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.comments-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.comment-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.comment-input {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text-primary);
  font-size: 13px; outline: none; transition: all var(--transition);
  font-family: inherit;
}
.comment-input:focus { border-color: var(--primary); }
.btn-comment {
  padding: 8px 18px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-comment:hover { background: var(--primary-dim); }
.btn-comment:disabled { opacity: 0.4; cursor: not-allowed; }
.comment-item {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.comment-item:last-child { border-bottom: none; }
.comment-user { color: var(--accent); font-weight: 600; margin-right: 8px; }
.comment-time { color: var(--text-dim); font-size: 11px; }
.comment-text { color: var(--text-secondary); margin-top: 4px; }

/* Login Modal */
.login-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 300;
  align-items: center; justify-content: center; padding: 20px;
}
.login-modal.open { display: flex; }
.login-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 32px; max-width: 360px; width: 100%;
  border: 1px solid var(--border);
}
.login-card h2 { text-align: center; margin-bottom: 4px; font-size: 20px; }
.login-card p { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }
.form-group { margin-bottom: 12px; }
.form-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px; outline: none;
  transition: all var(--transition); font-family: inherit;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(255,65,54,0.2); }
.auth-tabs { display: flex; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 8px; text-align: center; border: none;
  background: transparent; color: var(--text-secondary); font-size: 14px;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all var(--transition); font-weight: 500;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.btn-auth {
  width: 100%; padding: 10px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); margin-top: 8px;
}
.btn-auth:hover { background: var(--primary-dim); }
.auth-error { color: var(--primary); font-size: 12px; margin-top: 8px; text-align: center; display: none; }

/* Upload page */
.upload-page { padding-top: 30px; }
.upload-container { max-width: 520px; margin: 0 auto; }
.upload-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 28px;
}
.upload-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.upload-subtitle { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.upload-form { display: flex; flex-direction: column; gap: 12px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-textarea {
  resize: vertical; min-height: 60px; width: 100%;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px; outline: none;
  transition: all var(--transition); font-family: inherit;
}
.form-textarea:focus { border-color: var(--primary); }
.form-select {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px; outline: none;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888aa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.btn-upload {
  padding: 12px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); margin-top: 4px;
}
.btn-upload:hover { background: var(--primary-dim); box-shadow: 0 4px 16px rgba(255,65,54,0.3); }
.btn-upload:disabled { opacity: 0.4; cursor: not-allowed; }
.upload-message {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; display: none;
}
.upload-message.success { display: block; background: rgba(0,116,217,0.15); color: var(--accent); border: 1px solid rgba(0,116,217,0.3); }
.upload-message.error { display: block; background: rgba(255,65,54,0.15); color: var(--primary); border: 1px solid rgba(255,65,54,0.3); }

/* Ban overlay */
.ban-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #0a0a1a; flex-direction: column; gap: 16px;
}
.ban-overlay h1 { font-size: 48px; }
.ban-overlay h2 { font-size: 22px; color: var(--primary); }
.ban-overlay p { color: var(--text-dim); font-size: 14px; }
.ban-countdown { font-size: 28px; color: var(--primary); font-weight: 700; }

/* Footer */
.footer { text-align: center; padding: 18px; color: var(--text-dim); font-size: 13px; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  .nav-container { padding: 0 16px; gap: 10px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
}
