:root {
  --color-background: #3A3D51;
  --color-foreground: #FFFFFF;
  --color-primary: #ffc800;
  --color-accent: #F6CA45;
  --color-darker-navy: #1A252F;
  --color-white: #FFFFFF;
  --color-light-gray: #F8F9FA;
  --color-button-hover: #E65100;
  --color-bottom: #151823;
  --color-green: #3DC55B;
  --font-primary: "Inter", "Segoe UI", sans-serif;
  --color-hero-gradient-start: #BF360C;
  --color-hero-gradient-middle: #E65100;
  --color-hero-gradient-end: #FF8F00;
  --background-gradien: linear-gradient(90deg, var(--color-hero-gradient-start) 0%,
      var(--color-hero-gradient-middle) 35%,
      var(--color-hero-gradient-end) 100%);
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --container-max: 1200px;
  --container-padding: 20px;

  /* Effects */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-background);
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-primary);
  color: var(--color-white);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

details {
  cursor: pointer;
}

/* button reset */
button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-sm) var(--container-padding);
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  gap: var(--space-sm);
}

/* Header Styles */
.header {
  background: var(--background-gradien);
  position: relative;
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: flex;
  color: var(--color-white);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  width: 120px;
  filter: drop-shadow(5px 2px 3px #000000);
}

.header__nav {
  display: flex;
  gap: var(--space-sm);
}

.header__btn {
  padding: var(--space-xs) var(--space-md);
  border: 2px solid var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  transition: var(--transition-fast);
  font-size: 16px;
  display: inline-block;
}

.header__btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Footer */
.footer {
  background: var(--color-bottom);
  text-align: center;
}

.footer__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.footer__subtitle {
  font-size: 18px;
  color: var(--color-white);
  opacity: 0.8;
  margin-bottom: var(--space-lg);
}

.footer__copyright {
  font-size: 14px;
  color: var(--color-white);
  opacity: 0.6;
}

/* Hero Section */
.hero {
  background: var(--background-gradien);
  position: relative;
}

.hero__container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero__title {
  font-size: 38px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  margin-top: auto;
}

.hero__subtitle {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-white);
  opacity: 0.9;
}

.hero__title, .hero__subtitle {
  text-shadow: 5px 5px var(--color-bottom);
  text-align: center;
}

.hero__description {
  font-size: 18px;
  color: var(--color-white);
  margin-bottom: var(--space-xl);
  opacity: 0.8;
}

.button {
  color: var(--color-white);
  padding: var(--space-sm) var(--space-xl);
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  transform: translateY(-2px);
}

.button-yellow {
  background: var(--color-primary);

  &:hover {
    background: var(--color-hero-gradient-end);
  }
}

.button-green {
  background-color: var(--color-green);

  &:hover {
    filter: brightness(110%);
  }
}

.btn-center {
  text-align: center;
}

.iframe {
  display: flex;
  flex-direction: column;
  position: relative;
}

