/* Teachers Portal - Luxury Apple Academic Bento Architecture */
:root {
  --tp-navy-dark: #030712;
  --tp-navy-card: #081126;
  --tp-sky: #38bdf8;
  --tp-emerald: #34d399;
  --tp-slate: #94a3b8;
  --tp-blue: #60a5fa;
  --tp-accent: #0284c7;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.tp-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 15%, #0b1536 0%, #030712 70%) !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Cairo', 'Tajawal', sans-serif !important;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Header */
.tp-topbar {
  background: rgba(4, 9, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tp-topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-topbar-inner {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.tp-brand-text {
  min-width: 0;
  overflow: hidden;
}

.tp-brand-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  background: #ffffff;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tp-brand-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.tp-brand-dept {
  font-size: 0.84rem;
  color: #38bdf8;
  margin: 3px 0 0;
  font-weight: 600;
}

.tp-topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.tp-topbar-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.6);
  border-color: #38bdf8;
  color: #ffffff !important;
}

/* Master Container */
.tp-main {
  max-width: 1140px;
  width: 100%;
  margin: 32px auto 48px;
  padding: 0 20px;
  flex: 1;
}

/* Luxury Hero Box with Centered 30% Crest Watermark */
.tp-hero-card {
  position: relative;
  background: linear-gradient(165deg, rgba(11, 23, 56, 0.85) 0%, rgba(3, 7, 20, 0.95) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: 52px 36px 44px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  text-align: center;
}

/* 30% OPACITY OFFICIAL CREST WATERMARK */
.tp-crest-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 90vw);
  height: min(560px, 90vw);
  background-image: url('/ouc-logo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.30 !important;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 60px rgba(2, 132, 199, 0.3));
}

.tp-layer-content {
  position: relative;
  z-index: 2;
}

.tp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.tp-glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: tpPulseGlow 2s infinite ease-in-out;
}
@keyframes tpPulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.tp-headline {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.22;
}

.tp-subtext {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #cbd5e1;
  margin: 0 auto 28px;
  max-width: 680px;
  line-height: 1.6;
}

/* Smart Device Banner */
.tp-device-indicator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 38px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.tp-dev-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* 4 Icon Choice Cards Grid */
.tp-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: right;
}
html[dir="ltr"] .tp-cards-grid { text-align: left; }






/* Individual Apple Bento Squircle Tile */
.tp-option-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.tp-option-tile:hover, .tp-option-tile:focus-visible {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  text-decoration: none !important;
}

/* Auto-Recommended Dynamic Glow */
.tp-option-tile.is-recommended {
  border-color: #38bdf8 !important;
  background: linear-gradient(155deg, rgba(2, 132, 199, 0.32) 0%, rgba(255, 255, 255, 0.08) 100%) !important;
  box-shadow: 0 0 0 2px #38bdf8, 0 18px 45px rgba(2, 132, 199, 0.45) !important;
}

.tp-rec-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.5);
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
html[dir="ltr"] .tp-rec-pill { left: auto; right: 14px; }
.tp-rec-pill.show-rec { display: inline-block; }

/* Large Apple Squircle App Icon Box */
.tp-tile-icon-box {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.tp-option-tile:hover .tp-tile-icon-box {
  transform: scale(1.06);
}

.tp-tile-svg {
  width: 32px;
  height: 32px;
}

.icon-box-browser {
  background: linear-gradient(135deg, #0284c7 0%, #075985 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
}
.icon-box-android {
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #ffffff;
}
.icon-box-ios {
  background: linear-gradient(135deg, #475569 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #ffffff;
}
.icon-box-windows {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  border: 1px solid rgba(96, 165, 250, 0.6);
  color: #ffffff;
}

.tp-tile-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-exclusive-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.tp-tile-en {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
  display: block;
}

.tp-tile-desc {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 14px 0 22px;
}

.tp-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.94rem;
  font-weight: 800;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.tp-arrow {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
.tp-option-tile:hover .tp-arrow {
  transform: translateX(-4px);
}
html[dir="ltr"] .tp-option-tile:hover .tp-arrow {
  transform: translateX(4px);
}

.footer-browser { color: #38bdf8; }
.footer-android { color: #34d399; }
.footer-ios { color: #f472b6; }
.footer-windows { color: #60a5fa; }

/* Toast Notification for Downloads */
.tp-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(9, 23, 61, 0.94);
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(16px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  white-space: nowrap;
}
.tp-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.tp-footer {
  text-align: center;
  padding: 28px 20px;
  color: #64748b;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Symmetrical Tablet & Mobile Device Adaptation */
@media (max-width: 1040px) {
  .tp-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  html, body.tp-body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .tp-topbar {
    padding: 8px 12px !important;
  }
  .tp-topbar-inner {
    gap: 8px !important;
  }
  .tp-brand-wrap {
    gap: 8px !important;
  }
  .tp-brand-logo-img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .tp-brand-heading {
    font-size: 0.86rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .tp-brand-dept {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .tp-topbar-cta {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
  }
  .tp-main {
    padding: 0 10px !important;
    margin: 12px auto 24px !important;
    max-width: 100vw !important;
  }
  .tp-hero-card {
    padding: 24px 12px !important;
    border-radius: 18px !important;
    max-width: 100% !important;
  }
  .tp-headline {
    font-size: 1.45rem !important;
  }
  .tp-subtext {
    font-size: 0.85rem !important;
    margin-bottom: 16px !important;
  }
  .tp-device-indicator {
    font-size: 0.78rem !important;
    padding: 6px 12px !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
  }
  .tp-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .tp-option-tile {
    padding: 18px 14px !important;
    border-radius: 16px !important;
  }
}
