/* ===============================
   Global Reset & Base Styles
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ===============================
   Root / App Container Fix
================================ */
#root {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===============================
   Main Layout Containers
================================ */
.app,
.container,
.wrapper {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px;
}

/* ===============================
   Flex Helpers
================================ */
.flex {
  display: flex;
  gap: 12px;
}

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

.row {
  display: flex;
}

/* ===============================
   Buttons & Form Elements
================================ */
button,
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  font-size: 14px;
}

button {
  cursor: pointer;
}

/* ===============================
   Media Elements
================================ */
img,
canvas,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   Background Preview
================================ */
.background-preview {
  width: 100%;
  min-height: 200px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===============================
   Tablet & Mobile Fixes
================================ */
@media (max-width: 768px) {

  .row,
  .flex,
  .columns {
    flex-direction: column !important;
    width: 100%;
  }

  .container,
  .wrapper {
    padding: 10px;
  }

  button {
    width: 100%;
  }
}

/* ===============================
   Small Phones (≤ 480px)
================================ */
@media (max-width: 480px) {

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  body {
    font-size: 14px;
  }

  .container,
  .wrapper {
    padding: 8px;
  }
}