/* ===================================================
   VARYA KOMPUTER — Digital Poster Style
   Bright, Cheerful, Modern
   Accent: Twitter Blue #1DA1F2
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Fredoka:wght@600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --tw-blue: #1DA1F2;
  --tw-blue-dark: #0d8ecf;
  --tw-blue-light: #8ed6fc;
  --tw-blue-pale: #e8f6fe;
  --tw-blue-glow: rgba(29, 161, 242, 0.2);
  --tosca: #2dd4bf;
  --tosca-light: #5eead4;
  --tosca-pale: #ccfbf1;
  --tosca-glow: rgba(45, 212, 191, 0.2);
  --bg-white: #ffffff;
  --bg-soft: #f0f7ff;
  --bg-cream: #f8fbff;
  --text-dark: #1a2b4a;
  --text-medium: #4a6080;
  --text-light: #7a94b0;
  --card-shadow: 0 8px 32px rgba(29, 161, 242, 0.12);
  --card-shadow-hover: 0 12px 40px rgba(29, 161, 242, 0.2);
  --sidebar-width: 160px;
  --bottom-height: 90px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg-soft);
  color: var(--text-dark);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ---------- Decorative Blobs ---------- */
body::before {
  content: '';
  position: fixed;
  top: -120px;
  right: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(29, 161, 242, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -100px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Main Layout ---------- */
.app-container {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  grid-template-rows: 1fr var(--bottom-height);
  width: 100vw;
  height: 100vh;
  padding: 16px;
  gap: 16px;
  position: relative;
  z-index: 1;
  background: var(--bg-soft);
}

/* ---------- Video Section ---------- */
.video-section {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  background: var(--bg-white);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.video-section:hover {
  box-shadow: var(--card-shadow-hover);
}

.video-section video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
}

/* Playful gradient border overlay */
.video-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(135deg, var(--tw-blue-light), var(--tosca), var(--tw-blue), var(--tosca-light));
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: gradientBorder 6s ease infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes gradientBorder {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Soft play icon overlay center */
.video-section::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- Sidebar (Right) ---------- */
.sidebar {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 16px;
  padding: 28px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

/* Decorative top gradient bar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tw-blue-light), var(--tosca), var(--tosca-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Floating decorative dots */
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 6px;
  background: linear-gradient(90deg, var(--tw-blue-light), var(--tosca));
  border-radius: 3px;
  opacity: 0.3;
}

/* ---------- Logo ---------- */
.logo-wrapper {
  position: relative;
  width: 95px;
  height: 95px;
  flex-shrink: 0;
}

.logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 20px rgba(29, 161, 242, 0.25));
  transition: transform 0.3s ease;
}

.logo-wrapper:hover img {
  transform: scale(1.05);
}

/* Shimmer sweep overlay */
.logo-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(105deg,
      transparent 35%,
      rgba(255, 255, 255, 0.7) 50%,
      transparent 65%);
  border-radius: 20px;
  z-index: 2;
  animation: shimmer 3.5s ease-in-out infinite;
}

/* Ring removed — logo stands alone */

@keyframes ringPulse {

  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(1.04);
  }
}

/* ---------- Vertical VARYA Text ---------- */
.varya-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: auto;
  margin-top: -10px;
}

.varya-text .letter {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.1;
  background: linear-gradient(135deg,
      var(--tw-blue-light) 0%,
      var(--tw-blue) 35%,
      var(--tosca) 65%,
      var(--tosca-light) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 4s ease-in-out infinite;
  position: relative;
  filter: drop-shadow(0 2px 4px rgba(29, 161, 242, 0.15));
  transition: transform 0.2s ease;
}

.varya-text .letter:hover {
  transform: scale(1.25) rotate(-5deg);
}

.varya-text .letter:nth-child(1) {
  animation-delay: 0s;
}

.varya-text .letter:nth-child(2) {
  animation-delay: 0.12s;
}

.varya-text .letter:nth-child(3) {
  animation-delay: 0.24s;
}

.varya-text .letter:nth-child(4) {
  animation-delay: 0.36s;
}

.varya-text .letter:nth-child(5) {
  animation-delay: 0.48s;
}

/* ---------- Datetime Section ---------- */
.datetime-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 16px;
  margin-top: -15px;
  margin-bottom: 15px;
}

/* Calendar Icon Container */
.calendar-icon-container {
  position: relative;
  width: 100%;
  max-width: 130px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(29, 161, 242, 0.15);
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  border: 1px solid rgba(29, 161, 242, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calendar-icon-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(29, 161, 242, 0.25);
}

.calendar-header {
  background: linear-gradient(90deg, var(--tw-blue), var(--tosca));
  height: 20px;
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
  width: 100%;
  position: relative;
}

.calendar-icon-container::before,
.calendar-icon-container::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 8px;
  height: 20px;
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  border-radius: 8px;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.8), 0 3px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid #94a3b8;
  z-index: 2;
}

.calendar-icon-container::before {
  left: 20%;
}

.calendar-icon-container::after {
  right: 20%;
}

.calendar-body {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px);
  background: linear-gradient(180deg, var(--bg-white), var(--tw-blue-pale));
}

.large-date {
  font-family: 'Fredoka', sans-serif;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--tw-blue);
  text-shadow: 2px 2px 0px rgba(142, 214, 252, 0.4), 0 4px 10px rgba(29, 161, 242, 0.15);
  margin-bottom: 6px;
  margin-top: 2px;
}

.month-year-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-white);
  padding: 4px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 95%;
  border: 1px solid rgba(29, 161, 242, 0.1);
}

