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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0e141b;
  color: #c7d5e0;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Top Steam Titlebar --- */
.titlebar {
  height: 48px;
  background: linear-gradient(90deg, #171d25 0%, #1a232f 100%);
  border-bottom: 1px solid #233242;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.menu-bar {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #ff3344;
  text-shadow: 0 0 12px rgba(255, 51, 68, 0.4);
}

.menu-item {
  font-size: 13px;
  font-weight: 600;
  color: #8f98a0;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.2s;
}

.menu-item:hover, .menu-item.active {
  color: #ffffff;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff3344, #880011);
  border: 1px solid #ff4455;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.username {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.user-status {
  font-size: 11px;
  color: #66c0f4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: #66c0f4;
  border-radius: 50%;
}

.window-controls {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.win-btn {
  background: transparent;
  border: none;
  color: #8f98a0;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.win-btn:hover {
  background: #2a3847;
  color: #ffffff;
}

.win-btn.close:hover {
  background: #e81123;
  color: #ffffff;
}

/* --- Layout --- */
.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 48px);
}

/* --- Sidebar --- */
.sidebar {
  width: 270px;
  background-color: #121921;
  border-right: 1px solid #1f2b38;
  display: flex;
  flex-direction: column;
}

.search-box {
  padding: 14px 16px;
}

.search-box input {
  width: 100%;
  background: #1b2633;
  border: 1px solid #28394a;
  padding: 7px 12px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

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

.library-header {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #626e7b;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-btn {
  background: transparent;
  border: none;
  color: #8f98a0;
  cursor: pointer;
  font-size: 14px;
}

.game-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.game-item:hover {
  background: #1a2533;
}

.game-item.active {
  background: linear-gradient(90deg, rgba(102, 192, 244, 0.15) 0%, transparent 100%);
  border-left: 3px solid #66c0f4;
}

.game-icon {
  font-size: 18px;
  color: #ff3344;
}

.game-meta {
  display: flex;
  flex-direction: column;
}

.game-name {
  font-size: 13px;
  font-weight: 600;
  color: #dcdedf;
}

.game-subtext {
  font-size: 11px;
  color: #5c7e10;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-green {
  width: 6px;
  height: 6px;
  background-color: #a4d007;
  border-radius: 50%;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid #1f2b38;
}

.add-game-btn {
  width: 100%;
  background: #1a2430;
  border: 1px solid #28394a;
  padding: 8px;
  color: #8f98a0;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-game-btn:hover {
  background: #243344;
  color: #fff;
}

/* --- Content View --- */
.content-view {
  flex: 1;
  background-color: #101822;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* --- Hero Banner --- */
.hero-banner {
  height: 340px;
  position: relative;
  background: linear-gradient(180deg, rgba(20, 10, 15, 0.6) 0%, rgba(16, 24, 34, 1) 100%),
              radial-gradient(circle at top right, #381119 0%, #101822 70%);
  display: flex;
  align-items: flex-end;
  padding: 30px 40px;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.game-badge {
  display: inline-block;
  background: rgba(255, 51, 68, 0.2);
  border: 1px solid #ff3344;
  color: #ff6677;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.game-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  margin-bottom: 6px;
}

.game-tagline {
  color: #8f98a0;
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 600px;
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  align-items: center;
  gap: 30px;
}

.btn-play {
  background: linear-gradient(90deg, #75b022 0%, #588a1b 100%);
  color: #ffffff;
  border: none;
  padding: 12px 50px;
  border-radius: 3px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(117, 176, 34, 0.4);
  transition: all 0.2s;
}

.btn-play:hover {
  background: linear-gradient(90deg, #8ad328 0%, #68a220 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(138, 211, 40, 0.5);
}

.btn-play:active {
  transform: translateY(0);
}

.play-icon {
  font-size: 16px;
}

.stats-group {
  display: flex;
  gap: 24px;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: #626e7b;
  letter-spacing: 1px;
}

.stat-val {
  font-size: 13px;
  font-weight: 600;
  color: #dcdedf;
}

.text-green { color: #a4d007; }
.text-cyan { color: #66c0f4; }

/* --- Sub Nav --- */
.sub-nav {
  display: flex;
  gap: 20px;
  padding: 0 40px;
  border-bottom: 1px solid #233242;
  background: #141f2c;
}

.sub-tab {
  background: transparent;
  border: none;
  padding: 14px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8f98a0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.sub-tab:hover, .sub-tab.active {
  color: #ffffff;
}

.sub-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #66c0f4;
}

/* --- Content Sections --- */
.sub-content {
  padding: 30px 40px;
  flex: 1;
}

.sub-content.hidden {
  display: none;
}

.info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.info-card {
  background: #172230;
  border: 1px solid #243547;
  border-radius: 4px;
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #233242;
  padding-bottom: 10px;
}

.card-header h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.badge-news {
  background: #2a475e;
  color: #66c0f4;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}

.news-item {
  margin-bottom: 18px;
}

.news-item h4 {
  font-size: 14px;
  color: #66c0f4;
  margin-bottom: 4px;
}

.news-date {
  font-size: 11px;
  color: #626e7b;
  margin-bottom: 8px;
}

.news-body {
  font-size: 13px;
  color: #acb2b8;
  line-height: 1.5;
}

.specs-list {
  list-style: none;
  font-size: 12px;
  color: #acb2b8;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.specs-list li strong {
  color: #fff;
}

.path-text {
  font-family: monospace;
  font-size: 11px;
  color: #66c0f4;
  word-break: break-all;
}

.action-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondary-btn {
  background: #212f40;
  border: 1px solid #2e435b;
  color: #c7d5e0;
  padding: 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: #2c3f55;
  color: #fff;
}

/* --- Patch Notes & Settings --- */
.patchnotes-container, .settings-container {
  max-width: 700px;
}

.patchnotes-container h2, .settings-container h2 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.patch-entry {
  background: #172230;
  border: 1px solid #243547;
  padding: 20px;
  border-radius: 4px;
}

.patch-badge {
  display: inline-block;
  background: #213345;
  color: #66c0f4;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 3px;
}

.patch-date {
  font-size: 12px;
  color: #626e7b;
  margin-left: 10px;
}

.patch-entry ul {
  margin-top: 14px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #acb2b8;
}

.patch-entry code {
  background: #121922;
  padding: 2px 6px;
  border-radius: 3px;
  color: #ff6677;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #8f98a0;
}

.input-field {
  background: #172230;
  border: 1px solid #243547;
  padding: 10px 14px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

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

.save-btn {
  background: #2a475e;
  border: 1px solid #66c0f4;
  color: #66c0f4;
  padding: 10px 24px;
  border-radius: 3px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.save-btn:hover {
  background: #66c0f4;
  color: #0e141b;
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1b2838;
  border: 1px solid #66c0f4;
  padding: 14px 20px;
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

.toast.hidden {
  display: none;
}

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