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

body,
h1,
h2,
h3,
h4,
h5,
p,
button,
input,
textarea {
  font-family: "Raleway", sans-serif;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(13, 159, 244, 0.18), transparent 18%),
    linear-gradient(135deg, #0c0f14 0%, #10151d 35%, #0d9ff4 100%);
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

.install-banner {
  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
  display: none;
  background: linear-gradient(90deg, rgba(13, 159, 244, 0.92), rgba(122, 208, 255, 0.9));
  color: #0b1020;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.install-banner.visible {
  display: block;
}

.install-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-banner-btn,
.install-banner-dismiss {
  appearance: none;
  border: none;
  cursor: pointer;
}

.install-banner-btn {
  background: #0b1020;
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.install-banner-dismiss {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(11, 16, 32, 0.1);
  font-size: 18px;
  line-height: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('Untitled_design.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 10, 16, 0.88), rgba(6, 10, 16, 0.58), rgba(9, 15, 26, 0.88));
  z-index: 0;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 120px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9ff4, #7ad0ff);
  box-shadow: 0 0 10px rgba(13, 159, 244, 0.65);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.action-btn,
.mini-btn,
.control-btn,
.modal-close,
.submit-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.action-btn:hover,
.mini-btn:hover,
.control-btn:hover,
.modal-close:hover,
.submit-btn:hover {
  transform: translateY(-1px);
}

.clock-card {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: linear-gradient(135deg, rgba(13, 159, 244, 0.22), rgba(255, 187, 0, 0.12));
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 30px rgba(0, 0, 0, 0.18);
}

#clock {
  display: block;
  width: 10ch;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

#date {
  display: block;
  width: 100%;
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
  text-align: right;
  white-space: nowrap;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.logo-section {
  display: flex;
  justify-content: center;
}

#logo {
  width: min(760px, 100%);
  height: 520px;
  background-image: url('electricity_web_3d_logo.png');
  background-size: cover;
  background-position: center;
  border-radius: 36px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.45),
    0 0 65px rgba(13, 159, 244, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

#logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 30%, transparent 65%, rgba(13, 159, 244, 0.08));
}

#logo:hover {
  transform: scale(1.02) translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 38px 100px rgba(0, 0, 0, 0.52),
    0 0 70px rgba(13, 159, 244, 0.24);
}

.player-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  height: 100%;
  width: 100%;
}

.player-card {
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.86), rgba(8, 11, 18, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 45px rgba(13, 159, 244, 0.08);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  flex: 2 1 0%;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.live-pill,
.station-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.live-pill {
  background: linear-gradient(90deg, #ff6b6b, #ff8f6f);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.station-tag {
  color: rgba(255, 255, 255, 0.82);
}

.nowPlaying {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(13, 159, 244, 0.1));
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nowPlaying img,
.coming-up-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 0 18px rgba(13, 159, 244, 0.3);
}

/* Coming up next panels */
.coming-up-panel {
  margin-top: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(13,159,244,0.03));
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.04);
  color: #fff;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.coming-up-panel.is-hidden {
  opacity: 0;
  transform: translateX(-32px);
  pointer-events: none;
  visibility: hidden;
}

.coming-up-panel.is-animating {
  animation: coming-up-slide-in 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes coming-up-slide-in {
  0% {
    opacity: 0;
    transform: translateX(-36px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.coming-up-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 8px;
}

.coming-up-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.coming-up-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  overflow-wrap: anywhere;
}

.coming-up-mobile {
  display: none;
}

.coming-up-desktop {
  display: block;
  width: 100%;
  max-width: 100%;
  flex: 1 1 0%;
  align-self: stretch;
}

.track-history {
  margin-top: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(13,159,244,0.04));
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  width: 100%;
}

.track-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.track-history-header span {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.8);
}

.track-history-toggle {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.track-history-toggle:hover {
  background: rgba(13, 159, 244, 0.16);
  transform: translateY(-1px);
}

.track-history-toggle-icon {
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 0.25s ease;
}

.track-history-panel {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
  max-height: 1200px;
  opacity: 1;
}

.track-history.is-collapsed .track-history-header {
  margin-bottom: 0;
}

.track-history.is-collapsed .track-history-panel {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.track-history.is-collapsed .track-history-toggle-icon {
  transform: rotate(-90deg);
}

.track-history-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: block;
  gap: 10px;
}

.track-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 15px;
  line-height: 1.2;
  color: #eef2ff;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13,159,244,0.12), rgba(255,255,255,0.03));
  box-shadow: 0 6px 18px rgba(0,0,0,0.3) inset;
  flex: 0 0 48px;
}

.track-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* no index numbers for history items */

.open-history-btn {
  display: none;
}

