/* ========================================
   หน้าเมนูหลัก /page/index.php
   ======================================== */

/* Video wrapper */
.videoWrapper {
  position: relative;
  padding-bottom: 56.25%;
  padding-top: 25px;
  height: 0;
}
.videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Background */
body {
  background: linear-gradient(135deg, #f5e6e6 0%, #780e0e 50%, #fff0f0 100%);
}

/* Main container */
.main-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  overflow: hidden;
}

/* Banner */
.banner-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 20px;
  max-height: 300px;
}
.banner-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center top;
}
.banner-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
}

/* App title */
.app-title {
  background: linear-gradient(45deg, rgb(132, 14, 8), #e8b5b5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  text-align: center;
  margin: 30px 0;
  font-size: 2.5rem;
}

/* Menu cards */
.menu-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Menu buttons */
.menu-btn {
  border: none;
  border-radius: 12px;
  padding: 15px 25px;
  font-weight: 600;
  text-decoration: none;
  display: block;
  width: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}
.menu-btn:last-child {
  margin-bottom: 0;
}
.menu-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.menu-btn:hover::before {
  left: 100%;
}
.menu-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Button color variants */
.btn-primary-custom {
  background: linear-gradient(45deg, #a8d0f0, #87ceeb);
  color: #2c5282;
}
.btn-success-custom {
  background: linear-gradient(45deg, #a8d5ba, #90c695);
  color: #2d5016;
}
.btn-danger-custom {
  background: linear-gradient(45deg, #f5a8a8, #f08080);
  color: #742a2a;
}
.btn-warning-custom {
  background: linear-gradient(45deg, #f5e6a3, #f0d070);
  color: #744210;
}
.btn-info-custom {
  background: linear-gradient(45deg, #a8e6e1, #7dd3c0);
  color: #234e52;
}
.btn-amber-custom {
  background: linear-gradient(45deg, #fcd34d, #f59e0b);
  color: #78350f;
}

/* Section title */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #6b4423;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #d4a5a5;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #e8b5b5;
}

/* Credit section */
.credit-section {
  background: linear-gradient(45deg, #faf7f7, #fff0f0);
  padding: 30px;
  border-radius: 15px;
  margin-top: 30px;
  text-align: center;
  border: 2px solid rgba(212, 165, 165, 0.3);
}

/* Icon */
.icon-large {
  font-size: 1.2em;
  margin-right: 8px;
}

/* ════ User Bar ════ */
.user-bar {
  background: linear-gradient(135deg, #8b0000, #b22222, #dc143c);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(220, 20, 60, 0.3);
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}
.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.user-menu-btn img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.user-menu-btn span {
  font-weight: 600;
}
.user-menu-btn .bi-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.user-menu-btn.open .bi-chevron-down {
  transform: rotate(180deg);
}

/* User dropdown */
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  overflow: hidden;
  z-index: 1000;
}
.user-dropdown.show {
  display: block;
}
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: #4a5568;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-bottom: 1px solid #e2e8f0;
}
.user-dropdown a:last-child {
  border-bottom: none;
}
.user-dropdown a:hover {
  background: #fef2f2;
  color: #dc2626;
}
.user-dropdown a i {
  color: #dc2626;
}

/* Login button */
.login-btn {
  color: white;
  text-decoration: none;
  padding: 6px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
  font-weight: 500;
}
.login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

/* ════ App Download Cards ════ */
.app-download-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}
.app-download-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}
.app-icon {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  object-fit: cover;
  flex-shrink: 0;
}
.app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  margin-right: 15px;
}
.app-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 90px;
}
.app-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #6b4423;
  margin-bottom: 5px;
}
.app-description {
  color: #8b6f47;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Download buttons */
.download-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.download-btn:hover::before {
  left: 100%;
}
.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.download-btn i {
  margin-right: 3px;
}

/* Inline button styles (for unique colors) */
.btn-story {
  background: linear-gradient(45deg, #f5eed8, #e8ddc0);
  color: #6b5518;
}
.btn-exam {
  background: linear-gradient(45deg, #c4b5fd, #a78bfa);
  color: #4c1d95;
}
.btn-youtube {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
}
.btn-grammar-radio {
  background: linear-gradient(45deg, #a8e6d8, #7dd3c0);
  color: #234e52;
}

/* Credit text */
.credit-text {
  font-size: 1.1rem;
  color: #6b4423;
}
.credit-subtitle {
  color: #d4a5a5;
}
.credit-heart {
  color: #f5a8a8;
}
.credit-title {
  color: #d4a5a5;
  margin-bottom: 15px;
}

/* ════ Responsive ════ */
@media (max-width: 768px) {
  .app-title {
    font-size: 2rem;
  }
  .menu-btn {
    font-size: 1rem;
  }
  .app-download-card {
    padding: 15px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .app-info {
    text-align: center;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .app-buttons {
    align-items: center;
  }
  .app-icon {
    width: 60px;
    height: 60px;
  }
}
