/**
 * MINEHUT.GAY — Base Styles
 * Reset, Global Styles & Utilities
 */

/* ===== MODERN CSS RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  height: 100%;
}

/* Core body defaults */
body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  font-family: var(--font-primary);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg, #07040c);
  color: var(--text, #ffffff);
  overflow-x: hidden;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
label {
  line-height: var(--leading-tight);
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== SELECTION STYLING ===== */
::selection {
  background: rgba(255, 58, 92, 0.4);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(255, 58, 92, 0.4);
  color: var(--text-primary);
}

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--accent, #ff3a5c);
  outline-offset: 3px;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #120c1c;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--accent, #ff3a5c),
    var(--purple, #b366ff)
  );
  border-radius: var(--radius-full);
  border: 2px solid #120c1c;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-glow, #ff5a7c), #c588ff);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent, #ff3a5c) #120c1c;
}

/* ===== UTILITY CLASSES ===== */

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background: var(--accent);
  color: var(--text);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-lg);
  z-index: var(--z-tooltip);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width-2xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-4);
  }
}

/* Flex Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

/* Grid Utilities */
.grid {
  display: grid;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Text Utilities */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.uppercase {
  text-transform: uppercase;
}
.capitalize {
  text-transform: capitalize;
}

/* Position Utilities */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.sticky {
  position: sticky;
}
.inset-0 {
  inset: 0;
}

/* Pointer Events */
.pointer-events-none {
  pointer-events: none;
}
.pointer-events-auto {
  pointer-events: auto;
}

/* Visibility */
.hidden {
  display: none;
}
.invisible {
  visibility: hidden;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}
.overflow-auto {
  overflow: auto;
}
.overflow-x-hidden {
  overflow-x: hidden;
}

/* Aspect Ratios */
.aspect-video {
  aspect-ratio: 16 / 9;
}
.aspect-square {
  aspect-ratio: 1;
}

/* ===== ANIMATION UTILITIES ===== */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-fade-in {
  animation: fade-in var(--duration-slow) var(--ease-out) forwards;
}

.animate-fade-up {
  animation: fade-up var(--duration-slow) var(--ease-out) forwards;
}

.animate-scale-in {
  animation: scale-in var(--duration-normal) var(--ease-spring) forwards;
}

/* ===== LOADING STATES ===== */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-glass) 0%,
    var(--bg-glass-light) 50%,
    var(--bg-glass) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-wave {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== GLASS EFFECT UTILITIES ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-light {
  background: var(--bg-glass-light);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ===== GLOW EFFECTS ===== */
.glow-red {
  box-shadow: 0 0 30px rgba(255, 58, 92, 0.4);
}

.glow-cyan {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
}

.glow-purple {
  box-shadow: 0 0 30px rgba(179, 102, 255, 0.4);
}

.glow-ember {
  box-shadow: 0 0 30px rgba(255, 123, 58, 0.4);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--purple),
    var(--cyan)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-text-animated {
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--purple),
    var(--cyan),
    var(--accent)
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
