/* Eikon Haven - Custom Styles */

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #0f0f14;
  color: #c0caf5;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Site-wide animated gradient background */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(122,162,247,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 20%, rgba(187,154,247,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(115,218,202,0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(247,118,142,0.06) 0%, transparent 35%);
  animation: ambient-drift 800s ease-in-out infinite;
}

@keyframes ambient-drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(4%, -3%) rotate(0.5deg) scale(1.02); }
  50% { transform: translate(-2%, 4%) rotate(-0.5deg) scale(0.98); }
  75% { transform: translate(-4%, -2%) rotate(0.3deg) scale(1.01); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

/* Noise texture overlay */
body > header,
body > main,
body > footer {
  position: relative;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f0f14;
}

::-webkit-scrollbar-thumb {
  background: #24283b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #565f89;
}

/* Selection color */
::selection {
  background: #7aa2f733;
  color: #c0caf5;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #7aa2f7;
  box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.15);
}

/* Card hover effect */
.eikon-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.eikon-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(122, 162, 247, 0.1);
}

/* Animation for page transitions */
#app-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Spinning animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Gradient text for hero */
.hero-gradient-text {
  background: linear-gradient(135deg, #7aa2f7, #bb9af7, #73daca, #7aa2f7);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: hero-text-shift 12s ease-in-out infinite;
}

@keyframes hero-text-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Canvas container */
canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Button base styles */
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Link styles */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

/* Dropdown animation */
.dropdown-menu {
  animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal backdrop */
.modal-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Braille loader */
.braille-loader::after {
  content: '⠁';
  display: inline-block;
  font-size: 1.5rem;
  color: #7aa2f7;
  animation: braille-cycle 1s steps(1) infinite;
}

@keyframes braille-cycle {
  0%  { content: '⠁'; }
  12% { content: '⠂'; }
  25% { content: '⠄'; }
  37% { content: '⡀'; }
  50% { content: '⢀'; }
  62% { content: '⠠'; }
  75% { content: '⠐'; }
  87% { content: '⠈'; }
}

/* Color picker widget */
.color-picker-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tag pill */
.tag-pill.active {
  border-color: #7aa2f7;
  color: #7aa2f7;
  background-color: rgba(122, 162, 247, 0.1);
}

/* Filter panel */
.filter-panel {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.filter-panel.collapsed {
  max-height: 0;
  opacity: 0;
}

.filter-panel.expanded {
  max-height: 1000px;
  opacity: 1;
}

.filter-checkbox {
  accent-color: #7aa2f7;
}

/* Responsive canvas sizing */
@media (max-width: 640px) {
  canvas {
    max-width: 100%;
    height: auto;
  }
}

/* Report modal radio styling */
.report-reason-option:checked + label {
  border-color: #7aa2f7;
  background-color: rgba(122, 162, 247, 0.05);
}

/* Profile submission cards */
.submission-preview-container {
  width: 240px;
  height: 190px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.375rem;
  background: #0f0f14;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submission-preview-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 640px) {
  .submission-preview-container {
    width: 180px;
    height: 144px;
  }
}

/* Profile avatar with eikon preview */
.profile-avatar-container {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: #24283b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-container canvas {
  display: block;
  border-radius: 50%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Navbar avatar eikon */
.navbar-avatar-eikon {
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #24283b;
}

.navbar-avatar-eikon canvas {
  display: block;
  border-radius: 50%;
}
