/* ===================================
   RAAGIKAASA.CSS - Kaasaegne kujundus
   =================================== */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(20, 20, 20, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  --accent-primary: #00ff88;
  --accent-secondary: #0070f3;
  --accent-tertiary: #8b5cf6;
  --accent-orange: #ff9800;
  
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 40px rgba(0, 255, 136, 0.3);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Body styling */
body.dark-theme {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated background */
body.dark-theme::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(0, 112, 243, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  animation: backgroundPulse 30s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes backgroundPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.4; }
  33% { transform: scale(1.1) rotate(120deg); opacity: 0.3; }
  66% { transform: scale(0.9) rotate(240deg); opacity: 0.5; }
}

/* Modern Navbar */
.navbar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 15px 30px;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: calc(100vw - 40px);
}

.navbar:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 255, 255, 0.15);
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-links li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.nav-links li a:hover::before {
  left: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text-primary);
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* Language buttons */
#language-buttons {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  z-index: 1001;
}

#language-buttons button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#language-buttons button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

#language-buttons img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  position: relative;
}

/* Hero title */
h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, 
    var(--accent-primary) 0%, 
    var(--accent-secondary) 50%, 
    var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: titleAnimation 3s ease-in-out infinite;
  position: relative;
}

@keyframes titleAnimation {
  0%, 100% { 
    filter: brightness(1) drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
  }
  50% { 
    filter: brightness(1.2) drop-shadow(0 0 40px rgba(0, 112, 243, 0.8));
  }
}

h1::after {
  content: '💬';
  position: absolute;
  top: -20px;
  right: -50px;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Intro paragraph */
main > p {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.3rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
}

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

/* Topic buttons container */
.topic-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

/* Topic button cards */
.topic-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 180px;
}

/* Topic button gradient borders */
.topic-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.topic-btn:hover::before {
  transform: scaleX(1);
}

/* Topic button colors */
.topic-btn:nth-child(1) {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, var(--bg-card) 100%);
  color: var(--accent-orange);
}

.topic-btn:nth-child(2) {
  background: linear-gradient(135deg, rgba(0, 112, 243, 0.1) 0%, var(--bg-card) 100%);
  color: var(--accent-secondary);
}

.topic-btn:nth-child(3) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, var(--bg-card) 100%);
  color: var(--accent-tertiary);
}

.topic-btn:nth-child(4) {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, var(--bg-card) 100%);
  color: var(--accent-primary);
}

/* Topic button hover effects */
.topic-btn:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 255, 136, 0.2);
  border-color: currentColor;
}

/* Topic button icons */
.topic-btn::after {
  content: '';
  position: absolute;
  font-size: 5rem;
  opacity: 0.1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  transition: all 0.4s ease;
}

.topic-btn:nth-child(1)::after { content: '🍳'; }
.topic-btn:nth-child(2)::after { content: '🖥️'; }
.topic-btn:nth-child(3)::after { content: '🎮'; }
.topic-btn:nth-child(4)::after { content: '🌿'; }

.topic-btn:hover::after {
  opacity: 0.2;
  transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
}

/* Disqus container */
.disqus-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  margin-top: 4rem;
  border: 1px solid var(--border-glass);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

/* Decorative elements */
.disqus-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
  pointer-events: none;
}

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

/* Disqus thread styling */
#disqus_thread {
  position: relative;
  z-index: 1;
}

/* Active topic indicator */
.topic-btn.active {
  background: linear-gradient(135deg, currentColor, transparent);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  margin-left: 1rem;
  border: 3px solid var(--border-glass);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    padding: 15px 20px;
    border-radius: 20px;
    flex-direction: column;
    gap: 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-links li a {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  main {
    padding: 7rem 1rem 3rem;
  }

  h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
  }

  h1::after {
    display: none;
  }

  main > p {
    font-size: 1.1rem;
  }

  .topic-buttons {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .topic-btn {
    padding: 2rem;
    min-height: 140px;
  }

  .disqus-box {
    padding: 2rem 1.5rem;
    margin-top: 3rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .topic-btn {
    padding: 1.5rem;
    font-size: 1.1rem;
    min-height: 120px;
  }

  .disqus-box {
    padding: 1.5rem 1rem;
  }
}

/* Special hover effect for comments section */
.disqus-box:hover {
  box-shadow: 
    var(--shadow-card),
    0 0 80px rgba(0, 255, 136, 0.1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Hide Google Translate */
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate {
  display: none !important;
  height: 0 !important;
}

body {
  top: 0 !important;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  body::before,
  .navbar,
  #language-buttons,
  .topic-buttons {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .disqus-box {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }
}