/* DEVSFLOW - Unified Dark Theme */
/* This file replaces base.css and theme.css with a consistent dark theme */

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

/* ===== Dark Theme Variables ===== */
:root {
  /* Primary Colors */
  --black: #000000;
  --dark-gray: #1a1a1a;
  --medium-gray: #2a2a2a;
  --light-gray: #404040;
  --text-gray: #a0a0a0;
  --white: #ffffff;
  
  /* Accent Colors */
  --gold: #f4d03f;
  --gold-muted: #e8c547;
  --gold-dark: #d4ac0d;
  
  /* Status Colors */
  --success: #27ae60;
  --warning: #f39c12;
  --error: #e74c3c;
  
  /* Legacy Variable Mapping for Compatibility */
  --primary-color: var(--gold);
  --primary-color-dark: var(--dark-gray);
  --primary-accent: var(--gold-muted);
  --secondary-color: var(--medium-gray);
  --text-color: var(--white);
  --text-color-light: var(--text-gray);
  --text-color-dark: var(--white);
  --text-color-muted: var(--text-gray);
  --bg-white: var(--dark-gray);
  --bg-light: var(--medium-gray);
  --bg-lighter: var(--light-gray);
  --bg-dark: var(--black);
  --border-light: var(--light-gray);
  --border-lighter: var(--medium-gray);
  
  /* Modal-specific variables */
  --bg-color: var(--dark-gray);
  --card-bg: var(--medium-gray);
  --border-color: var(--light-gray);
  --hover-bg: var(--medium-gray);
  
  /* Typography */
  --font-family: "Inter", "Montserrat", system-ui, -apple-system, sans-serif;
  --font-heading: "Montserrat", system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(244, 208, 63, 0.2);
  
  /* Gradients */
  --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-muted) 100%);
  --gradient-dark: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
  --gradient-bg: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
}

/* ===== Base Styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1rem;
  letter-spacing: -0.01em;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

::-webkit-scrollbar-track {
  background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--gold-muted) 0%, var(--gold) 100%);
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
header,
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-gray);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.brand-container:hover {
  transform: translateY(-1px);
}

.logo {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 1px 3px rgba(244, 208, 63, 0.3));
  transition: all 0.3s ease;
}

.logo:hover {
  filter: drop-shadow(0 4px 8px rgba(244, 208, 63, 0.5));
  transform: scale(1.05);
}

header .brand {
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--gradient-gold);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shimmer 3s ease-in-out infinite;
}

@keyframes brand-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Navigation */
header nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 12px;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 5px;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

header nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

header nav a:hover {
  background: rgba(244, 208, 63, 0.1);
  border-color: rgba(244, 208, 63, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--gold);
}

header nav a:hover::before {
  width: 80%;
}

.nav-menu {
  display: flex;
}

/* Footer */
footer,
.footer-modern {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
  border-top: 1px solid var(--light-gray);
  margin-top: var(--space-2xl);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 700;
}

.logo-icon {
  color: var(--gold);
  font-size: 1.2rem;
}

.brand-name {
  background: var(--gradient-gold);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--text-gray);
  line-height: 1.4;
  max-width: 280px;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--light-gray);
  border-radius: 50%;
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.7rem;
}

.social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.column-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.footer-nav a:hover {
  color: var(--gold);
  transform: translateX(4px);
}

.footer-cta-text {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-gold);
  color: var(--black);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: fit-content;
}

.footer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.footer-bottom {
  border-top: 1px solid var(--light-gray);
  padding-top: var(--space-sm);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.copyright {
  color: var(--text-gray);
  font-size: 0.85rem;
}

.footer-badges {
  display: flex;
  gap: var(--space-sm);
}

.footer-badges .badge {
  background: rgba(244, 208, 63, 0.1);
  color: var(--gold);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(244, 208, 63, 0.2);
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  background-size: 200% 100%;
  animation: footer-glow 4s ease-in-out infinite;
}

@keyframes footer-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

footer a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
}

footer a:hover {
  color: var(--gold);
  background: rgba(244, 208, 63, 0.1);
  border-color: rgba(244, 208, 63, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Main Content */
main {
  flex: 1;
  overflow-y: auto;
  padding: 50px 0 0;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

main.fade-out {
  opacity: 0;
}

/* ===== Hamburger Menu ===== */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: rgba(244, 208, 63, 0.1);
  border: 1px solid rgba(244, 208, 63, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger-menu:hover {
  background: rgba(244, 208, 63, 0.2);
  border-color: rgba(244, 208, 63, 0.4);
  transform: scale(1.05);
}

.hamburger-menu span {
  width: 22px;
  height: 2px;
  background: var(--white);
  display: block;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: var(--gold);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background: var(--gold);
}

/* ===== Mobile Navigation ===== */
@media (max-width: 860px) {
  .hamburger-menu {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
    opacity: 0;
    transform: translateY(-10px);
  }
  
  .nav-menu.active {
    max-height: 400px;
    padding: 20px 0;
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-menu a {
    width: 100%;
    padding: 18px 24px;
    margin: 0;
    text-align: left;
    border-bottom: 1px solid rgba(244, 208, 63, 0.05);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .nav-menu a:last-child {
    border-bottom: none;
  }
  
  .nav-menu a:hover {
    background: rgba(244, 208, 63, 0.15);
    color: var(--gold);
    padding-left: 32px;
    transform: translateX(4px);
  }
  
  .nav-menu a::after {
    content: '→';
    position: absolute;
    right: 24px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--gold);
  }
  
  .nav-menu a:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-menu a::before {
    display: none;
  }
}

@media (min-width: 861px) {
  .hamburger-menu {
    display: none !important;
  }
  
  .nav-menu {
    display: flex !important;
    position: static !important;
    max-height: none !important;
    flex-direction: row !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  
  .nav-menu a {
    width: auto !important;
    padding: 8px 12px !important;
    margin-left: 16px !important;
    border-bottom: none !important;
    display: inline-block !important;
    font-size: 0.81rem !important;
  }
  
  .nav-menu a::before {
    display: block;
  }
}

/* ===== Touch Device Optimization ===== */
@media (pointer: coarse) {
  button, .btn, a {
    min-height: 44px;
    min-width: 44px;
  }
  
  header nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hamburger-menu {
    min-height: 48px;
    min-width: 48px;
  }
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  
  * {
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: rgba(244, 208, 63, 0.2);
  }
  
  html, body {
    overflow-x: hidden;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  
  img {
    image-rendering: optimizeQuality;
    -webkit-image-rendering: optimizeQuality;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-badges {
    justify-content: center;
    flex-wrap: wrap;
  }
}