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

:root {
  --television-border-color: #121212;
  --television-status-power-on: #ffffff;
  --television-status-power-off: #2a2929;
  --television-screen-color: #000000;
  --television-radius: 10px;

  --body-background-color: #000000;

  --link-color: #3c3cff;

  --font: "Abel", sans-serif;

  --power-dot-width: 8px;
  --power-dot-height: 8px;
  --power-dot-active-shadow: #ffffff;

  --loading-background-color: #ffffff;

  --ball-first-color: #7f00ff;
  --ball-second-color: #3300cc;

  --border-radius-100-percent: 100%;

  --width-100-percent: 100%;
  --height-100-percent: 100%;

  --led-width: 10px;
  --led-height: 10px;
  --led-background-color: #000000;

  --transition-timing-function-custom: ease;

  --hero-background-color: #000000;
  --hero-font-color: #ffffff;

  --netlida-background-color: #ff0000;
  --netlida-logo: #e50914;
  --netlida-text-shadow: rgba(0, 0, 0, 0.45);

  --web-background-color: #0000ff;
  --setting-background-color: #ffffff;

  --home-button-color: #000000;
  --home-button-background-color: #ffffff;
}

@property --width-size {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 80%;
}

@property --screen-size {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 100%;
}

body {
  background: var(--body-background-color);
}

section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;

  width: var(--width-100-percent);
  font-family: var(--font);
}

#television-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#television-screen::-webkit-scrollbar-thumb {
  display: none;
}

#television-border {
  display: flex;
  position: relative;

  border: solid 15px var(--television-border-color);
  border-radius: var(--television-radius);
  min-width: var(--width-size);
  max-width: var(--width-size);
  min-height: var(--width-size);
  max-height: var(--width-size);
}

#television-screen {
  overflow-x: hidden;
  overflow-y: scroll;

  transition: all 2s var(--transition-timing-function-custom);

  background: var(--television-screen-color);
  min-width: var(--screen-size);
  max-width: var(--screen-size);
  min-height: var(--screen-size);
  max-height: var(--screen-size);
}

#power-dot {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: -12px;
  right: 3px;
  transition: all 0.3s var(--transition-timing-function-custom);
  cursor: pointer;

  width: var(--power-dot-width);
  height: var(--power-dot-height);
  border-radius: var(--border-radius-100-percent);
  background: var(--television-status-power-off);
}

#power-dot.active {
  transition: all 0.3s var(--transition-timing-function-custom);
  -webkit-box-reflect: below 5px
    linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));

  box-shadow: 0 0 10px 1px var(--power-dot-active-shadow);
  background: var(--television-status-power-on);
}

#loading {
  display: flex;
  flex-direction: column;
  font-size: 2rem;
  gap: 10px;
  justify-content: center;
  align-items: center;
  position: relative;
  font-weight: bold;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transition: all 2s var(--transition-timing-function-custom);

  width: var(--width-100-percent);
  height: var(--height-100-percent);
  background: var(--loading-background-color);
}

.entrance {
  opacity: 1 !important;
  transition: all 2s var(--transition-timing-function-custom) !important;
  pointer-events: all !important;
}

@keyframes entrance {
  to {
    opacity: 1;
  }
}

.loading-text a {
  text-decoration: none;

  color: var(--link-color);
}

.ball {
  position: absolute;
  width: 150px;
  height: 150px;
  z-index: 2;
  opacity: 0;
  transition: all 2s var(--transition-timing-function-custom);
  pointer-events: none;
}

.ball.one {
  top: 0;
  right: 0;

  background: var(--ball-first-color);
  border-bottom-left-radius: var(--border-radius-100-percent);
}

.ball.two {
  bottom: 0;
  left: 0;

  background: var(--ball-second-color);
  border-top-right-radius: var(--border-radius-100-percent);
}

.hero-television {
  display: grid;
  grid-template-rows: 30% auto;
  background: var(--hero-background-color);

  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

.home {
  display: flex;
  padding: 20px;
  color: var(--hero-font-color);
}

#right-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.set,
.media {
  display: flex;
  gap: 10px;
}

.media > a {
  cursor: pointer;
}

.media {
  justify-content: end;
}

.set > img,
.media > a > img {
  filter: invert(1);
}

#left-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.home-head {
  font-size: 4rem;
  font-weight: bold;
}

.home-text {
  font-size: 1.25rem;
}

.grid-apps {
  display: grid;
  grid-template:
    "a b c d d d d"
    "e e e d d d d"
    "f f f g h h h";
  gap: 20px;
  padding: 20px;
}

.app {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.144);
}

.app:not(.netlida, .web, .settings) {
  position: relative;
  overflow: hidden;
}

.app:not(.netlida, .web, .settings)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.049) 20%,
    rgba(255, 255, 255, 0.049) 50%,
    rgba(255, 255, 255, 0.049) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  border-radius: inherit;
  animation: shimmer 2s infinite ease-in-out;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.app > img {
  width: 40px;
  height: 40px;
}

.app.netlida {
  grid-area: a;
  cursor: pointer;
  border-radius: 20px;
  background: var(--netlida-background-color);
  transition: all 0.3s var(--transition-timing-function-custom);
}

