/* Import Google Font and Font Awesome */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* Root variables */
:root {
  --primary-color: #1877f2;
  --background-color: #E5E4E2;
  --text-color: #1c1e21;
  --subtext-color: #606770;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark {
  --background-color: #18191a;
  --text-color: #e4e6eb;
  --subtext-color: #b0b3b8;
  --white: #242526;
  --shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

/* Body */
body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 24px;
}

.header-content a {
  text-decoration: none;
  color: var(--white);
  display: flex;
  align-items: center;
}

.site-logo {
  height: 50px;
  width: auto;
  border-radius: 6px;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.theme-toggle:hover {
  color: #ffdd57;
}

/* Layout */
.container {
  display: flex;
  max-width: 930px;
  margin: 20px auto 40px;
  gap: 20px;
  padding: 0 20px;
}

/* Main video */
.main-video {
  flex: 3;
  background: var(--white);
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
}

/* Responsive iframe wrapper */
.iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: black;
}

.iframe-wrapper iframe,
.main-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
}

/* Video info */
.video-info {
  margin-top: 10px;
}
.video-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--primary-color);
}
.video-description {
  font-size: 14px;
  color: var(--subtext-color);
}

/* Locked overlay */
.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.unlock-btn {
  background-color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 20px;
  color: white;
}

.sidebar {
  flex: 1;
  max-width: 250px;
  background: var(--white);
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-height: 600px;
}

.sidebar h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
}

body.dark .sidebar {
  background: #242526;
}

body.dark .sidebar h3 {
  color: var(--primary-color);
}

.video-list {
  flex: 1;                /* take remaining space */
  overflow-y: auto;       /* only this part scrolls */
  padding-right: 5px;     /* room for scrollbar */
}

/* Video box */
.video-box {
  cursor: pointer;
  padding: 10px 15px;
  margin-bottom: 10px;
  background-color: #eee;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
  color: var(--text-color);
}

.video-box:hover {
  background-color: #e9ebee;
  color: var(--primary-color);
}

.video-box.active {
  background-color: var(--primary-color);
  color: var(--white);
}

body.dark .video-box {
  background-color: #3a3b3c;
}
body.dark .video-box:hover {
  background-color: #4a4b4d;
}

/* Adblock modal */
#adblock-message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  z-index: 9999;
  text-align: center;
  padding: 40px 20px;
  overflow: auto;
}

#adblock-message h2 {
  margin-top: 100px;
  font-size: 28px;
}

#adblock-message p {
  font-size: 18px;
  margin-top: 15px;
}

#adblock-message button {
  margin-top: 30px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

/* Assistive Touch Circle */
.assistive-touch {
  position: fixed;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 9999;
  touch-action: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .assistive-touch {
    display: none;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    max-width: 100%;
    order: 2;
  }
  .main-video {
    order: 1;
  }
}

/* Floating scroll circle - mobile only */
@media (max-width: 768px) {
  .floating-circle {
    position: fixed;
    top: 100px;
    left: 50px;
    width: 50px;
    height: 50px;
    background-color: #1877f2;
    border-radius: 50%;
    z-index: 9999;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    user-select: none;
    touch-action: none;
    transition: background-color 0.2s;
  }
  .floating-circle.locked {
    background-color: #0f5ac0; /* darker blue when Y-axis locked */
  }
  .floating-circle::after {
    color: white;
    font-size: 18px;
    font-weight: bold;
  }
}