.iframe__banner {
  background-image: url('/images/Crossy-Road.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
  display: flex;
  flex-direction: column;
  height: 600px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.iframe__banner iframe {
  width: 100%;
  height: 100%;
}

.iframe__footer {
  bottom: 0;
  z-index: 1;
  padding: var(--space-xs) var(--space-md);
}

.iframe__controls {
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.iframe__header {
  padding: var(--space-xs) var(--space-md);
  margin: auto;
}

/* Section Styles */
.section--dark {
  background: var(--color-dark-navy);
}

.section--darker {
  background: var(--color-bottom);
}

.section--faq {
  p {
    margin: 1em 0;
    padding-left: var(--space-sm);
    color: var(--color-accent);
  }
  
  details:not(:last-child) {
    margin-bottom: var(--space-sm);
  }
}

.section__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  position: relative;
  padding-bottom: var(--space-xs);
  text-shadow: 3px 1px var(--color-button-hover);

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
  }
}

.section__3rd-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section__4th-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

/* Styled list */

.styled-list {
  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.styled-list__item {
  background: linear-gradient(90deg, var(--color-hero-gradient-start) 0%, transparent 100%);
  border-radius: var(--border-radius-md);
  align-items: center;
  display: flex;
  padding: var(--space-xs) var(--space-sm);
  position: relative;
}

.styled-list__title {
  font-size: 14px;
}

.styled-list__description {
  font-size: 12px;
}

.styled-list__item img {
  width: 95px;
  filter: drop-shadow(5px 5px 5px #000000);
  position: absolute;
  right: 0;
}

/* Default lists */
.list {
  padding-left: var(--space-sm);
}

/* Images container */

img {
  border: none;
  height: auto;
  width: 100%;
}

.images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  width: 75%;
  margin: 0 auto;
}

.image-container {
  display: flex;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--color-hero-gradient-end);
  margin: 0 auto;
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.image-container--banner {
  width: 85%;
}

.image-container--interface {
  width: 65%;
  border-radius: var(--border-radius-lg);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-bottom);
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: var(--color-hero-gradient-end);
  color: var(--color-bottom);
}

tr:nth-child(even) {
  background: var(--color-light-gray);
}

tr:hover {
  background: #f5f5f5;
}

.table {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin: 30px 0;
}

@media (max-width: 768px) {
  .table {
    overflow-x: auto;
    table {
      min-width: 600px;
    }
  }

  .image-container--banner, .image-container--interface, .images {
    width: 100%;
    gap: var(--space-xs);
  }

  .styled-list img {
    width: 75px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--space-sm) var(--space-sm);
  }

  .hero__title {
    font-size: 28px;
  }

  .section__title {
    font-size: 24px;
  }
}

.rating {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  gap: var(--space-xs);
  z-index: 20;
  background: rgba(10, 25, 47, 0.6);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rating--inline {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: auto;
  margin: var(--space-xs) 0 0;
  background: rgba(10, 25, 47, 0.45);
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
  gap: var(--space-xs);
  display: inline-flex;
  align-items: center;
}

.rating--in-container {
  margin-left: auto;
  background: transparent;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating--inline .rating__question {
  margin-right: var(--space-xs);
  font-size: 14px;
}


.rating__btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.rating__btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.rating__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


.rating__btn--up,
.rating__btn--down {
  color: var(--color-white);
}

/* Disabled state for buttons after voting */
.rating__btn:disabled,
.rating__btn[aria-disabled="true"] {
  opacity: 0.75;
  cursor: default;
  pointer-events: none;
}

/* Selected states */
.rating__btn--selected.up {
  background: var(--color-green);
  border-color: var(--color-green);
  color: var(--color-bottom);
}

.rating__btn--selected.down {
  background: var(--color-button-hover);
  border-color: var(--color-button-hover);
  color: var(--color-white);
}

/* SVG sizing inside rating buttons */

.rating__btn svg {
  width: var(--space-md);
  height: var(--space-md);
  display: block;
}

.rating__btn svg.icon--rotated {
  transform: rotate(180deg);
}

/* Question label and buttons wrapper */
.rating__question {
  color: var(--color-white);
  font-weight: 600;
  margin-right: 10px;
  align-self: center;
  font-size: 14px;
}

.rating__buttons {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

/* Responsive adjustments for rating block */
@media (max-width: 768px) {
  .rating {
    top: var(--space-xs);
    right: var(--space-xs);
    padding: var(--space-xs);
    gap: var(--space-xs);
  }

  .rating__question {
    display: none; /* hide question on medium screens to save space */
  }

  .rating__btn {
    padding: 8px 10px;
    font-size: 16px;
  }

  .rating__btn svg {
    width: var(--space-sm);
    height: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .rating {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin: var(--space-xs) auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% - 2 * var(--space-sm));
    padding: var(--space-xs);
    gap: var(--space-xs);
    background: rgba(10, 25, 47, 0.75);
    border-radius: var(--border-radius-sm);
  }

  .rating__question {
    display: none;
  }

  .rating__buttons {
    gap: var(--space-xs);
  }

  .rating__btn {
    padding: 8px 10px;
    font-size: 16px;
  }

  .rating__btn svg {
    width: var(--space-xs);
    height: var(--space-xs);
  }
}