/* === FONT & BASE === */
@font-face {
  font-family: 'emerald';
  src: url('fonts/px_sans_nouveaux.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'emerald', sans-serif;
  text-shadow: 2px 2px 0 gray;
}

body {
  padding: 2rem;
  background: #1a1a1a;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

.text-style-b {
  color: #025d73 !important;
  text-shadow: 1.8px 1.8px 0 #1295b6 !important;
}

/* === CONTAINER === */
.container {
  display: flex;
  border: 6px solid #028090;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(0,255,255,0.1);
  background-color: #101010;
  overflow: hidden;
}

/* === TOPBAR === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(to right, #028090, #05668d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  color: white;
  font-weight: bold;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.logo {
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

.topnav a {
  color: white;
  text-decoration: none;
  margin: 0 0.75rem;
  font-weight: bold;
  font-size: 20px;
}

.topnav a:hover {
  text-decoration: underline;
}

.status {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* === TICKER BAR === */
.ticker-bar {
  position: sticky;
  top: 70px;
  z-index: 999;
  display: flex;
  align-items: center;
  background: #000;
  color: #00e0ff;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid #028090;
  font-size: 0.9rem;
  height: 40px;
}

.channel-id {
  margin-right: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.live-badge {
  background: red;
  color: white;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-right: 1rem;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ticker-wrap {
  overflow: hidden;
  flex: 1;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-move span {
  margin-right: 3rem;
}

@keyframes ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* === MAIN PANEL === */
.main-panel {
  flex: 1;
  padding: 2rem;
}

.dashboard h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dashboard p {
  margin-bottom: 2rem;
  opacity: 0.85;
}

.card {
  background-color: #222;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  border: 1px solid #444;
  box-shadow: 0 2px 12px rgba(0,255,255,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(0,255,255,0.15);
}

/* === NAVIDECK SIDEBAR === */
.sidebar {
  width: 280px;
  min-width: 280px;
  max-height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background-color: #0f1d1f;
  border-left: 3px solid #05668d;
  box-shadow: inset 3px 0 6px rgba(0,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  flex-shrink: 0;
}

.navideck-label {
  text-align: center;
}

.navideck-label h1 {
  font-size: 1.6rem;
  margin: 0;
  color: #00e0ff;
  letter-spacing: 0.05em;
}

.navideck-meta {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.3rem;
  line-height: 1.2rem;
}

.navideck-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #00e0ff66, transparent);
  margin: 0.5rem 0;
}

.module-header {
  display: grid;
  grid-template-columns: 2rem auto 2rem;
  align-items: center;
  padding: 0 0.5rem;
}

.module-header h2 {
  grid-column: 2;
  text-align: center;
  font-size: 1.2rem;
  color: #00e0ff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-btn {
  font-size: 1.4rem;
  color: #00e0ff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}
.nav-btn:hover {
  transform: scale(1.2);
}

/* === TRAINER SELECT MODAL === */
.trainer-select-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.trainer-select-content {
  text-align: center;
  background: #d0d0d0 url("images/box-pattern.png") repeat;
  border: 3px solid #999;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  z-index: 10;
}

.login-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
  letter-spacing: 2px;
}

.trainer-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.trainer-card {
  width: 110px;
  height: 130px;
  background: #f0f0f0;
  border: 2px solid #888;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.trainer-card:hover {
  transform: scale(1.05);
}

.trainer-card img {
  width: 60px;
  height: 60px;
  margin-bottom: 0.5rem;
}

.trainer-card span {
  font-weight: bold;
}

/* === PASSWORD MODAL === */
.password-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.password-box {
  position: relative;
  background: #f8f8f8;
  padding: 2rem;
  border-radius: 16px;
  border: 2px solid #888;
  text-align: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.25);
}

.password-box img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.password-box h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #333;
}

.password-box input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #aaa;
  margin-bottom: 1rem;
}

.password-box button {
  padding: 0.5rem 1.2rem;
  background: #028090;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

/* === RESPONSIVE LAYOUT === */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    margin-top: 104px; /* height of topbar + ticker */
  }

  .main-panel {
    padding: 1rem;
  }

  .sidebar {
    width: 100%;
    border-left: none;
    border-top: 2px solid #05668d;
    box-shadow: inset 0 3px 6px rgba(0,255,255,0.05);
  }

  .card {
    padding: 1rem;
  }

  .trainer-grid {
    flex-direction: column;
    align-items: center;
  }
}
