/**
 * Enhanced styles for Crypto Ninja Trades website
 * Modern 2025 design with cutting-edge effects
 */

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    background: rgba(55, 95, 124, 0.2);
    border-radius: 15px;
    padding: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
    overflow: hidden;
    width: 60px;
    height: 28px;
    z-index: 20;
}

.theme-toggle-switch {
    width: 20px;
    height: 20px;
    background: #E0E0E0;
    border-radius: 50%;
    position: absolute;
    left: 4px;
    top: 4px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.theme-toggle.active .theme-toggle-switch {
    left: calc(100% - 24px);
    background: #F5F5F5;
}

.theme-toggle-label {
    display: flex;
    width: 58px;
    padding: 4px 6px;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
}

.theme-mode-dark,
.theme-mode-light {
    z-index: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 0 4px;
}

.theme-toggle.active .theme-mode-light,
.theme-toggle:not(.active) .theme-mode-dark {
    opacity: 1;
}

/* Adding an indicator light */
.theme-toggle::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #375F7C;
    opacity: 0.5;
    box-shadow: 0 0 3px #375F7C;
    transition: all 0.3s ease;
}

.theme-toggle.active::after {
    background: #567890;
    opacity: 1;
    box-shadow: 0 0 5px #567890;
}

/* Animation States */
body.animations-basic .advanced-effect,
body.animations-basic .floating-elements,
body.animations-basic .section-highlight,
body.animations-basic .shine-effect {
    display: none !important;
}

body.animations-advanced .liquid-button {
    animation: liquid-button-animation 8s ease-in-out infinite;
    background-size: 400% 400%;
}

body.animations-advanced .neon-button {
    animation: neon-glow 1.5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px rgba(55, 95, 124, 0.8), 0 0 20px rgba(55, 95, 124, 0.5), 0 0 30px rgba(55, 95, 124, 0.3);
}

/* ===== LOADING SCREEN ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.loader-content {
  text-align: center;
}

.loader-icon {
  margin-bottom: 20px;
}

.ninja-star-loader {
  filter: drop-shadow(0 0 10px rgba(55, 95, 124, 0.7));
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #567890;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
  position: relative;
}

.loader-text::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: #4A6378;
  border-radius: 2px;
}

.loader-subtitle {
  color: rgba(224, 224, 224, 0.6);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Character animation */
.char {
  display: inline-block;
}

/* ===== ENHANCED CURSOR ===== */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 120, 144, 0.7) 0%, rgba(86, 120, 144, 0) 70%);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0.8;
}

/* ===== DECORATIVE ELEMENTS ===== */
.ninja-star {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0.2;
  z-index: 1;
}

.ninja-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(86, 120, 144, 0.2), transparent);
  height: 1px;
  width: 100%;
  z-index: 1;
}

/* ===== ENHANCED HERO SECTION ===== */
.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(55, 95, 124, 0.1) 0%, rgba(10, 10, 10, 0) 50%);
  z-index: 1;
}

.hero-logo {
  filter: drop-shadow(0 0 15px rgba(86, 120, 144, 0.5));
  max-width: 250px;
  margin: 0 auto 2rem;
}

.hero-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(10, 10, 10, 0.97) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, 0.97) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  opacity: 0.3;
  z-index: 0;
}

/* ===== ENHANCED TEXT EFFECTS ===== */
.gradient-text {
  background: linear-gradient(90deg, #375F7C, #4A6378);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
}

.gradient-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(90deg, #375F7C, #4A6378);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: blur(8px);
  opacity: 0.7;
}

.cyber-box {
  position: relative;
  border: 1px solid rgba(55, 95, 124, 0.3);
  border-radius: 4px;
  padding: 1.5rem;
  background: rgba(10, 10, 10, 0.8);
  z-index: 1;
  overflow: hidden;
}

.cyber-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(55, 95, 124, 0.2) 0%, rgba(10, 10, 10, 0) 50%);
  z-index: -1;
}

.cyber-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(55, 95, 124, 0.1) 0%, rgba(10, 10, 10, 0) 30%);
  z-index: -1;
}

/* ===== ENHANCED CARD EFFECTS ===== */
.glass-card {
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.4s ease;
}

.glass-card:hover {
  border-color: rgba(55, 95, 124, 0.5);
  box-shadow: 0 0 20px rgba(55, 95, 124, 0.2);
  transform: translateY(-5px);
}

