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

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #1b2838;
  color: #c7d5e0;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 50px;
  background: #171a21;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  color: #fff;
}

.nav {
  display: flex;
  gap: 5px;
}

.nav-link {
  color: #b8b6b4;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 3px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-box {
  position: relative;
}

.search-input {
  background: #316282;
  border: none;
  padding: 6px 12px;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  width: 200px;
  outline: none;
  transition: background 0.2s;
}

.search-input::placeholder {
  color: #9cc5e0;
}

.search-input:focus {
  background: #3a7ca5;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 3px;
  transition: background 0.2s;
}

.user-area:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  font-size: 22px;
  color: #9cc5e0;
}

.user-name {
  font-size: 13px;
  color: #b8b6b4;
}

.layout {
  display: flex;
  min-height: calc(100vh - 50px);
}

.sidebar {
  width: 200px;
  background: #171a21;
  border-right: 1px solid #000;
  padding: 15px 0;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #66c0f4;
  padding: 0 15px 10px;
  letter-spacing: 1px;
}

.sidebar-list {
  list-style: none;
}

.sidebar-item {
  padding: 8px 15px;
  font-size: 13px;
  color: #b8b6b4;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
  color: #fff;
  background: rgba(102, 192, 244, 0.2);
  border-left: 3px solid #66c0f4;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.featured {
  margin-bottom: 30px;
}

.featured-card {
  display: flex;
  background: linear-gradient(135deg, #1e3a5f, #2a4a6a);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #000;
  text-decoration: none;
  transition: all 0.3s;
}

.featured-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(102, 192, 244, 0.3);
}

.featured-image {
  width: 400px;
  height: 220px;
  background: linear-gradient(135deg, #1a3a5a, #234b6a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  flex-shrink: 0;
}

.featured-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.featured-badge {
  display: inline-block;
  background: #66c0f4;
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 12px;
  width: fit-content;
}

.featured-title {
  font-size: 28px;
  color: #fff;
  margin-bottom: 10px;
}

.featured-title-link {
  text-decoration: none;
}

.featured-desc {
  font-size: 14px;
  color: #b8b6b4;
  margin-bottom: 15px;
  line-height: 1.6;
}

.featured-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(102, 192, 244, 0.15);
  color: #66c0f4;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  border: 1px solid rgba(102, 192, 244, 0.3);
}

.btn-play {
  display: inline-block;
  background: #4c6b22;
  color: #fff;
  padding: 10px 30px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
  width: fit-content;
  text-decoration: none;
  transition: all 0.2s;
}

.game-play {
  display: inline-block;
  color: #66c0f4;
  font-size: 12px;
  text-decoration: none;
  margin-bottom: 8px;
}

.game-play:hover {
  text-decoration: underline;
}

.featured-card:hover .btn-play {
  background: #5cb83f;
}

