* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'VT323', 'Courier New', Courier, monospace;
  font-weight: 400;
  background-color: #000;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  overflow: hidden;
}

.text-tv-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000;
}

.header {
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #333;
}

.page-input-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  height: 40px;
}

.brand-bar {
  background-color: #00ffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  height: 40px;
}

.page-number-input {
  background-color: transparent;
  border: none;
  color: #fff;
  font-family: 'Barlow', 'Courier New', Courier, monospace;
  font-weight: 400;
  font-size: 28px;
  width: 80px;
  text-align: center;
  padding: 4px;
  margin: 0;
  outline: none;
  cursor: text;
  transition: background-color 0.2s;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.page-number-input::-webkit-outer-spin-button,
.page-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-number-input:hover {
  background-color: rgba(255, 255, 0, 0.1);
}

.page-number-input:focus {
  background-color: rgba(255, 255, 0, 0.1);
  border: none;
  outline: none;
}

.date-time {
  color: #000;
  font-size: 18px;
  font-weight: 400;
}

.logo {
  height: 32px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: #000;
}

.menu-page,
.news-page {
  max-width: 80ch;
  margin: 0 auto;
}

.hidden {
  display: none;
}

.section-header {
  color: #ffff00;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 16px;
  padding: 4px 0;
  border-bottom: 1px solid #ffff00;
}

.menu-item {
  margin: 8px 0;
  padding: 4px 0;
  color: #fff;
}

.cyan {
  color: #00ffff;
  font-weight: 400;
}

.yellow {
  color: #ffff00;
  font-weight: 400;
}

.magenta {
  color: #ff00ff;
  font-weight: 400;
}

.green {
  color: #00ff00;
  font-weight: 400;
}

.red {
  color: #ff0000;
  font-weight: 400;
}

.news-content {
  color: #fff;
  line-height: 1.4;
}

.news-item {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.news-title {
  color: #ffff00;
  font-weight: 400;
  font-size: 21px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.news-page-number {
  color: #00ffff;
  font-size: 22px;
  cursor: pointer;

  border-radius: 2px;
  transition: background-color 0.2s;
}

.news-page-number:hover {
  background-color: rgba(0, 255, 255, 0.2);
}

.news-text {
  color: #fff;
  font-size: 22px;
}

.news-time {
  color: #888;
  font-size: 22px;
}

.navigation {
  background-color: #000;
  border-top: 1px solid #333;
  padding: 8px 16px;
}

.nav-info {
  text-align: center;
  color: #888;
  font-size: 16px;
}

.menu-page-link {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.menu-page-link:hover {
  background-color: rgba(0, 255, 255, 0.2);
  text-decoration: underline;
}

.news-detail {
  max-width: 80ch;
}

.news-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.back-link {
  color: #00ffff;
  cursor: pointer;
  font-size: 22px;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.back-link:hover {
  background-color: rgba(0, 255, 255, 0.2);
}

.detail-time {
  color: #888;
  font-size: 22px;
}

.news-detail-title {
  color: #ffff00;
  font-size: 21px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-detail-source {
  color: #00ffff;
  font-size: 16px;
  margin-top: 16px;
}

.news-detail-text {
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.loading {
  color: #00ffff;
  text-align: center;
  padding: 20px;
}

.error {
  color: #ff0000;
  text-align: center;
  padding: 20px;
}

@media (max-width: 768px) {
  body {
    font-size: 24px;
  }

  .page-input-row {
    padding: 8px 12px;
    height: 40px;
  }

  .brand-bar {
    padding: 8px 12px;
    height: 40px;
  }

  .logo {
    height: 28px;
  }

  .date-time {
    font-size: 14px;
  }

  .content {
    padding: 12px;
  }

  .page-number-input {
    font-size: 32px;
    width: 75px;
  }
}

@media (max-width: 600px) {
  .brand-bar {
    padding: 6px 12px;
  }

  .logo {
    height: 28px;
  }

  .date-time {
    font-size: 22px;
    max-width: 180px;
    text-align: right;
  }

  .page-number-input {
    font-size: 32px;
    width: 70px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 22px;
  }

  .page-input-row {
    padding: 6px 8px;
    height: 35px;
  }

  .brand-bar {
    padding: 6px 8px;
    height: auto;
    min-height: 35px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    height: 28px;
  }

  .date-time {
    font-size: 18px;
    text-align: right;
    line-height: 1.2;
  }

  .page-number-input {
    font-size: 32px;
    width: 65px;
  }

  .content {
    padding: 8px;
  }
}
