:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --highlight: #007bff;
  --header-bg: #f1f1f1;
  --footer-bg: #e0e0e0;
  --nav-link: #535353;
  --nav-hover: #000;
  --card-bg: #f5f5f5;
  --border-color: #cccccc;
  --video-bg: #000;
  --footer-text: #222;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #ffffff;
  --overlay-bg: rgba(255, 255, 255, 0.2);
  --highlight: #66ccff;
  --header-bg: #000;
  --footer-bg: #000;
  --nav-link: #cccccc;
  --nav-hover: #ffffff;
  --card-bg: #222;
  --border-color: #444;
  --video-bg: #000;
  --footer-text: #999;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--header-bg);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(0, 255, 255, 0.2);
  transition: background-color 0.3s;
}

header h1 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--nav-link);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--nav-hover);
}

.main-container {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem;
  gap: 1rem;
}

.live-stream {
  flex: 2;
  min-width: 300px;
  position: relative;
  background: var(--video-bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.main-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: transparent;
  padding: 0;
  margin: 0;
}

.main-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: transparent;
}

.overlay-label {
  color: #31b1a6;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: bold;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.konocti-word {
  font-weight: 900;
  color: orange;
  font-family: 'Frutiger', 'Titillium Web', sans-serif;
}
.fullscreen-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: #66ccff;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.5); /* semi-transparent background for readability */
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 99999; /* super high so it stays on top */
  pointer-events: none; /* so clicks pass through */
  font-size: 1.2rem;
  user-select: none;
}

.fullscreen-overlay .konocti-word {
  font-weight: 900;
  color: orange;
  font-family: 'Frutiger', 'Titillium Web', sans-serif;
}

button.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  padding: 5px 10px;
  background-color: var(--overlay-bg);
  color: var(--text-color);
  border: 1px solid var(--highlight);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

#fallback-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  display: none;
}

.preview-streams {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem;
  margin-top: 20px;
}

.preview-streams iframe {
  width: 24%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--border-color);
  border-radius: 3px;
  background: var(--video-bg);
}

.sidebar {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.widget, .ad-slot {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  padding: 0.5rem;
}

.widget iframe, .ad-slot iframe {
  width: 100%;
  height: 250px;
  border: none;
}

.footer-banner {
  margin-top: 2rem;
  height: 60px;
  background: var(--footer-bg);
  color: var(--footer-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-shadow: 0px 0px 0px #000;
  transition: background-color 0.3s, color 0.3s;
}

/* News headline styles */
.news-headlines {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem;
}

.article-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: background-color 0.3s, transform 0.2s;
}

.article-item:hover {
  transform: scale(1.01);
}

.article-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.article-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
  color: var(--text-color);
}

.article-title a {
  color: var(--highlight);
  text-decoration: none;
  transition: color 0.3s;
}

.article-title a:hover {
  color: var(--nav-hover);
}

.article-date {
  font-size: 0.85rem;
  color: var(--nav-link);
  margin-top: 0.2rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .live-stream {
    flex: 2;
    min-width: 300px;
    position: relative;
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .widget iframe, .ad-slot iframe {
    height: 200px;
  }

  .article-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .article-image {
    width: 100%;
    height: auto;
  }

  .article-content {
    align-items: center;
  }
}

#streaming-status {
  padding: 10px;
  font-size: 1rem;
  color: var(--text-color);
}
