@font-face {
  font-family: 'Pretendard';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn-v2pstatic.weverse.io/wev_web_fe/assets/fonts/pretendard/woff2-subset/Pretendard-Regular.subset.woff2') format('woff2');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn-v2pstatic.weverse.io/wev_web_fe/assets/fonts/pretendard/woff2-subset/Pretendard-Medium.subset.woff2') format('woff2');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn-v2pstatic.weverse.io/wev_web_fe/assets/fonts/pretendard/woff2-subset/Pretendard-Bold.subset.woff2') format('woff2');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn-v2pstatic.weverse.io/wev_web_fe/assets/fonts/pretendard/woff2-subset/Pretendard-ExtraBold.subset.woff2') format('woff2');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn-v2pstatic.weverse.io/wev_web_fe/assets/fonts/pretendard/woff2-subset/Pretendard-Black.subset.woff2') format('woff2');
}

:root {
  --scrollbar-size: 8px;
  --scrollbar-border-width: 2px;
  --spacing-unit: 16px;
  --twitch-bg-base: #0e0e10;
  --twitch-bg-alt: #18181b;
  --twitch-bg-alt-2: #1f1f23;
  --twitch-border: #2d2d32;
  --twitch-text-primary: #efeff1;
  --twitch-text-secondary: #adadb8;
  --twitch-text-tertiary: #53535f;
}

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

html {
  touch-action: pan-y;
  -ms-touch-action: pan-y;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--twitch-bg-base);
  color: var(--twitch-text-primary);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--twitch-bg-alt-2) var(--twitch-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--spacing-unit) * 0.875) calc(var(--spacing-unit) * 2);
  background-color: var(--twitch-bg-alt);
  border-bottom: 1px solid var(--twitch-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  width: 100%;
  height: 57px;
  box-sizing: border-box;
  line-height: 1;
  will-change: transform;
  transform: translateZ(0);
}

.menu-btn {
  background: none;
  border: none;
  color: var(--twitch-text-primary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-unit);
  width: 24px;
  height: 24px;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.menu-btn:focus-visible {
  outline: 2px solid var(--twitch-text-primary);
  outline-offset: 2px;
}

.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo-image {
  height: 18px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: crisp-edges;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.main-container {
  display: block;
  max-width: 100%;
  min-height: calc(100vh - 57px);
  margin-top: 57px;
  padding-right: 340px;
}

.video-section {
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
  overflow-x: hidden;
  background-color: var(--twitch-bg-base);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-content {
  width: 92%;
  max-width: min(1200px, 92%);
}

.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--twitch-bg-alt-2);
  margin-bottom: calc(var(--spacing-unit) * 2);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--twitch-border);
}

.video-player iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.videoinfo {
  margin-bottom: calc(var(--spacing-unit) * 0.75);
}

.title-wrapper {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.5);
}

.title-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 1.4em;
}

.live-badge {
  background: #eb0400;
  color: var(--twitch-text-primary);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
  cursor: default;
  display: inline-block;
}

.video-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--twitch-text-primary);
  margin: 0;
  width: 100%;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.5);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--twitch-text-secondary);
  margin-bottom: calc(var(--spacing-unit) * 1.75);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.date-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.5em;
}

.video-meta svg {
  width: 13.5px;
  height: 13.5px;
  flex-shrink: 0;
  opacity: 0.8;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
  padding: calc(var(--spacing-unit) * 1) 0;
  border-top: 1px solid var(--twitch-border);
  border-bottom: 1px solid var(--twitch-border);
  margin-bottom: calc(var(--spacing-unit) * 2);
  position: relative;
}

.chat-toggle-btn {
  background: #0E0E10;
  border: 1px solid var(--twitch-border);
  border-radius: 50%;
  color: var(--twitch-text-primary);
  cursor: pointer;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-left: calc(var(--spacing-unit) * 0.5);
}

.chat-toggle-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
}

@media (max-width: 1024px) {
  .chat-toggle-btn {
    display: flex;
  }
}

.chat-toggle-btn:hover {
  background: var(--twitch-bg-alt);
}

.chat-toggle-btn:active {
  background: var(--twitch-bg-alt-2);
}

.chat-toggle-btn:focus-visible {
  outline: 2px solid var(--twitch-text-primary);
  outline-offset: 2px;
}

.channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--twitch-bg-alt-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.channel-avatar img,
.channel-avatar svg {
  width: 100%;
  height: 100%;
}

.channel-avatar img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.channel-avatar svg {
  width: 24px;
  height: 24px;
}

.channel-name-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.5em;
}

