/* ===== CSS Variables ===== */
:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #ec4899;
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-nav: rgba(15, 15, 26, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --border-color: rgba(99, 102, 241, 0.3);
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f1a;
  /* Relaxing dark color */
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-links a.active {
  color: var(--text-primary);
  background: var(--gradient-1);
}

/* ===== Main Content ===== */
.main-content {
  padding-top: 70px;
  min-height: 100vh;
}

/* ===== Hero Section ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  min-height: calc(100vh - 70px);
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-medium);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary-color);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  border: none;
}

.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(225, 48, 108, 0.5);
}

/* ===== Social Media ===== */
.social-media {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-icon svg {
  width: 28px;
  height: 28px;
}

.social-icon.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(225, 48, 108, 0.6);
}

/* ===== Game Feedback Sidebar ===== */
.game-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.feedback-sidebar {
  width: 280px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  flex-shrink: 0;
}

.feedback-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.like-dislike {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.like-btn,
.dislike-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.like-btn:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.dislike-btn:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.like-btn.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
}

.dislike-btn.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.comments-section {
  margin-top: 1rem;
}

.comments-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.comment {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.comment-author {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.comment-text {
  color: var(--text-secondary);
  word-break: break-word;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-form input,
.comment-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}

.comment-form textarea {
  resize: none;
  height: 60px;
}

.comment-form button {
  padding: 0.5rem 1rem;
  background: var(--gradient-1);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-form button:hover {
  transform: translateY(-2px);
}

.game-main {
  flex: 1;
  min-width: 0;
}

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

  .feedback-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    order: 2;
  }
}

/* ===== Page Section ===== */
.page-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

canvas {
  max-width: 100%;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-color);
}

.game-card-image {
  width: 100%;
  height: 180px;
  background: var(--gradient-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.game-card-content {
  padding: 1.5rem;
}

.game-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.game-card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== About Section ===== */
.about-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-avatar {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  margin: 0 auto;
  box-shadow: var(--shadow-glow);
}

.about-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* ===== Game Player Frame ===== */
.game-frame-container {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.game-frame-header {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-frame-title {
  font-weight: 600;
}

.game-frame {
  width: 100%;
  height: 600px;
  border: none;
}

/* ===== Photo Collage ===== */
.hero-photos {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.photo-frame {
  --rotation: 0deg;
  background: white;
  padding: 8px;
  padding-bottom: 20px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
  transform: rotate(var(--rotation));
  transition: all 0.3s ease;
  cursor: pointer;
}

.photo-frame:hover {
  transform: rotate(0deg) scale(1.08);
  z-index: 10;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(99, 102, 241, 0.3);
}

.photo-frame img {
  width: 150px;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.photo-frame.photo-center {
  grid-column: span 2;
  justify-self: center;
}

.photo-frame.photo-center img {
  width: 200px;
  height: 150px;
}

/* ===== Sketch Arrow Label ===== */
.hero-photos {
  position: relative;
}

.sketch-label {
  position: absolute;
  top: 30px;
  left: -90px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sketch-text {
  font-family: 'Comic Sans MS', 'Marker Felt', cursive, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(99, 102, 241, 0.8);
  padding: 6px 12px;
  border-radius: 6px;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

.sketch-arrow {
  width: 70px;
  height: 60px;
  transform: rotate(5deg);
}

@media (max-width: 1024px) {
  .sketch-label {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .sketch-label {
    display: none;
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3rem 2rem;
    gap: 3rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-photos {
    order: 2;
  }

  .hero-buttons {
    justify-content: center;
  }

  .photo-collage {
    gap: 0.75rem;
  }

  .photo-frame img {
    width: 120px;
    height: 145px;
  }

  .photo-frame.photo-center img {
    width: 160px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .nav-container {
    height: 60px;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .main-content {
    padding-top: 60px;
  }

  .hero {
    padding: 2rem 1.5rem;
    gap: 3rem;
  }

  .hero-title {
    font-size: 2.25rem;
    /* Balanced size, not too huge */
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    /* Full width for easier tapping */
    gap: 0.75rem;
    width: 100%;
    max-width: 300px;
    /* But capped so they aren't comically wide on tablets */
    margin: 0 auto;
  }

  .btn {
    justify-content: center;
    padding: 0.9rem;
    /* Comfortable touch target */
  }

  .photo-frame {
    padding: 5px;
    padding-bottom: 15px;
  }

  .photo-frame img {
    width: 90px;
    height: 110px;
  }

  .photo-frame.photo-center img {
    width: 120px;
    height: 90px;
  }

  .about-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .about-avatar {
    max-width: 200px;
    font-size: 4rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }

  .game-card-image {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .nav-links a {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
}