/* Base Styles and Imports */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
}

body {
  background-color: #050505;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Custom Cursor - Non-touch devices only */
@media (hover: hover) {
  body {
    cursor: none !important;
  }
  
  a, button, .magnetic-btn, .name-text, .interactive, input, select, textarea {
    cursor: none !important;
  }
  
  .cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    filter: blur(0px);
    opacity: 0.8;
    transition: width 0.3s, height 0.3s, opacity 0.3s,
      transform 0.3s ease-out;
  }
  
  .cursor-hover-link .cursor-dot {
    width: 16px;
    height: 16px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  
  .cursor-clicked .cursor-dot {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 1;
  }
}

/* Hide cursor elements on touch devices */
@media (hover: none) {
  .cursor-dot, .cursor-coordinates {
    display: none !important;
  }
}

/* Background Elements */
.minimalist-background {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
}

#particle-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.minimalist-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 30% 50%,
      rgba(25, 25, 35, 0.4),
      transparent 70%
    ),
    radial-gradient(
      circle at 70% 20%,
      rgba(35, 35, 45, 0.3),
      transparent 70%
    );
  z-index: 2;
  pointer-events: none;
}

/* Layout */
.container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
}

.hero-container {
  width: 100%;
}

.hero {
  margin-bottom: 80px;
  position: relative;
  overflow: visible;
  width: 100%;
  z-index: 5;
}

/* Text Styling */
.text-container {
  overflow: visible;
  margin-bottom: 20px;
  position: relative;
  padding: 30px 0;
  perspective: 1000px;
  z-index: 5;
}

.distort-text {
  font-size: clamp(2.5rem, 9vw, 9rem);
  font-weight: 700;
  letter-spacing: -2px;
  position: relative;
  transition: all 0.3s ease;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-block;
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: transform;
  padding: 20px;
  margin: -20px;
}

.name-text {
  position: relative;
  display: inline-block;
  transition: all 0.4s ease;
}

/* Hover effects for non-touch devices */
@media (hover: hover) {
  .name-text:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  }
  
  .name-text::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.8) 50%,
      transparent 100%
    );
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  }
  
  .name-text:hover::after {
    transform: scaleX(1);
  }
}

/* Typing Animation */
.typing-container {
  position: relative;
  margin-top: 15px;
  min-height: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.typing-text {
  display: inline-block;
  position: relative;
  font-size: clamp(1rem, 1.4rem, 5vw);
  font-weight: 400;
  opacity: 1;
  margin-right: 3px;
  height: 1.6rem;
  line-height: 1.6rem;
  white-space: nowrap;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.4rem;
  background-color: white;
  animation: blinkCursor 0.8s infinite;
  vertical-align: middle;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.2rem, 4vw);
  font-weight: 300;
  margin-bottom: 30px;
  max-width: 600px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 1.5s forwards;
  animation-delay: 1.2s;
}

/* Word highlighting animation */
.highlight-word:nth-child(2n) { animation-delay: 0.1s; }
.highlight-word:nth-child(3n) { animation-delay: 0.2s; }
.highlight-word:nth-child(4n) { animation-delay: 0.3s; }

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

/* Buttons */
.btn-wrapper {
  position: relative;
  display: flex;
  gap: 15px;
  margin-top: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s forwards;
  animation-delay: 2s;
  padding: 10px;
  z-index: 5;
}

/* Monochrome button icon styling for all buttons */
.magnetic-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: rgba(255, 255, 255, 0.9) !important;
  opacity: 0.85;
  filter: brightness(1.2) contrast(0.9);
}

/* Button styles */
.eth-donate-btn {
  background: rgba(113, 89, 193, 0.1);
  border-color: rgba(113, 89, 193, 0.3);
  position: relative;
}

.telegram-btn {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.3);
  position: relative;
}

@media (hover: hover) {
  .telegram-btn:hover {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.4);
  }
  
  .eth-donate-btn:hover {
    background: rgba(113, 89, 193, 0.2);
    border-color: rgba(113, 89, 193, 0.4);
  }
  
  /* Monochrome hover effect for all button icons */
  .magnetic-btn:hover i {
    color: rgba(255, 255, 255, 1) !important;
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.3) drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
  }
}

/* Copy notification */
.copy-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.9rem;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.copy-notification.show {
  opacity: 1;
}

.magnetic-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 44px; /* Ensures touchable area meets accessibility standards */
}

@media (hover: hover) {
  .magnetic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }
  
  .magnetic-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      45deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
  }
  
  .magnetic-btn:hover::before {
    opacity: 1;
  }
  
  .magnetic-btn::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.5),
      transparent
    );
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scaleX(0.8);
  }
  
  .magnetic-btn:hover::after {
    opacity: 0.8;
    transform: scaleX(1);
  }
}

@media (hover: none) {
  /* Better touch experience on mobile */
  .magnetic-btn {
    transition: background-color 0.3s, transform 0.2s;
  }
  
  .magnetic-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.15);
  }
}

