/* ====================================
   ULTIMATE PREMIUM PHYSICS PAGE CSS
   Modern • Vibrant • Ultra Responsive
==================================== */

:root {
  /* === Vibrant Modern Color Palette === */
  --primary: #00d4c8; /* Teal */
  --secondary: #5b21b6; /* Deep Purple */
  --accent: #f472b6; /* Pink */
  --highlight: #22d3ee; /* Cyan */
  --orange: #fb923c;

  /* Backgrounds */
  --bg-light: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.92);

  /* Text */
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;

  /* Effects */
  --radius: 14px;
  --shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.09);
  --hover-shadow: 0 25px 60px -10px rgba(91, 33, 182, 0.25);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============================
   RESET & BASE
================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
      text-align: center;

}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(0, 212, 200, 0.15),
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(91, 33, 182, 0.12),
      transparent 50%
    ),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-dark);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===============================
   MAIN SECTION
================================ */

.links-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem auto;
}

/* ===============================
   PAGE TITLE - Enhanced
================================ */

.page-title {
  text-align: center;
  margin-bottom: 70px;
  position: relative;
}

.page-title::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.18), transparent 70%);
  border-radius: 50%;
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(40px);
  z-index: -1;
  opacity: 0.85;
}

.page-title h1 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #00d4c8, #5b21b6, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  margin-top: .5rem;
}

.page-title h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--text-muted);
  font-weight: 500;
}

/* ===============================
   GRID
================================ */

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

/* ===============================
   GLASSMORPHIC CARD - Upgraded
================================ */

.link-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;

}

.link-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  opacity: 0;
  transition: var(--transition);
  border-radius: inherit;
  z-index: -1;
}

.link-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.2), transparent 70%);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.link-card:hover {
  transform: translateY(-14px) scale(1.02);
  box-shadow: var(--hover-shadow);
  border-color: rgba(91, 33, 182, 0.3);
}

.link-card:hover::before {
  opacity: 0.12;
}

.link-card:hover::after {
  opacity: 1;
  transform: scale(1.3);
}

/* ===============================
   LINK TITLE
================================ */

.link-title {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-dark);
}

.link-title a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.link-title a:hover {
  color: var(--secondary);
}

.link-title a::after {
  content: "→";
  font-size: 1.4rem;
  margin-left: auto;
  transition: var(--transition);
  color: var(--highlight);
}

.link-card:hover .link-title a::after {
  transform: translateX(8px);
  color: var(--accent);
}

/* Card Accent Lines */
.link-card:nth-child(4n + 1) {
  border-top: 5px solid #00d4c8;
}
.link-card:nth-child(4n + 2) {
  border-top: 5px solid #5b21b6;
}
.link-card:nth-child(4n + 3) {
  border-top: 5px solid #f472b6;
}
.link-card:nth-child(4n + 4) {
  border-top: 5px solid #22d3ee;
}

/* ===============================
   RESPONSIVE
================================ */

/* Tablet */
@media (max-width: 800px) {
  .links-section {
    padding: 1rem;
  }

  .links-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 1rem auto;
  }

  .link-card {
    padding: 28px 24px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .links-section {
    /* padding: 50px 15px 70px; */
  }

  .page-title {
    margin-bottom: 50px;
  }

  .page-title h1 {
    font-size: 1.8rem;
  }

  .links-grid {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .link-card {
    padding: 26px 22px;
  }

  .link-title {
    font-size: 1.18rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .page-title h1 {
    font-size: 1.5rem;
  }

  .link-card {
    padding: 24px 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ===============================
   DARK MODE
================================ */

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 20% 30%, rgba(0, 212, 200, 0.08), transparent),
      radial-gradient(circle at 80% 70%, rgba(91, 33, 182, 0.08), transparent),
      linear-gradient(135deg, #0f172a 0%, #1e2937 100%);
  }

  .link-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .link-title a {
    color: #e2e8f0;
  }

  .page-title h2 {
    color: #94a3b8;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--secondary));
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
