@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* ========== 基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #121212;
  color: #c9c9c9;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== 顶部导航 ========== */
header {
  background: #141414;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  border-bottom: 1px solid #2a2a2a;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  display: inline-flex;
}

.logo-could {
  color: #ffffff;
}

.logo-inject {
  color: #e84a7f;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  color: #888;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.header-right {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border-radius: 6px;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.btn-login {
  padding: 8px 16px;
  background: #e84a7f;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.btn-login:hover {
  background: #d43d6f;
}

/* ========== 主内容 ========== */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
}

.support-container {
  width: 100%;
}

.support-header {
  text-align: center;
  margin-bottom: 40px;
}

.support-header h1 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 10px;
}

.support-header h1 i {
  color: #e84a7f;
  margin-right: 12px;
}

.support-header p {
  color: #888;
  font-size: 16px;
}

/* ========== 提示框 ========== */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ========== 工单成功卡片 ========== */
.ticket-success-card {
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  font-size: 64px;
  color: #10b981;
  margin-bottom: 20px;
}

.ticket-success-card h2 {
  color: #fff;
  margin-bottom: 24px;
}

.ticket-info {
  background: #222;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid #333;
}

.info-row .label {
  color: #888;
}

.info-row .value {
  color: #fff;
  font-weight: 600;
}

.ticket-no {
  font-family: monospace;
  font-size: 18px;
  color: #e84a7f !important;
}

.tip {
  color: #888;
  font-size: 13px;
  margin-bottom: 20px;
}

.tip i {
  color: #fbbf24;
  margin-right: 6px;
}

/* ========== 网格布局 ========== */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

/* ========== 卡片 ========== */
.card {
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2d2d2d;
}

.card h2 i,
.card h3 i {
  color: #e84a7f;
  margin-right: 10px;
}

.card h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 16px;
}

/* ========== 表单 ========== */
.support-form,
.query-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  color: #888;
}

.form-group label i {
  margin-right: 6px;
  color: #666;
}

.required {
  color: #e84a7f;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #e84a7f;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  cursor: pointer;
}

.char-hint {
  font-size: 11px;
  color: #555;
  text-align: right;
}

.logged-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #222;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #888;
}

.logged-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* ========== 按钮 ========== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #e84a7f;
  color: #fff;
}

.btn-primary:hover {
  background: #d43d6f;
}

.btn-secondary {
  background: #2d2d2d;
  color: #fff;
}

.btn-secondary:hover {
  background: #3a3a3a;
}

.btn-block {
  width: 100%;
}

/* ========== 工单列表 ========== */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-item {
  display: block;
  padding: 12px;
  background: #222;
  border-radius: 8px;
  transition: background 0.2s;
}

.ticket-item:hover {
  background: #2a2a2a;
}

