:root {
  /* Primary Colors */
  --primary-50: #fff5f6;
  --primary-100: #fed7d9;
  --primary-300: #fb9ca1;
  --primary-500: #f74852;
  --primary-700: #dc2f38;

  /* Neutral Colors */
  --neutral-50: rgba(255, 255, 255, 0.95);
  --neutral-100: rgba(255, 255, 255, 0.85);
  --neutral-200: rgba(255, 255, 255, 0.7);

  /* Glass Effects */
  --glass-background: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-blur: blur(10px);
  --glass-shadow: 0 4px 20px rgba(123, 31, 162, 0.1);

  /* Text Colors */
  --text-primary: #2c2c2c;
  --text-secondary: #666;
  --text-accent: var(--primary-500);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;

  -webkit-tap-highlight-color: transparent; /* Removes tap highlight on iOS */
  -webkit-touch-callout: none; /* Disables callout on long press */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version */
}

body {
  height: 100vh;
  background: url("background.jpg");
  background-size: cover;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(176, 39, 39, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(162, 31, 31, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(200, 104, 104, 0.09) 0%,
      transparent 50%
    );
  z-index: -1;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2vh 2vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2vh;
  height: 8vh;
}

.header img {
  width: 32px;
  height: auto;
}

.header h2 {
  color: var(--text-primary);
  font-size: clamp(1.5rem, 3vh, 2rem);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: min(1.5rem, 2vh);
  height: 88vh;
  padding: 1vh;
  margin-bottom: 50px;
  overflow-y: visible;
  scrollbar-width: visible;
  -ms-overflow-style: visible;
  overflow: visible !important;
}

.grid::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur) saturate(180%);
  border-radius: 16px;
  padding: min(1.5rem, 2vh);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  height: fit-content;
  min-height: 200px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.card::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("txture.jpg");
  background-size: cover;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  pointer-events: none;
  border-radius: inherit;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-100);
  background: var(--neutral-50);
  box-shadow: 0 8px 32px rgba(123, 31, 162, 0.15);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, var(--primary-50));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.card:hover::before {
  opacity: 0.3;
}

.card.ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x) var(--y),
    rgba(247, 72, 82, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.card.ripple:active::after {
  opacity: 1;
}

.card-title {
  font-size: clamp(1.1rem, 2.2vh, 1.35rem);
  color: var(--text-primary);
  margin-bottom: min(1.2rem, 2vh);
  font-weight: 600;
}

.card-description {
  font-size: clamp(0.9rem, 1.8vh, 1rem);
  color: var(--text-secondary);
  margin-bottom: min(1.2rem, 2vh);
  line-height: 1.4;
  flex-grow: 1;
}

.card-arrow {
  color: var(--primary-500);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: clamp(0.9rem, 1.8vh, 1rem);
  margin-top: auto;
  padding-top: 0.5rem;
}

.card:hover .card-arrow {
  color: var(--primary-700);
}

.btn-extra-container {
  align-items: right;
  margin-left: auto;
  padding: 0.5rem 0.7rem;
}

.btn-extra {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-left: auto;
  font-size: clamp(0.6rem, 1.8vh, 0.7rem);
  font-weight: 500;
  color: var(--primary-700);
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-extra:hover {
  background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
  border-color: var(--primary-100);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 31, 162, 0.12);
}

.main-card {
  grid-column: 1 / -1;
  margin-bottom: min(0.8rem, 1.5vh) !important;
  min-height: 150px;
}

.ripple {
  position: relative;
  overflow: hidden;
}

@keyframes ripple {
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .container {
    padding: 1vh 3vw;
    height: auto;
    min-height: 100vh;
  }

  .grid {
    height: auto;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
    overflow-y: visible;
    margin-bottom: 1rem;
  }

  .card {
    min-height: 160px;
    padding: 1rem;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  /* Remove hover effects */
  .card:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
  }

  /* Button specific touch feedback */
  .btn-extra:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
  }

  .card:active {
    transform: scale(0.98);
    background: var(--neutral-100);
    border-color: var(--primary-100);
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .card-description {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .card-arrow {
    font-size: 0.9rem;
    position: relative;
    bottom: 0;
  }

  .main-card {
    min-height: 120px;
    margin-bottom: 1rem !important;
  }

  .header {
    height: auto;
    padding: 1rem 0;
  }
}

/* Animation delays */
.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.3s;
}
.card:nth-child(4) {
  animation-delay: 0.4s;
}
.card:nth-child(5) {
  animation-delay: 0.5s;
}
.card:nth-child(6) {
  animation-delay: 0.6s;
}
.card:nth-child(7) {
  animation-delay: 0.7s;
}
