/* Base Styles & CSS Variables */
:root {
  /* Colors */
  --primary-color: #1976d2;
  --secondary-color: #764ba2;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --info-color: #2196f3;

  /* Text Colors */
  --text-color: #2d3748;
  --text-light: #718096;
  --text-lighter: #a0aec0;
  --text-white: #ffffff;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Gradient */
  --primary-gradient: linear-gradient(135deg, #1976d2 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #4568dc 0%, #b06ab3 100%);

  /* Border Colors */
  --border-color: #e2e8f0;
  --border-color-light: #edf2f7;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-heading: var(--font-family-base);
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.5s ease;

  /* Z-index */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  /* Container */
  --container-max-width: 1200px;
  --container-padding: 2rem;
}

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

/* Base Elements */
body {
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-secondary);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Modern Background Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
  background: radial-gradient(circle at 0% 0%, rgba(25, 118, 210, 0.1) 0%, transparent 50%), radial-gradient(circle at 100% 0%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(25, 118, 210, 0.1) 0%, transparent 50%), radial-gradient(circle at 0% 100%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
  z-index: -2;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--text-color);
}

p {
  /* margin-bottom: var(--spacing-md); */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--secondary-color);
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-primary);
  color: var(--text-color);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  transition: var(--transition-normal);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Selection */
::selection {
  background-color: var(--primary-color);
  color: var(--text-white);
}