.ticket-subject {
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.ticket-no-small {
  color: #666;
  font-family: monospace;
}

/* 状态标签 */
.status-open { color: #fbbf24; }
.status-processing { color: #3b82f6; }
.status-replied { color: #10b981; }
.status-resolved { color: #22c55e; }
.status-closed { color: #666; }

/* ========== FAQ 列表 ========== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  display: block;
  padding: 10px 12px;
  background: #222;
  border-radius: 6px;
  font-size: 13px;
  color: #888;
  transition: all 0.2s;
}

.faq-item:hover {
  background: #2a2a2a;
  color: #e84a7f;
}

/* ========== 联系方式 ========== */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #222;
  border-radius: 6px;
  font-size: 13px;
  color: #888;
  transition: all 0.2s;
}

.contact-item:hover {
  background: #2a2a2a;
  color: #e84a7f;
}

.contact-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* ========== 页脚 ========== */
footer {
  background: #0d0d0d;
  border-top: 1px solid #1a1a1a;
  padding: 30px 20px;
  margin-top: 60px;
  text-align: center;
  margin-top: auto; 
}

.footer-copyright {
  color: #3a3a3a;
  font-size: 13px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .support-header h1 {
    font-size: 24px;
  }
}
/* ========== 自定义下拉框 ========== */
.custom-select {
  position: relative;
  width: 100%;
}

.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.select-trigger:hover {
  border-color: #444;
}

.custom-select.open .select-trigger {
  border-color: #e84a7f;
  border-radius: 8px 8px 0 0;
}

.select-value {
  color: #fff;
  font-size: 14px;
}

.select-arrow {
  color: #666;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.custom-select.open .select-arrow {
  transform: rotate(180deg);
  color: #e84a7f;
}

/* 下拉选项容器 */
.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #222;
  border: 1px solid #e84a7f;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.custom-select.open .select-options {
  max-height: 300px;
  opacity: 1;
}

/* 单个选项 */
.select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid #2a2a2a;
}

.select-option:last-child {
  border-bottom: none;
}

.select-option:hover {
  background: #2a2a2a;
  color: #fff;
}

.select-option.selected {
  background: rgba(232, 74, 127, 0.1);
  color: #e84a7f;
}

.select-option i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

/* 选项图标颜色 */
.select-option[data-value="bug"] i { color: #ef4444; }
.select-option[data-value="account"] i { color: #3b82f6; }
.select-option[data-value="payment"] i { color: #fbbf24; }
.select-option[data-value="suggestion"] i { color: #10b981; }
.select-option[data-value="other"] i { color: #a855f7; }

.select-option:hover i,
.select-option.selected i {
  color: inherit;
}
/* ========== 原生 Select 美化（备用） ========== */
.form-group select {
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 40px 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-group select:hover {
  border-color: #444;
}

.form-group select:focus {
  border-color: #e84a7f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e84a7f' d='M6 4L1 9h10z'/%3E%3C/svg%3E");
}

.form-group select option {
  background: #222;
  color: #fff;
  padding: 10px;
}
/* ========== 面包屑 ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #888;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #e84a7f;
}

.breadcrumb .separator {
  color: #444;
}

.breadcrumb .current {
  color: #fff;
  font-family: monospace;
}

/* ========== 错误卡片 ========== */
.error-card {
  text-align: center;
  padding: 60px 20px;
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
}

.error-card i {
  font-size: 64px;
  color: #ef4444;
  margin-bottom: 20px;
}

.error-card h2 {
  color: #fff;
  margin-bottom: 12px;
}

.error-card p {
  color: #888;
  margin-bottom: 24px;
}

/* ========== 工单视图 ========== */
.ticket-view {
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  overflow: hidden;
}

.ticket-header {
  padding: 24px;
  border-bottom: 1px solid #2d2d2d;
  background: #161616;
}

.ticket-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ticket-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.cat-bug { background: rgba(239,68,68,0.2); color: #ef4444; }
.cat-account { background: rgba(59,130,246,0.2); color: #3b82f6; }
.cat-payment { background: rgba(251,191,36,0.2); color: #fbbf24; }
.cat-suggestion { background: rgba(16,185,129,0.2); color: #10b981; }
.cat-other { background: rgba(168,85,247,0.2); color: #a855f7; }

.ticket-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #2d2d2d;
}

.status-open { background: rgba(251,191,36,0.2); color: #fbbf24; }
.status-processing { background: rgba(59,130,246,0.2); color: #3b82f6; }
.status-replied { background: rgba(16,185,129,0.2); color: #10b981; }
.status-resolved { background: rgba(34,197,94,0.2); color: #22c55e; }
.status-closed { background: rgba(107,114,128,0.2); color: #6b7280; }

.ticket-subject {
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #666;
}

.ticket-meta i {
  margin-right: 6px;
}

/* ========== 消息列表 ========== */
.ticket-content,
.replies-section {
  padding: 24px;
}

.replies-section {
  border-top: 1px solid #2d2d2d;
}

.replies-section h3 {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
}

.replies-section h3 i {
  color: #e84a7f;
  margin-right: 8px;
}

.message-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.message-item:last-child {
  margin-bottom: 0;
}

.message-avatar img,
.guest-avatar,
.staff-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.guest-avatar,
.staff-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.guest-avatar {
  background: #2d2d2d;
  color: #888;
}

.staff-avatar {
  background: rgba(232,74,127,0.2);
  color: #e84a7f;
}

.message-body {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.message-author {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.staff-label {
  background: rgba(232,74,127,0.2);
  color: #e84a7f;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 8px;
}

.message-time {
  font-size: 12px;
  color: #666;
}

.message-text {
  background: #222;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #ccc;
}

.staff-message .message-text {
  background: rgba(232,74,127,0.1);
  border-left: 3px solid #e84a7f;
}

/* ========== 回复表单 ========== */
.reply-form-section {
  padding: 24px;
  border-top: 1px solid #2d2d2d;
  background: #161616;
}

.reply-form-section h3 {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
}

.reply-form-section h3 i {
  color: #e84a7f;
  margin-right: 8px;
}

.reply-form textarea {
  width: 100%;
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color 0.2s;
}

.reply-form textarea:focus {
  border-color: #e84a7f;
}

.reply-form .form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.closed-notice {
  padding: 24px;
  text-align: center;
  color: #666;
  border-top: 1px solid #2d2d2d;
  background: #161616;
}

.closed-notice i {
  margin-right: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .ticket-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .message-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .message-avatar {
    display: none;
  }
}