@media (max-width: 900px) {
  .track-history-desktop {
    display: none;
  }
  .open-history-btn {
    display: inline-flex;
  }
  .track-history-list {
    display: block;
  }
}

.now-playing-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.now-playing-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

#now-playing-text {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  padding-right: 4px;
}

.player-controls-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.control-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9ff4, #7ad0ff);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(13, 159, 244, 0.4);
}

.control-btn.secondary {
  width: 52px;
  height: 52px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.volume-wrap input[type="range"] {
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9ff4, #7ad0ff);
  outline: none;
}

.volume-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0d9ff4;
  cursor: pointer;
}

.player-footer {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.w3-modal {
  background: rgba(3, 6, 10, 0.78) !important;
}

.w3-modal-content {
  background: transparent !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
}

.modal-panel {
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.98), rgba(7, 10, 16, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(90deg, rgba(13, 159, 244, 0.18), rgba(255, 187, 0, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h1,
.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
}

.modal-body {
  padding: 24px;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px 18px;
  border-radius: 16px;
  margin: 0;
  font-weight: 700;
  transition: all 0.3s ease;
}

.social:hover {
  background: rgba(13, 159, 244, 0.18);
  transform: translateX(6px);
}

.social i {
  width: 24px;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form p {
  margin: 0;
}

.form-message {
  min-height: 22px;
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}

.form-message.success {
  color: #8ef0b3;
}

.form-message.error {
  color: #ff9a9a;
}

.w3-input {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.w3-input::placeholder {
  color: rgba(255, 255, 255, 0.52) !important;
}

.w3-input:focus {
  box-shadow: 0 0 0 3px rgba(13, 159, 244, 0.21) !important;
  border-color: #0d9ff4 !important;
}

.submit-btn {
  width: fit-content;
  background: linear-gradient(135deg, #0d9ff4 0%, #7ad0ff 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(13, 159, 244, 0.34);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.about-container {
  max-width: 860px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(233, 242, 248, 0.98));
  color: #0f172a;
  padding: 32px;
  line-height: 1.8;
  font-size: 18px;
}

.about-text {
  margin: 0;
}

@media screen and (max-width: 1023px) {
  .app-shell {
    padding: 18px 16px 220px;
  }

  .top-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-actions {
    order: 3;
    width: 100%;
  }

  .clock-card {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    flex: 0 0 auto;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  #clock,
  #date {
    width: 100%;
    text-align: center;
  }

  #stream {
    display: block;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  #logo {
    width: min(520px, 100%);
    height: 360px;
  }

  /* mobile: show big coming-up under logo, hide desktop variant */
  .coming-up-mobile {
    display: block;
    width: 100%;
    max-width: 880px;
    margin: 8px 0 0;
    padding: 20px 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(8,12,18,0.9), rgba(6,10,16,0.85));
    border: 1px solid rgba(255,255,255,0.04);
  }

  .coming-up-mobile .coming-up-text {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
  }

  .coming-up-desktop {
    display: none;
  }

  /* On mobile, keep player sticky to bottom */
  .player-section {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    width: 100%;
    padding: 0;
    flex-direction: column;
    max-height: 170px;
  }

  .player-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 12px 12px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.98), rgba(3, 6, 12, 1));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 -10px 24px rgba(0, 0, 0, 0.45),
      0 0 18px rgba(13, 159, 244, 0.06);
  }

  .player-top {
    display: none;
  }

  .nowPlaying {
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .nowPlaying img {
    width: 54px;
    height: 54px;
  }

  .player-controls-panel {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
  }

  .control-btn {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .control-btn.secondary {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }

  .volume-wrap {
    width: 100%;
    min-width: 0;
  }

  #now-playing-text {
    font-size: 16px;
    line-height: 1.15;
  }

  .player-footer {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .player-section {
    padding: 0;
  }

  .player-card {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-sizing: border-box;
    margin: 0; 
    padding: 8px 12px;
    border-radius: 16px 16px 0 0;
  }

  .player-top,
  .player-footer,
  .coming-up-label {
    display: none;
  }

  .coming-up-mobile-text {
    font-size: 15px;
    line-height: 1.2;
  }

  .nowPlaying {
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
  }

  .nowPlaying img {
    width: 48px;
    height: 48px;
  }

  #now-playing-text {
    font-size: 16px;
  }

  .player-controls-panel {
    gap: 8px;
  }

  .control-btn {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .control-btn.secondary {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .volume-wrap {
    gap: 8px;
  }

  .brand-pill {
    font-size: 12px;
  }

  #clock {
    font-size: 32px;
  }

  #logo {
    height: 300px;
  }

  .action-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .about-container {
    font-size: 16px;
    padding: 22px;
  }
}
