/* ============================================
   MENU PAGE STYLES
   Main menu/home page styling
   ============================================ */

/* Base Styles */
.menu-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
}

/* ============================================
   KOP / HEADER SECTION
   ============================================ */
.kop-section {
  background: white;
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 4px solid #667eea;
}

.kop-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kop-text {
  text-align: center;
  padding: 0;
  line-height: 1.2;
  position: relative;
}

.kop-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.kop-logo-left {
  right: 100%;
  margin-right: 15px;
}

.kop-logo-right {
  left: 100%;
  margin-left: 15px;
}

.kop-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.kop-title {
  font-size: 34px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 3px 0;
  text-transform: uppercase;
  line-height: 1.1;
}

.kop-event {
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 2px;
  line-height: 1.3;
}

/* ============================================
   MENU TITLE
   ============================================ */
.menu-title {
  color: white;
  font-weight: 700;
  font-size: 28px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

/* ============================================
   MENU CARDS
   ============================================ */
.menu-card-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.menu-card {
  background: white;
  border-radius: 20px;
  padding: 25px 20px;
  text-align: center;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  will-change: transform;
}

.menu-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  transition: height 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.menu-card:hover::before {
  height: 100%;
  opacity: 0.1;
}

.menu-card:active {
  transform: translateY(-5px) scale(0.98);
}

/* ============================================
   CARD COLORS
   ============================================ */
/* Blue Card */
.menu-card-blue::before {
  background: #5d87ff;
}
.menu-card-blue .menu-icon {
  background: linear-gradient(135deg, #5d87ff, #4169e1);
}
.menu-card-blue:hover {
  border-color: #5d87ff;
}

/* Green Card */
.menu-card-green::before {
  background: #13deb9;
}
.menu-card-green .menu-icon {
  background: linear-gradient(135deg, #13deb9, #00bfa5);
}
.menu-card-green:hover {
  border-color: #13deb9;
}

/* Orange Card */
.menu-card-orange::before {
  background: #ffae1f;
}
.menu-card-orange .menu-icon {
  background: linear-gradient(135deg, #ffae1f, #ff9800);
}
.menu-card-orange:hover {
  border-color: #ffae1f;
}

/* Purple Card */
.menu-card-purple::before {
  background: #7c4dff;
}
.menu-card-purple .menu-icon {
  background: linear-gradient(135deg, #7c4dff, #651fff);
}
.menu-card-purple:hover {
  border-color: #7c4dff;
}

/* Indigo Card - Database */
.menu-card-indigo {
  position: relative;
}
.menu-card-indigo::before {
  background: #3f51b5;
}
.menu-card-indigo .menu-icon {
  background: linear-gradient(135deg, #3f51b5, #303f9f);
}
.menu-card-indigo:hover {
  border-color: #3f51b5;
}

/* Teal Card - Lihat Skor */
.menu-card-teal {
  position: relative;
}
.menu-card-teal::before {
  background: #00bcd4;
}
.menu-card-teal .menu-icon {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
}
.menu-card-teal:hover {
  border-color: #00bcd4;
}

/* ============================================
   PUBLIC BADGE
   ============================================ */
.public-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  box-shadow: 0 3px 10px rgba(0, 188, 212, 0.3);
  animation: pulse-public 2s ease-in-out infinite;
}

.public-badge i {
  font-size: 12px;
}

@keyframes pulse-public {
  0%,
  100% {
    box-shadow: 0 3px 10px rgba(0, 188, 212, 0.3);
  }
  50% {
    box-shadow: 0 3px 20px rgba(0, 188, 212, 0.5);
  }
}

/* ============================================
   LOCKED MENU CARD
   ============================================ */
.menu-card-locked {
  position: relative;
  cursor: pointer;
  filter: grayscale(60%);
  opacity: 0.85;
  overflow: hidden;
}

.menu-card-locked::before {
  background: linear-gradient(135deg, #9e9e9e, #757575) !important;
}

.menu-card-locked::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}

.menu-card-locked:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  filter: grayscale(30%);
  opacity: 1;
}

.menu-card-locked:hover .lock-overlay {
  animation: pulse-lock 1s ease infinite;
}

.menu-card-locked:hover .login-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

@keyframes pulse-lock {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Lock Overlay */
.lock-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
}

.lock-overlay i {
  font-size: 18px;
  color: white;
}

.menu-icon-locked {
  background: linear-gradient(135deg, #bdbdbd, #9e9e9e) !important;
  position: relative;
}

.menu-icon-locked i {
  opacity: 0.7;
}

/* Login Required Badge */
.login-badge {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.login-badge i {
  font-size: 12px;
}

/* Locked card title & desc styling */
.menu-card-locked .menu-card-title {
  color: #6c757d;
}

.menu-card-locked .menu-card-desc {
  color: #9e9e9e;
  font-style: italic;
}

/* ============================================
   MENU ICON
   ============================================ */
.menu-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.menu-icon i {
  font-size: 32px;
  color: white;
}

.menu-card:hover .menu-icon {
  transform: scale(1.1) rotate(5deg);
}

/* ============================================
   MENU CARD TEXT
   ============================================ */
.menu-card-title {
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
  font-size: 16px;
}

.menu-card-desc {
  color: #666;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ============================================
   MENU ARROW
   ============================================ */
.menu-arrow {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.menu-arrow i {
  font-size: 18px;
  color: #666;
  transition: transform 0.3s ease;
}

.menu-card:hover .menu-arrow {
  background: #667eea;
}

.menu-card:hover .menu-arrow i {
  color: white;
  transform: translateX(3px);
}

/* ============================================
   AUTH SECTION
   ============================================ */
.auth-section {
  max-width: 600px;
  margin: 0 auto;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 20px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.auth-icon i {
  font-size: 24px;
  color: white;
}

.auth-info {
  display: flex;
  flex-direction: column;
}

.auth-status {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-user {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.btn-auth {
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-login {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
  color: white;
}

.btn-logout {
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  color: white;
}

.btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

/* ============================================
   FOOTER
   ============================================ */
.menu-footer {
  text-align: center;
  padding: 20px;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
/* fadeInUp removed to prevent glitch effect on refresh */

/* .menu-card {
  animation: fadeInUp 0.6s ease forwards;
} */

/* .col-6:nth-child(1) .menu-card {
  animation-delay: 0.1s;
}
.col-6:nth-child(2) .menu-card {
  animation-delay: 0.2s;
}
.col-6:nth-child(3) .menu-card {
  animation-delay: 0.3s;
}
.col-6:nth-child(4) .menu-card {
  animation-delay: 0.4s;
}
.col-6:nth-child(5) .menu-card {
  animation-delay: 0.5s;
} */

/* ============================================
   RESPONSIVE - TABLET (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  .kop-section {
    padding: 15px 10px;
  }

  .kop-logo {
    height: 50px;
  }

  .kop-title {
    font-size: 20px;
  }

  .kop-subtitle,
  .kop-event {
    font-size: 10px;
  }

  .menu-title {
    font-size: 22px;
  }

  .menu-subtitle {
    font-size: 14px;
  }

  .menu-grid {
    padding: 0 5px;
  }

  .menu-card {
    padding: 20px 15px;
    min-height: 160px;
  }

  .menu-icon {
    width: 55px;
    height: 55px;
  }

  .menu-icon i {
    font-size: 26px;
  }

  .menu-card-title {
    font-size: 14px;
  }

  .menu-card-desc {
    font-size: 11px;
  }

  .auth-card {
    padding: 15px;
  }

  .auth-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  .auth-icon i {
    font-size: 20px;
  }

  .auth-user {
    font-size: 14px;
  }

  .btn-auth {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .kop-section {
    padding: 10px 5px;
  }

  .kop-logo {
    height: 55px;
  }

  .kop-logo-left {
    margin-right: 8px;
  }

  .kop-logo-right {
    margin-left: 8px;
  }

  .kop-title {
    font-size: 16px;
  }

  .kop-subtitle {
    font-size: 6px;
    letter-spacing: 0.2px;
  }

  .kop-event {
    font-size: 8px;
    letter-spacing: 0.5px;
  }

  .menu-title {
    font-size: 20px;
  }

  .menu-subtitle {
    font-size: 12px;
  }

  .menu-grid {
    padding: 0;
  }

  .menu-card {
    min-height: 140px;
    border-radius: 15px;
    padding: 18px 12px;
  }

  .menu-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
  }

  .menu-icon i {
    font-size: 22px;
  }

  .menu-card-title {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .menu-card-desc {
    display: none;
  }

  .menu-arrow {
    width: 28px;
    height: 28px;
    margin-top: 5px;
  }

  .menu-arrow i {
    font-size: 14px;
  }

  .auth-section {
    margin-top: 30px !important;
  }

  .auth-card {
    padding: 12px;
    border-radius: 12px;
  }

  .auth-icon {
    width: 36px;
    height: 36px;
    margin-right: 8px;
  }

  .auth-icon i {
    font-size: 18px;
  }

  .auth-status {
    font-size: 10px;
  }

  .auth-user {
    font-size: 12px;
  }

  .btn-auth {
    padding: 8px 14px;
    font-size: 13px;
    gap: 5px;
  }

  .menu-footer {
    padding: 15px;
    font-size: 11px;
  }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
  .kop-section {
    padding: 8px 2px;
  }

  .kop-logo {
    height: 50px;
  }

  .kop-logo-left {
    margin-right: 5px;
  }

  .kop-logo-right {
    margin-left: 5px;
  }

  .kop-title {
    font-size: 12px;
  }

  .kop-subtitle {
    font-size: 5px;
    letter-spacing: 0.1px;
  }

  .kop-event {
    font-size: 6px;
    letter-spacing: 0.2px;
  }

  .menu-card {
    min-height: 120px;
    padding: 15px 10px;
  }

  .menu-icon {
    width: 42px;
    height: 42px;
  }

  .menu-icon i {
    font-size: 20px;
  }

  .menu-card-title {
    font-size: 12px;
  }

  .menu-arrow {
    display: none;
  }
}

/* ============================================
   REDUCED MOTION PREFERENCES
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .menu-card,
  .public-badge,
  .lock-overlay {
    animation: none !important;
  }

  .menu-card:hover {
    transform: none;
  }
}

/* Badges for KOP */
.badge-modern {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-info {
  background: rgba(93, 135, 255, 0.15);
  color: #5d87ff;
}

.badge-success {
  background: rgba(19, 222, 185, 0.15);
  color: #00a389;
}

.badge-secondary {
  background: rgba(128, 128, 128, 0.15);
  color: #666;
}