/* Button ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Social Icons */
.social-icons {
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: flex;
  gap: 20px;
  z-index: 3;
}

.social-icon {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  transform-origin: center;
}

@media (hover: hover) {
  .social-icon:hover {
    color: white;
    transform: scale(1.2) rotate(5deg);
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Noise Effect */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3C/rect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.02;
  z-index: 100;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 20px;
  }
  .distort-text {
    letter-spacing: -1px;
  }
  .hero-subtitle {
    margin-bottom: 20px;
  }
  .btn-wrapper {
    margin-top: 30px;
    flex-direction: column;
    width: 100%;
    gap: 10px; /* Reduced gap for better spacing on mobile */
  }
  .magnetic-btn {
    width: 100%;
    padding: 12px 15px;
    justify-content: center;
    font-size: 0.9rem;
    min-width: unset; /* Remove any minimum width constraints */
    overflow: hidden; /* Ensure text doesn't overflow */
    text-overflow: ellipsis; /* Add ellipsis for any text that might overflow */
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 30px;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .social-icons {
    position: relative;
    left: 0;
    bottom: 0;
    margin-top: 60px;
  }
  .btn-wrapper {
    flex-wrap: wrap;
  }
  .magnetic-btn {
    min-width: 135px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .container {
    padding: 40px 60px;
  }
  .btn-wrapper {
    flex-wrap: wrap;
  }
}

@media (min-width: 1201px) {
  .container {
    padding: 40px 80px;
  }
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #050505;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.1s linear 0.8s;
  padding-bottom: 15vh;
  transform: scale(1);
  filter: blur(0);
}

.loading.dramatic-exit {
  transform: scale(1.05);
  filter: blur(10px);
}

body.transition-active {
  overflow: hidden;
  scrollbar-width: none;
}

body.transition-active::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Name text reveal animation */
.name-text.revealed {
  animation: glow-pulse 3s ease-out forwards;
}

@keyframes glow-pulse {
  0% { text-shadow: 0 0 0px rgba(255, 255, 255, 0); }
  30% { text-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.5); }
  70% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 255, 255, 0.4); }
  100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
}

/* Enhanced animations */
@keyframes fadeUpEnhanced {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(8px);
  }
  60% {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.02);
    filter: blur(0);
  }
  80% {
    transform: translateY(2px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideInRightEnhanced {
  0% {
    opacity: 0;
    transform: translateX(40px);
    filter: blur(8px);
  }
  60% {
    opacity: 0.9;
    transform: translateX(-5px);
    filter: blur(0);
  }
  80% {
    transform: translateX(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes popInElastic {
  0% { opacity: 0; transform: scale(0.8); }
  40% { opacity: 0.7; transform: scale(1.08); }
  60% { opacity: 1; transform: scale(0.96); }
  80% { transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* Particle animation */
@keyframes particle-expand {
  0% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(2.5); opacity: 1; }
  100% { transform: scale(1); opacity: 0.6; }
}

/* Cursor Coordinates */
.cursor-coordinates {
  position: fixed;
  bottom: 15px;
  right: 15px;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 5px 8px;
  border-radius: 4px;
  z-index: 1000;
  pointer-events: none;
  font-family: monospace;
  letter-spacing: 0.5px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

@media (hover: hover) {
  .cursor-coordinates:hover {
    opacity: 1;
  }
}

/* Binary Loading Animation */
.binary-loading-container {
  display: flex;
  gap: clamp(10px, 4vw, 30px);
  margin-bottom: 40px;
}

.binary-letter {
  display: grid;
  grid-template-columns: repeat(5, clamp(8px, 2vw, 12px));
  grid-template-rows: repeat(7, clamp(8px, 2vw, 12px));
  gap: clamp(2px, 1vw, 4px);
}

.binary-dot {
  width: clamp(8px, 2vw, 12px);
  height: clamp(8px, 2vw, 12px);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.binary-dot.active {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.binary-dot.flicker {
  animation: binaryFlicker 1.5s infinite;
}

@keyframes binaryFlicker {
  0%, 100% { opacity: 1; background-color: rgba(255, 255, 255, 0.9); }
  25% { opacity: 0.3; background-color: rgba(255, 255, 255, 0.3); }
  75% { opacity: 0.6; background-color: rgba(255, 255, 255, 0.6); }
}

.binary-code-line {
  font-family: monospace;
  font-size: clamp(10px, 2vw, 12px);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  text-align: center;
  margin-top: 15px;
  opacity: 0;
  animation: fadeIn 2s forwards;
  animation-delay: 1.5s;
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .loading, .cursor-dot, .noise, .cursor-coordinates, .minimalist-background {
    display: none !important;
  }
  .container {
    padding: 1cm;
  }
  * {
    color: black !important;
  }
  a {
    text-decoration: underline;
  }
}