.month-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.year-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tw-blue);
}

/* Clean Digital Clock */
.clean-clock-container {
  width: 100%;
  max-width: 130px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(29, 161, 242, 0.1);
  border: 1px solid rgba(29, 161, 242, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  margin-top: 4px;
}

.clean-clock-header {
  background: var(--tw-blue-light);
  width: 100%;
  height: 6px;
}

.clock-display {
  padding: 8px 10px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(180deg, var(--bg-white), var(--tw-blue-pale));
}

.clock-value {
  font-family: 'Orbitron', 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  display: inline-block;
  perspective: 1000px;
  transform-style: preserve-3d;
  color: var(--tw-blue-dark);
}

.clock-colon {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--tw-blue);
  margin: 0 6px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes flipOut {
  0% {
    transform: rotateX(0);
    opacity: 1;
  }

  100% {
    transform: rotateX(-90deg);
    opacity: 0;
  }
}

@keyframes flipIn {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }

  100% {
    transform: rotateX(0);
    opacity: 1;
  }
}

.clock-value.flip-out {
  animation: flipOut 0.25s forwards ease-in;
}

.clock-value.flip-in {
  animation: flipIn 0.25s forwards ease-out;
}


/* ---------- Bottom Bar ---------- */
.bottom-bar {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 28px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

/* Colorful top accent */
.bottom-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tosca-light), var(--tw-blue-light), var(--tosca), var(--tw-blue));
}

.info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  transition: transform 0.2s ease;
}

.info-group:hover {
  transform: translateY(-2px);
}

.info-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--tw-blue-pale), var(--bg-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(29, 161, 242, 0.1);
}

.info-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--tw-blue);
}

.info-details {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--tw-blue);
  margin-bottom: 1px;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.8px;
  font-variant-numeric: tabular-nums;
}

.info-divider {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--tw-blue-pale), var(--tw-blue-light), var(--tw-blue-pale), transparent);
  border-radius: 1px;
}

/* ---------- Animations ---------- */
@keyframes shimmer {

  0%,
  100% {
    left: -120%;
  }

  50% {
    left: 120%;
  }
}

@keyframes textShimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* ---------- Loading Screen ---------- */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-brand {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--tw-blue);
  letter-spacing: 2px;
  margin-bottom: 24px;
  text-shadow: 0 2px 4px rgba(29, 161, 242, 0.1);
  animation: pulseBrand 2s infinite;
}

@keyframes pulseBrand {

  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--tw-blue-pale);
  border-top-color: var(--tw-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 32px;
}

.loading-progress-container {
  width: 250px;
  max-width: 80vw;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tw-blue-light), var(--tw-blue), var(--tosca));
  border-radius: 4px;
  transition: width 0.1s ease;
}

.loading-status {
  display: flex;
  justify-content: space-between;
  width: 250px;
  max-width: 80vw;
  font-size: 0.75rem;
  font-weight: 600;
}

.loading-text {
  color: var(--text-medium);
  letter-spacing: 0.5px;
}

.loading-percent {
  color: var(--tw-blue);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  letter-spacing: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Offline Badge ---------- */
.offline-badge {
  position: fixed;
  top: 28px;
  left: 28px;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 100;
  backdrop-filter: blur(12px);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(-10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.offline-badge.online {
  background: rgba(52, 211, 153, 0.15);
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  color: #059669;
  opacity: 1;
  transform: translateY(0);
}

.offline-badge.offline {
  background: rgba(251, 191, 36, 0.15);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  color: #d97706;
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE — TABLET
   ============================ */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 130px;
  }

  .logo-wrapper {
    width: 75px;
    height: 75px;
  }

  .varya-text .letter {
    font-size: 2.2rem;
  }
}

/* ============================
   RESPONSIVE — MOBILE
   ============================ */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding: 12px;
    gap: 12px;
  }

  .video-section {
    width: 100%;
    height: 52vh;
    min-height: 240px;
  }

  .sidebar {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    padding: 22px 20px;
  }

  .sidebar::before {
    height: 3px;
  }

  .sidebar::after {
    display: none;
  }

  .logo-wrapper {
    width: 60px;
    height: 60px;
  }

  .varya-text {
    flex-direction: row;
    gap: 6px;
  }

  .varya-text .letter {
    font-size: 2rem;
  }

  .datetime-container {
    width: auto;
    margin-bottom: 0;
  }

  .calendar-icon-container {
    max-width: 90px;
  }

  .large-date {
    font-size: 2.2rem;
  }

  .calendar-body {
    padding: 8px 6px;
  }

  .month-text {
    font-size: 0.65rem;
  }

  .year-text {
    font-size: 0.6rem;
  }

  .bottom-bar {
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
  }

  .info-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tw-blue-pale), var(--tw-blue-light), var(--tw-blue-pale), transparent);
  }

  .offline-badge {
    top: 20px;
    left: 20px;
  }
}

@media (max-width: 480px) {
  .video-section {
    height: 42vh;
    border-radius: var(--radius-md);
  }

  .video-section video {
    border-radius: var(--radius-md);
  }

  .video-section::before {
    border-radius: var(--radius-md);
  }

  .sidebar {
    border-radius: var(--radius-md);
  }

  .bottom-bar {
    border-radius: var(--radius-md);
  }

  .logo-wrapper {
    width: 50px;
    height: 50px;
  }

  .varya-text .letter {
    font-size: 1.7rem;
  }

  .info-value {
    font-size: 0.82rem;
  }

  .info-label {
    font-size: 0.58rem;
  }
}