/* ===== PRICING TABLE ENHANCEMENTS ===== */
.pricing-badge {
  position: absolute;
  top: 0;
  right: 20px;
  background: #567890;
  color: #0A0A0A;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.plan-card:hover .pricing-badge {
  transform: translateY(0);
  opacity: 1;
}

.price-highlight {
  position: relative;
  display: inline-block;
}

.price-highlight::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: rgba(55, 95, 124, 0.2);
  z-index: -1;
  transform: skewX(-15deg);
}

/* ===== BUTTON ENHANCEMENTS ===== */
.neon-button {
  position: relative;
  padding: 12px 24px;
  background: transparent;
  color: #567890;
  border: 2px solid #567890;
  border-radius: 4px;
  font-weight: bold;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1;
}

.neon-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #567890;
  z-index: -1;
  transition: width 0.3s ease;
}

.neon-button:hover {
  color: #0A0A0A;
  box-shadow: 0 0 15px rgba(55, 95, 124, 0.5);
}

.neon-button:hover::before {
  width: 100%;
}

/* Liquid button effect */
.liquid-button {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.liquid-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: rgba(55, 95, 124, 0.8);
  border-radius: 50%;
  transform: translate(-150%, -150%) scale(0);
  transition: transform 0.5s ease;
  z-index: -1;
}

.liquid-button:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

/* ===== MODAL ENHANCEMENTS ===== */
.cyber-modal {
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(55, 95, 124, 0.3);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(55, 95, 124, 0.3);
  backdrop-filter: blur(10px);
}

.cyber-modal::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, #375F7C, #4A6378);
  border-radius: 9px;
  z-index: -1;
  opacity: 0.3;
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  .hero-logo {
    max-width: 180px;
  }
  
  .ninja-star {
    width: 20px;
    height: 20px;
  }
}

/* ===== DARK MODE OPTIMIZATIONS ===== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* ===== HEADER SCROLL ANIMATIONS ===== */
header {
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.3s;
}

header.header-hidden {
  transform: translateY(-100%);
}

/* Smoother scrolling for all devices */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ===== HEADER LOGO FIX ===== */
.logo-link {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  transition: none !important;
}

.logo-link:hover,
.logo-link:hover img,
.logo-link:hover div,
.logo-link:hover h1,
.logo-link:hover p,
.logo-link:hover span {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* ===== LIGHT/DARK THEME STYLES ===== */
/* Light theme (default is dark) */
body.light-theme {
  background-color: #f0f4f8;
  color: #2c3e50;
}

/* Header - light theme */
body.light-theme header {
  background-color: rgba(240, 244, 248, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme header a {
  color: #2c3e50;
}

body.light-theme header a:hover {
  color: #375F7C;
}

/* Background elements - light theme */
body.light-theme .bg-ninja-black {
  background-color: #f0f4f8;
}

body.light-theme .bg-ninja-dark {
  background-color: #e5e9f0;
}

body.light-theme .text-ninja-light {
  color: #2c3e50;
}

/* Cards and boxes - light theme */
body.light-theme .cyber-box,
body.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .glass-card {
  backdrop-filter: blur(10px);
}

body.light-theme .cyber-box::before {
  background: linear-gradient(135deg, rgba(55, 95, 124, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
}

/* Card borders - light theme */
body.light-theme .border-ninja-gray/30 {
  border-color: rgba(0, 0, 0, 0.1);
}

/* Footer - light theme */
body.light-theme footer {
  background-color: #e5e9f0;
  color: #2c3e50;
}

/* Mobile menu - light theme */
body.light-theme #mobile-menu {
  background-color: rgba(240, 244, 248, 0.95);
}

/* Gradient backgrounds - light theme */
body.light-theme .ninja-gradient {
  background: linear-gradient(135deg, #f0f4f8 0%, #e5e9f0 100%);
}

/* Dark overlay gradient - light theme */
body.light-theme .bg-gradient-to-b.from-ninja-black\/60.to-ninja-black\/95 {
  background: linear-gradient(to bottom, rgba(240, 244, 248, 0.6), rgba(240, 244, 248, 0.95));
}

/* Grid pattern - light theme */
body.light-theme .hero-grid-pattern {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

/* Hero backdrop - light theme */
body.light-theme .hero-backdrop {
  background: radial-gradient(circle at 50% 50%, rgba(55, 95, 124, 0.05) 0%, rgba(240, 244, 248, 0) 50%);
}
