/* ==========================
   RESET
========================== */

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

/* ==========================
   VARIABLES
========================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;

  --bg: #ffffff;
  --surface: #f8fafc;

  --text: #0f172a;
  --text-light: #64748b;

  --border: #e2e8f0;

  --radius: 12px;
  --shadow: 0 10px 25px rgba(0,0,0,.08);

  --container: 1200px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-light: #cbd5e1;
    --border: #334155;
  }
}

/* ==========================
   BODY
========================== */

body {
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(90%, var(--container));
  margin-inline: auto;
}

/* ==========================
   TYPOGRAPHY
========================== */

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* ==========================
   NAVBAR
========================== */

.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text);
  transition: .3s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ==========================
   HERO
========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    background: #0f172a;
    color: white;
}

.hero-content {
    width: 50%;
    padding: 80px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 30px;
    color: #cbd5e1;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

.hero-image {
    width: 50%;
    height: 100vh;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* Fade effect */
    mask-image: linear-gradient(
        to left,
        black 70%,
        transparent 100%
    );

    -webkit-mask-image: linear-gradient(
        to left,
        black 70%,
        transparent 100%
    );
}
.stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-header h2,
.stat-header h3 {
    margin: 0;
   
}

p {
    margin-top: 8px;
}
/* Mobile */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content,
    .hero-image {
        width: 100%;
    }

    .hero-content {
        padding: 40px 20px;
    }

    .hero-image {
        height: 50vh;
    }
}

/* ==========================
   BUTTONS
========================== */

.btn {
  display: inline-block;
  padding: .9rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: .3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ==========================
   CARDS
========================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: .3s;
}

.card:hover {
  transform: translateY(-6px);
}

/* ==========================
   SECTIONS
========================== */

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* ==========================
   FORMS
========================== */

.form-group {
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--primary);
}

/* ==========================
   FOOTER
========================== */

.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 4rem 0;
  }
}.gallery {
    padding: 80px 20px;
    text-align: center;
}

.gallery h2 {
    margin-bottom: 40px;
    font-size: 2rem;
}

.gallery-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.gallery-grid img {
    width: 280px;
    height: 420px; /* Portrait shape */
    object-fit: cover;

    border-radius: 16px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: translateY(-8px);
}

.view-more-btn {
    display: inline-block;
    padding: 14px 32px;

    background: #2563eb;
    color: white;

    text-decoration: none;
    border-radius: 10px;

    transition: 0.3s;
}

.view-more-btn:hover {
    background: #1d4ed8;
}
/* Games Catalog */

.catalog-header {
    text-align: center;
    padding: 60px 20px;
}

.catalog-container {
    width: min(90%, 1200px);
    margin: auto;
    padding-bottom: 80px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.game-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.game-card:hover {
    transform: translateY(-6px);
}

.game-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.game-info {
    padding: 20px;
}

.game-info h2 {
    margin-bottom: 10px;
}

.game-info p {
    margin-bottom: 20px;
}
.game-page {
    text-align: center;
    padding: 40px 15px;
}

#gameCanvas {
    display: block;
    margin: 15px auto;
    border-radius: 12px;
    border: 2px solid #ccc;
    background: linear-gradient(#87ceeb, #e0f7ff);
    max-width: 100%;
}

#score {
    font-size: 2rem;
    font-weight: bold;
}

#gameMessage {
    margin-top: 10px;
    color: gray;
}
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.controls button {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    min-width: 90px;
}

.controls button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.controls button:active {
    transform: scale(0.95);
}
.game-page {
    text-align: center;
    padding: 30px 25%;
}

@media (max-width: 900px) {
    .game-page {
        padding: 20px 10px;
    }
}

#gameCanvas {
    display: block;
    margin: 15px auto;
    border-radius: 12px;
    max-width: 100%;
    border: 2px solid #ccc;
    background: linear-gradient(#87ceeb, #e0f7ff);
}

#score {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

#gameMessage {
    margin-top: 10px;
    color: gray;
}
.gallery-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.03);
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;

    justify-content: center;
    align-items: center;
    flex-direction: column;

    padding: 20px;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;

    color: white;
    font-size: 40px;
    cursor: pointer;
}

.download-btn {
    margin-top: 20px;
    text-decoration: none;
}