.section {
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-title {
  font-size: 20px;
  color: #fff;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.game-card {
  background: #1e2a3a;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.game-card.coming-soon {
  opacity: 0.5;
  cursor: default;
}

.game-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.game-image {
  height: 120px;
  background: linear-gradient(135deg, #1a3050, #243a55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  border-bottom: 1px solid #000;
}

.game-info {
  padding: 12px;
}

.game-name {
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px;
}

.game-tag {
  font-size: 11px;
  color: #66c0f4;
  margin-bottom: 8px;
}

.game-price {
  font-size: 13px;
  color: #b8b6b4;
}

.game-price.free {
  color: #a4d007;
}

.footer {
  text-align: center;
  padding: 20px;
  background: #171a21;
  border-top: 1px solid #000;
  font-size: 12px;
  color: #8b8b8b;
}

.footer a {
  color: #66c0f4;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .featured-card {
    flex-direction: column;
  }

  .featured-image {
    width: 100%;
    height: 180px;
  }

  .search-input {
    width: 140px;
  }
}

@media (max-width: 600px) {
  .header-left .nav {
    display: none;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-title {
    font-size: 22px;
  }
}

.top-btn {
  background: #2a3f5a;
  color: #c7d5e0;
  border: 1px solid #000;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.top-btn:hover {
  background: #3a5a7a;
  color: #fff;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-own {
  display: inline-block;
  background: #2a475e;
  color: #66c0f4;
  border: 1px solid rgba(102, 192, 244, 0.4);
  padding: 8px 20px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}

.btn-own:hover {
  background: #3a6a8a;
  color: #fff;
}

.btn-own:disabled {
  opacity: 0.5;
  cursor: default;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-box {
  background: #1b2838;
  border: 1px solid #000;
  border-radius: 5px;
  width: 360px;
  max-width: 90%;
  padding: 25px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #8b8b8b;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-title {
  font-size: 18px;
  color: #fff;
  margin-bottom: 15px;
}

.modal-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 18px;
}

.modal-tabs .tab {
  flex: 1;
  background: #171a21;
  color: #b8b6b4;
  border: 1px solid #000;
  padding: 8px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 3px;
}

.modal-tabs .tab.active {
  background: #2a475e;
  color: #fff;
}

.modal-input {
  width: 100%;
  background: #0e1622;
  border: 1px solid #000;
  padding: 10px 12px;
  border-radius: 3px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

.modal-input:focus {
  border-color: #66c0f4;
}

.modal-submit {
  width: 100%;
  background: #4c6b22;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-submit:hover {
  background: #5cb83f;
}

.modal-msg {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  min-height: 16px;
}

.lib-list {
  max-height: 60vh;
  overflow-y: auto;
}

.lib-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #16202d;
  border: 1px solid #000;
  border-radius: 3px;
  margin-bottom: 10px;
}

.lib-name {
  font-size: 15px;
  color: #fff;
  font-weight: bold;
}

.lib-date {
  font-size: 12px;
  color: #8b8b8b;
}

.lib-play {
  align-self: flex-start;
  margin-top: 6px;
  background: #4c6b22;
  color: #fff;
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
}

.lib-play:hover {
  background: #5cb83f;
}

.lib-empty {
  color: #8b8b8b;
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2a475e;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 2000;
  border: 1px solid rgba(102, 192, 244, 0.4);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.detail-main {
  padding: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

.back-link {
  color: #66c0f4;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 18px;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-hero {
  display: flex;
  gap: 25px;
  background: linear-gradient(135deg, #1e3a5f, #2a4a6a);
  border: 1px solid #000;
  border-radius: 6px;
  overflow: hidden;
}

.detail-banner {
  width: 460px;
  height: 260px;
  background: linear-gradient(135deg, #1a3a5a, #234b6a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  flex-shrink: 0;
}

.detail-head {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.detail-title {
  font-size: 30px;
  color: #fff;
  margin-bottom: 14px;
}

.detail-short {
  color: #b8b6b4;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 18px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.detail-screens {
  display: flex;
  gap: 12px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.detail-screen {
  width: 180px;
  height: 110px;
  background: linear-gradient(135deg, #1a3050, #243a55);
  border: 1px solid #000;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.detail-grid {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.detail-section {
  flex: 2;
  min-width: 300px;
}

.detail-info {
  flex: 1;
  min-width: 260px;
  background: #16202d;
  border: 1px solid #000;
  border-radius: 5px;
  padding: 18px;
}

.detail-h2 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 14px;
  border-left: 3px solid #66c0f4;
  padding-left: 10px;
}

.detail-desc {
  color: #b8b6b4;
  font-size: 14px;
  line-height: 1.8;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #0e1622;
  font-size: 13px;
}

.info-row span:first-child {
  color: #8b8b8b;
}

.info-row span:last-child {
  color: #c7d5e0;
}

.detail-free {
  color: #a4d007;
}

.detail-coming {
  text-align: center;
  padding: 60px 20px;
}

.detail-coming-emoji {
  font-size: 70px;
  margin-bottom: 15px;
}

.detail-coming-text {
  color: #b8b6b4;
  margin: 12px 0 22px;
}

.game-name {
  text-decoration: none;
}

.game-name:hover {
  text-decoration: underline;
}

.btn-detail {
  display: inline-block;
  color: #66c0f4;
  font-size: 13px;
  text-decoration: none;
  margin-top: 10px;
}

.btn-detail:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .detail-hero {
    flex-direction: column;
  }

  .detail-banner {
    width: 100%;
    height: 200px;
  }
}

.drive-main {
  padding: 25px;
  max-width: 1000px;
  margin: 0 auto;
}

.drive-h1 {
  font-size: 24px;
  color: #fff;
  margin-bottom: 18px;
}

.drive-cap {
  margin-bottom: 18px;
}

.cap-text {
  font-size: 13px;
  color: #b8b6b4;
  margin-bottom: 8px;
}

.cap-text span {
  color: #fff;
}

.cap-bar {
  height: 10px;
  background: #16202d;
  border: 1px solid #000;
  border-radius: 5px;
  overflow: hidden;
}

.cap-fill {
  height: 100%;
  background: linear-gradient(90deg, #66c0f4, #4c6b22);
  width: 0;
  transition: width 0.3s;
}

.cap-fill.danger {
  background: linear-gradient(90deg, #ff6b6b, #a44);
}

.drive-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.btn-upload {
  display: inline-block;
  background: #2a475e;
  color: #66c0f4;
  border: 1px solid rgba(102, 192, 244, 0.4);
  padding: 9px 22px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: #3a6a8a;
  color: #fff;
}

.upload-hint {
  font-size: 12px;
  color: #8b8b8b;
}

.drive-table {
  width: 100%;
  border-collapse: collapse;
  background: #16202d;
  border: 1px solid #000;
  border-radius: 5px;
  overflow: hidden;
}

.drive-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  text-transform: uppercase;
  color: #66c0f4;
  background: #1b2838;
  border-bottom: 1px solid #000;
}

.drive-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: #c7d5e0;
  border-bottom: 1px solid #0e1622;
}

.drive-table tr:last-child td {
  border-bottom: none;
}

.f-name {
  color: #fff;
  word-break: break-all;
}

.f-actions {
  white-space: nowrap;
}

.f-btn {
  background: #2a3f5a;
  color: #c7d5e0;
  border: 1px solid #000;
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
  transition: all 0.2s;
}

.f-btn:hover {
  background: #3a5a7a;
  color: #fff;
}

.f-del:hover {
  background: #a44;
}