.app.netlida:hover {
  transition: all 0.3s var(--transition-timing-function-custom);
  transform: translateY(-10px);
  box-shadow: 5px 5px 15px #ff00008c;
}

.app.web {
  grid-area: b;
  cursor: pointer;
  border-radius: 20px;
  background: var(--web-background-color);
  transition: all 0.3s var(--transition-timing-function-custom);
}

.app.web:hover {
  transition: all 0.3s var(--transition-timing-function-custom);
  transform: translateY(-10px);
  box-shadow: 5px 5px 15px #0000ff8c;
}

.app.settings {
  grid-area: c;
  cursor: pointer;
  border-radius: 20px;
  background: var(--setting-background-color);
  transition: all 0.3s var(--transition-timing-function-custom);
}

.app.settings:hover {
  transition: all 0.3s var(--transition-timing-function-custom);
  transform: translateY(-10px);
  box-shadow: 5px 5px 15px #ffffff8c;
}

.app:nth-child(4) {
  grid-area: d;
}

.app:nth-child(5) {
  grid-area: e;
}

.app:nth-child(6) {
  grid-area: f;
}

.app:nth-child(7) {
  grid-area: g;
}

.app:nth-child(8) {
  grid-area: h;
}

iframe {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  border: none;
  pointer-events: none;
  z-index: 2;

  transition: all 0.3s var(--transition-timing-function-custom);
  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

.home__button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  width: 150px;
  color: var(--home-button-color);
  font-weight: bold;
  background: var(--home-button-background-color);
  position: absolute;
  bottom: 20px;
  right: 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 24px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--transition-timing-function-custom);
}

#ambilight {
  position: absolute;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

.led {
  transition: background-color 0.1s linear;

  width: var(--led-width);
  height: var(--led-height);
  background-color: var(--led-background-color);
}

.top-middle {
  position: absolute;
  top: 110px;
  width: 1504px;
  height: 220px;
  left: 207px;
}

.bottom-middle {
  position: absolute;
  top: 330px;
  width: 1504px;
  height: 200px;
  left: 207px;
}

.right-middle {
  position: absolute;
  top: 530px;
  width: 1504px;
  height: 200px;
  left: 207px;
}

.left-middle {
  position: absolute;
  top: 728px;
  width: 1504px;
  height: 108px;
  left: 207px;
}

.screen-off {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s var(--transition-timing-function-custom);

  background: var(--television-screen-color);
  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

#netlida-app {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;

  transition: all 0.3s var(--transition-timing-function-custom);
  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

#warning {
  color: red;
}

.warn {
  width: clamp(52%, 52%, 100%);
  text-align: center;
  font-size: 1.25rem;
  margin-top: 50px;
}

.nf-header {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  height: 68px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 10%, transparent);
  z-index: 1000;
  transition: background 0.3s ease;
}

.nf-header.scrolled {
  background: #141414;
}

.nf-brand {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nf-logo {
  font-size: 25px;
  font-weight: 900;
  color: var(--netlida-logo);
  letter-spacing: -1px;
}

.nf-nav {
  display: flex;
  gap: 20px;
}

.nf-nav a {
  color: #e5e5e5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nf-nav a:hover {
  color: #b3b3b3;
}

.nf-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nf-search {
  background: transparent;
  border: 1px solid #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  width: 250px;
  transition: border-color 0.3s ease;
}

.nf-search:focus {
  outline: none;
  border-color: var(--netlida-logo);
}

.nf-search::placeholder {
  color: #ffffff;
}

.nf-hero {
  height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(77deg, rgba(0, 0, 0, 0.6) 0%, transparent 85%),
    url("../images/background-netlify.webp") center / cover;
  padding: 0 4%;
  position: relative;
}

.nf-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, #141414);
}

.nf-hero-content {
  max-width: 500px;
  z-index: 2;
}

.nf-tag {
  color: #46d369;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nf-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px var(--netlida-text-shadow);
  color: #ffffff;
}

.nf-desc {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 25px;
  color: #e5e5e5;
  text-shadow: 1px 1px 2px ar(--netlida-text-shadow);
}

.nf-buttons {
  display: flex;
  gap: 12px;
}

.nf-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.nf-btn-play {
  background: white;
  color: black;
}

.nf-btn-play:hover {
  background: #e6e6e6;
  transform: scale(1.05);
}

.nf-btn-info {
  background: rgba(109, 109, 110, 0.7);
  color: white;
}

.nf-btn-info:hover {
  background: rgba(109, 109, 110, 0.4);
  transform: scale(1.05);
}

#settings-app {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  overflow: hidden;
  color: #ffffff;

  transition: all 0.3s var(--transition-timing-function-custom);
  width: var(--width-100-percent);
  height: var(--height-100-percent);
}

.settings__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #000000d6;
  box-shadow: 0px 0px 0px 1px, 0px 0px 500px 500px #000000c2;
  width: 50%;
  height: 50%;
  padding: 15px;
  border-radius: 20px;
}

.settings__main h2 {
  font-size: 3rem;
  text-align: center;
}

.settings__main select {
  width: 30%;
  align-self: center;
  outline: none;
  border-radius: 20px;
  padding: 5px;
  font-size: 1rem;
  font-weight: bold;
  background: transparent;
  border: solid 1px #ffffff;
  color: #ffffff;
}

.settings__main select > option {
  color: black;
}