.channel-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.5);
  letter-spacing: -0.01em;
  color: var(--twitch-text-primary);
  width: 100%;
}

.broadcast-info-container {
  position: relative;
  margin-bottom: calc(var(--spacing-unit) * 2);
  min-height: 120px;
}

.broadcast-info {
  padding: 0;
  background: transparent;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--twitch-text-secondary);
  line-height: 1.75;
  font-weight: 500;
  letter-spacing: -0.01em;
  width: 100%;
}

.broadcast-info p,
.broadcast-info br {
  margin-bottom: 0;
}

.info-link {
  color: var(--twitch-text-primary);
  text-decoration: underline;
  text-decoration-color: var(--twitch-text-secondary);
  word-break: break-all;
}

.info-link:hover {
  color: var(--twitch-text-primary);
  text-decoration-color: var(--twitch-text-primary);
}

.info-link:active {
  color: var(--twitch-text-secondary);
  text-decoration-color: var(--twitch-text-secondary);
}

.legal-notice {
  padding: calc(var(--spacing-unit) * 0.875);
  background: var(--twitch-bg-alt);
  border-radius: 6px;
  border: 1px solid var(--twitch-border);
  border-left: 2px solid var(--twitch-border);
  margin-bottom: calc(var(--spacing-unit) * 2);
  user-select: none;
  cursor: default;
}

.notice-header {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--twitch-text-primary);
  margin-bottom: calc(var(--spacing-unit) * 0.25);
  letter-spacing: -0.01em;
}

.notice-text {
  font-size: 12px;
  color: var(--twitch-text-secondary);
  line-height: 1.4;
  margin-bottom: calc(var(--spacing-unit) * 0.25);
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: -0.01em;
}

.notice-text:last-child {
  margin-bottom: 0;
}

.sidebar {
  background: var(--twitch-bg-base);
  border-left: 1px solid var(--twitch-border);
  overflow: hidden;
  position: fixed;
  top: 57px;
  right: 0;
  bottom: 0;
  width: 340px;
  height: calc(100vh - 57px);
}

#twitch-chat-embed {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 50vh;
    min-height: 300px;
    border-left: none !important;
    border-top: 1px solid var(--twitch-border);
    z-index: 100;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
}

  .sidebar.mobile-visible {
    display: flex !important;
  }
  
  #twitch-chat-embed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    flex: 1;
    min-height: 300px;
    box-sizing: border-box;
  }
}

iframe {
  border: 0;
}

.footer {
  background-color: transparent;
  padding-top: calc(var(--spacing-unit) * 2);
  padding-bottom: calc(var(--spacing-unit) * 0.875);
  width: 100%;
}

.footer-content {
  text-align: left;
}

.footer-content p {
  color: var(--twitch-text-secondary);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 0;
  letter-spacing: -0.01em;
  user-select: none;
}

.footer-copyright {
  margin-top: calc(var(--spacing-unit) * 0.5);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--twitch-text-secondary);
  letter-spacing: -0.01em;
  user-select: none;
}

.footer-copyright strong {
  color: var(--twitch-text-primary);
  font-weight: 700;
}

@media (min-width: 1201px) and (max-width: 1400px) {
  .main-container {
    padding-right: 320px;
  }

  .sidebar {
    width: 320px;
  }
}

@media (min-width: 1025px) and (max-width: 1200px) {
  .main-container {
    padding-right: 300px;
}

  .sidebar {
    width: 300px;
  }
}

@media (max-width: 1024px) {
  .main-container {
    padding-right: 0;
  }

  .video-section {
    align-items: center;
  }

  .video-content {
    width: 92%;
    max-width: min(1200px, 92%);
  }
}

