/*
  Global foundation for FLProg Club.
  Keep this file generic: no page-specific layout rules here.
*/

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  background: #f8fafc;
}

/* Ordinary site pages use a sticky-footer layout: if the page content is short,
   the footer is pushed to the bottom of the viewport; if the content is long,
   the footer stays after the content. App pages keep their own fixed workspace
   layout through body.club-app-body rules. */
body:not(.club-app-body) {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

body:not(.club-app-body) > .site-header,
body:not(.club-app-body) > .site-footer {
  flex: 0 0 auto;
}

body:not(.club-app-body) > .site-footer {
  margin-top: auto;
}

img,
picture,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

main {
  display: block;
}

.page-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.primary-button:hover {
  background: #1d4ed8;
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .page-container {
    padding: 0 14px;
  }
}


/* Floating "back to top" control for ordinary content pages.
   App pages (chat, FLStudio Web) hide it because they use full-screen work areas. */
.scroll-to-top-button {
  position: fixed;
  right: clamp(18px, 2.6vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 120;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.48), transparent 54%),
    linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255,255,255,0.08) inset;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.94);
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease, box-shadow .18s ease;
}

.scroll-to-top-button span {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  transform: translateY(-2px);
  text-shadow: 0 2px 14px rgba(15, 23, 42, 0.34);
}

.scroll-to-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-to-top-button:hover {
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.30), 0 0 0 1px rgba(255,255,255,0.14) inset;
  transform: translateY(-2px) scale(1.02);
}

.scroll-to-top-button:focus-visible {
  outline: 3px solid rgba(6, 182, 212, 0.36);
  outline-offset: 3px;
}

body.club-app-body .scroll-to-top-button {
  display: none !important;
}

@media (max-width: 700px) {
  .scroll-to-top-button {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: 16px;
    border-radius: 16px;
  }

  .scroll-to-top-button span {
    font-size: 26px;
  }
}
