@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  /* Colors - Slate Theme */
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  
  /* Colors - Emerald Theme */
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  
  /* Colors - Red */
  --red-300: #fca5a5;
  --red-600: #dc2626;
  --red-700: #b91c1c;

  /* Typography */
  --font-family: 'Quicksand', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--slate-950);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
}

/* Layout Containers */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.max-w-7xl {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .max-w-7xl { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .max-w-7xl { padding-left: 2rem; padding-right: 2rem; }
}

/* Header & Footer */
.site-header {
  border-bottom: 1px solid var(--slate-800);
  background-color: rgba(15, 23, 42, 0.5); /* slate-900/50 */
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 640px) {
  .header-inner { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .site-title {
    font-size: 1.875rem;
    gap: 0.5rem;
  }
}

.site-title-text {
  background-image: linear-gradient(to right, var(--emerald-400), var(--emerald-600));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.site-title-icon {
  width: 1rem;
  height: 1rem;
  color: var(--slate-400);
  transition: color 0.2s;
  cursor: pointer;
}

@media (min-width: 640px) {
  .site-title-icon { width: 1.5rem; height: 1.5rem; }
}

.site-title-icon:hover {
  color: var(--emerald-400);
}

.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    gap: 2rem;
  }
}

.nav-link {
  color: var(--slate-300);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--emerald-400);
}

.main-content {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .main-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

.site-footer {
  border-top: 1px solid var(--slate-800);
  background-color: rgba(15, 23, 42, 0.5);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer { padding-top: 2rem; padding-bottom: 2rem; }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; }
}

.footer-text {
  color: var(--slate-400);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .footer-text {
    text-align: left;
    margin-bottom: 0;
  }
}

/* Homepage Components */
.hero-card {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

@media (min-width: 640px) {
  .hero-card { padding: 2rem; margin-bottom: 3rem; }
}

@media (min-width: 768px) {
  .hero-card { padding: 3rem; }
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background-image: linear-gradient(to right, #ffffff, var(--emerald-300), var(--emerald-600));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; margin-bottom: 1.5rem; }
}

@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--slate-300);
  margin-bottom: 1.5rem;
  line-height: inherit;
}

@media (min-width: 640px) {
  .hero-subtitle { font-size: 1.25rem; margin-bottom: 2rem; }
}

@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.5rem; }
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .btn-group { flex-direction: row; gap: 1rem; }
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background-color: var(--emerald-700);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: inline-block;
  text-align: center;
}

@media (min-width: 640px) {
  .btn-primary { padding: 0.75rem 2rem; }
}

.btn-primary:hover {
  background-color: var(--emerald-600);
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.25);
}

.btn-outline {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
}

@media (min-width: 640px) {
  .btn-outline { padding: 0.75rem 2rem; }
}

.btn-outline:hover {
  background-color: rgba(16, 185, 129, 0.1);
}

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .content-grid { flex-direction: row; gap: 3rem; }
}

.content-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

@media (min-width: 640px) {
  .content-column { gap: 2rem; }
}

.card {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .card { padding: 2rem; }
}

@media (min-width: 768px) {
  .card { padding: 3rem; }
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .card-title { font-size: 1.875rem; margin-bottom: 1.5rem; }
}

@media (min-width: 768px) {
  .card-title { font-size: 3rem; }
}

.projects-group {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .projects-group { flex-direction: row; }
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Games Dashboard Shared */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #ffffff;
}

.back-link {
  color: var(--slate-400);
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--emerald-400); }

/* Games Index */
.games-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.status-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-300);
  margin-bottom: 1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .games-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .games-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.game-card {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s;
}

.game-card:hover {
  border-color: rgba(5, 150, 105, 0.5); /* emerald-600/50 */
}

.game-cover-link {
  display: block;
  flex-shrink: 0;
}

.game-cover-img {
  width: 100%;
  aspect-ratio: 264 / 374;
  object-fit: cover;
  display: block;
}

.game-cover-placeholder {
  width: 100%;
  aspect-ratio: 264 / 374;
  background-color: var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.game-cover-placeholder span {
  color: var(--slate-500);
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.25;
}

.game-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.game-title-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card:hover .game-title-link { color: var(--emerald-400); }

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.badge-platform {
  background-color: var(--slate-800);
  color: var(--slate-300);
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.badge-status {
  background-color: rgba(4, 120, 87, 0.3); /* emerald-700/30 */
  color: var(--emerald-300);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: capitalize;
}

.card-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--slate-800);
}

.btn-card-action {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  transition: background-color 0.2s;
}

.btn-card-play { background-color: rgba(4, 120, 87, 0.5); color: var(--emerald-300); }
.btn-card-play:hover { background-color: rgba(5, 150, 105, 0.5); }
.btn-card-done { background-color: rgba(51, 65, 85, 0.5); color: var(--slate-300); }
.btn-card-done:hover { background-color: rgba(71, 85, 105, 0.5); }

/* Games Show */
.show-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .show-layout { flex-direction: row; }
}

.show-cover-wrapper {
  flex-shrink: 0;
}

.show-cover-img {
  width: 12rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: block;
}

@media (min-width: 768px) {
  .show-cover-img { width: 16rem; }
}

.show-cover-placeholder {
  width: 12rem;
  aspect-ratio: 264 / 374;
  background-color: var(--slate-800);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
@media (min-width: 768px) {
  .show-cover-placeholder { width: 16rem; }
}

.show-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.show-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.show-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-edit {
  background-color: var(--slate-700);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-edit:hover { background-color: var(--slate-600); }

.btn-delete {
  background-color: rgba(185, 28, 28, 0.5); /* red-700/50 */
  color: var(--red-300);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-delete:hover { background-color: rgba(220, 38, 38, 0.5); /* red-600/50 */ }

.show-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.show-date {
  color: var(--slate-400);
  font-size: 0.875rem;
}

.show-summary {
  color: var(--slate-300);
  line-height: 1.625;
}

.show-notes {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  padding: 1rem;
}

.show-igdb-link {
  color: var(--emerald-400);
  font-size: 0.875rem;
  display: inline-block;
}
.show-igdb-link:hover { color: var(--emerald-300); }

.show-bottom-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-700);
}

.btn-action-primary {
  background-color: rgba(4, 120, 87, 0.5);
  color: var(--emerald-300);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}
.btn-action-primary:hover { background-color: rgba(5, 150, 105, 0.5); }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-300);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background-color: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #ffffff;
}

.form-input::placeholder { color: var(--slate-500); }

.form-input:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* Search Results */
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-result-item {
  background-color: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.search-cover {
  width: 4rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  display: block;
}

.search-cover-placeholder {
  width: 4rem;
  height: 5rem;
  background-color: var(--slate-800);
  border-radius: 0.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}
.search-cover-placeholder span {
  font-size: 0.625rem;
  color: var(--slate-500);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}

.search-info {
  flex: 1;
  min-width: 0;
}

.search-title {
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-year {
  color: var(--slate-500);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.search-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-search-playing {
  background-color: var(--slate-700);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  width: 100%;
}
.btn-search-playing:hover { background-color: var(--slate-600); }

.btn-search-backlog {
  background-color: var(--emerald-600);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  width: 100%;
}
.btn-search-backlog:hover { background-color: var(--emerald-500); }

/* Utilities */
.text-center { text-align: center; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.text-slate-400 { color: var(--slate-400); }
.text-red-400 { color: var(--red-300); }
.text-lg { font-size: 1.125rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.inline-block { display: inline-block; }
.max-w-4xl { max-width: 56rem; margin: 0 auto; }
.max-w-2xl { max-width: 42rem; margin: 0 auto; }
