/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0e14;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.header {
  text-align: center;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.page-description {
  font-size: 0.925rem;
  color: #94a3b8;
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto;
}

/* Main Search Card */
.main-card {
  background-color: rgba(18, 24, 38, 0.9);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  background-color: #07090e;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.75rem 6.5rem 0.75rem 1rem;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.btn-search {
  position: absolute;
  right: 6px;
  background-color: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.875rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn-search:hover {
  background-color: #4338ca;
}

.btn-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-icon {
  width: 14px;
  height: 14px;
}

/* Popular Games */
.popular-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
}

.popular-title {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-btn {
  background-color: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.tag-btn:hover {
  background-color: #334155;
  color: #ffffff;
  border-color: #475569;
}

/* Results Container */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card {
  background-color: #121826;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.25s ease-out;
}

.result-header {
  padding: 1.25rem 1.5rem;
  background-color: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #818cf8;
  text-transform: uppercase;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.15rem;
}

.steamcmd-link {
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: none;
  background-color: #1e293b;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #334155;
  transition: background-color 0.2s, color 0.2s;
}

.steamcmd-link:hover {
  background-color: #334155;
  color: #ffffff;
}

.result-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.data-box {
  background-color: #07090e;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 1rem;
}

.data-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.data-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.btn-copy {
  background-color: rgba(79, 70, 229, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
}

.btn-copy:hover {
  background-color: rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
}

.btn-copy.copied {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  background-color: rgba(16, 185, 129, 0.15);
}

.data-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  word-break: break-all;
  user-select: all;
}

.data-value.folder {
  color: #34d399;
}

.data-value.exe {
  color: #a5b4fc;
}

/* Loading & Error States */
.loading-box {
  background-color: rgba(18, 24, 38, 0.6);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #334155;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-box {
  background-color: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: #fca5a5;
  font-size: 0.875rem;
}

.error-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fecaca;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

.footer a {
  color: #94a3b8;
  text-decoration: underline;
}

.footer a:hover {
  color: #818cf8;
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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