@media (max-width: 768px) {
  .menu-btn {
    display: none;
  }

  .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: var(--spacing-unit);
    height: 51px;
    justify-content: flex-start;
    z-index: 10000;
  }

  .logo {
    margin-left: 0;
  }

  .main-container {
    margin-top: 51px;
  }

  .video-section {
    padding: 0 var(--spacing-unit) var(--spacing-unit);
    align-items: center;
  }

  .video-content {
    width: 100%;
    max-width: none;
  }

  .video-player {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    width: calc(100% + var(--spacing-unit) * 2);
    margin-left: calc(var(--spacing-unit) * -1);
    margin-right: calc(var(--spacing-unit) * -1);
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .videoinfo {
    margin-bottom: calc(var(--spacing-unit) * 0.75);
  }

  .video-title {
    font-size: 17px;
  }

  .video-meta {
    font-size: 13px;
    margin-bottom: calc(var(--spacing-unit) * 1.75);
  }
  
  .video-meta svg {
    width: 13px;
    height: 13px;
  }
  
  .channel-info {
    padding: calc(var(--spacing-unit) * 0.875) 0;
    margin-bottom: calc(var(--spacing-unit) * 2);
  }

  .channel-name {
    font-size: 14px;
  }
  
  .channel-avatar {
    width: 36px;
    height: 36px;
  }
  
  .broadcast-info {
    font-size: 13px;
  }
  
  .broadcast-info-container {
    margin-bottom: calc(var(--spacing-unit) * 2);
    min-height: 120px;
  }
  
  .legal-notice {
    padding: calc(var(--spacing-unit) * 0.875);
    margin-bottom: calc(var(--spacing-unit) * 2);
  }
  
  .notice-header {
    font-size: 14px;
    margin-bottom: calc(var(--spacing-unit) * 0.25);
  }

  .notice-text {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: calc(var(--spacing-unit) * 0.25);
  }
  
  .notice-text:last-child {
    margin-bottom: 0;
  }
  
  .footer {
    padding-top: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 0.875);
  }
}

@media (max-width: 480px) {
  .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: calc(var(--spacing-unit) * 0.75);
    height: 43px;
    justify-content: flex-start;
    z-index: 10000;
  }

  .logo {
    margin-left: 0;
  }

  .main-container {
    margin-top: 43px;
  }

  .video-section {
    padding: 0 calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 0.75);
    align-items: center;
  }

  .video-content {
    width: 100%;
    max-width: none;
  }
  
  .video-player {
    margin-bottom: var(--spacing-unit);
    width: calc(100% + var(--spacing-unit) * 1.5);
    margin-left: calc(var(--spacing-unit) * -0.75);
    margin-right: calc(var(--spacing-unit) * -0.75);
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .videoinfo {
    margin-bottom: calc(var(--spacing-unit) * 0.75);
  }
  
  .video-title {
    font-size: 17px;
  }
  
  .video-meta {
    font-size: 12px;
    margin-bottom: calc(var(--spacing-unit) * 1.75);
  }
  
  .video-meta svg {
    width: 12px;
    height: 12px;
  }
  
  .channel-info {
    padding: calc(var(--spacing-unit) * 0.75) 0;
    margin-bottom: calc(var(--spacing-unit) * 2);
  }
  
  .broadcast-info {
    font-size: 12px;
  }
  
  .broadcast-info-container {
    margin-bottom: calc(var(--spacing-unit) * 2);
    min-height: 120px;
  }
  
  .legal-notice {
    padding: calc(var(--spacing-unit) * 0.875);
    margin-bottom: calc(var(--spacing-unit) * 2);
  }

  .notice-header {
    font-size: 13px;
    margin-bottom: calc(var(--spacing-unit) * 0.25);
  }
  
  .notice-text {
    font-size: 10px;
    line-height: 1.4;
    margin-bottom: calc(var(--spacing-unit) * 0.25);
  }
  
  .notice-text:last-child {
    margin-bottom: 0;
  }
  
  .footer {
    padding-top: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 0.875);
  }
  
  .footer-content p {
    font-size: 11px;
  }
  
  .footer-copyright {
    font-size: 12px;
  }
}

::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
  border-radius: 4px;
  background: var(--twitch-bg-base);
}

::-webkit-scrollbar-thumb {
  border-width: var(--scrollbar-border-width, 2px);
  border-style: solid;
  border-color: var(--twitch-bg-base);
  border-radius: 4px;
  background: var(--twitch-bg-alt-2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--twitch-border);
}

::-webkit-scrollbar-thumb:active {
  background: var(--twitch-text-tertiary);
}

.skeleton {
  background: linear-gradient(90deg, var(--twitch-bg-alt) 0%, var(--twitch-bg-alt-2) 50%, var(--twitch-bg-alt) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s linear infinite;
  border-radius: 6px;
  will-change: background-position;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--twitch-bg-alt-2);
  }
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-title {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 75%;
  max-width: 480px;
  margin: 0;
  border-radius: 6px;
}

.skeleton-date {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 160px;
  margin: 0;
  border-radius: 6px;
}

.skeleton-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.6;
}

.skeleton-channel-name {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100px;
  margin: 0;
  border-radius: 6px;
}

.skeleton-broadcast {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-broadcast-line {
  height: 16px;
  border-radius: 6px;
  width: 100%;
}

.skeleton-broadcast-line:nth-child(odd) {
  width: 90%;
}

.skeleton-broadcast-line:nth-child(even) {
  width: 100%;
  height: 0;
}
