/*
 * CodeMiner Base Styles
 * CSS Variables, Reset, Typography, and Utility Components
 */

/* ===================================
   CSS VARIABLES & DESIGN SYSTEM
   =================================== */
:root {
  /* Primary Colors */
  --primary-dark: #0a1628;
  --primary-light: #1e293b;

  /* Accent Colors */
  --accent-orange: #a5cc43;
  --accent-amber: #f59e0b;
  --accent-cyan: #00d4ff;

  /* Neutral Colors */
  --neutral-dark: #334155;
  --neutral-medium: #64748b;

  /* Text Colors */
  --text-white: #ffffff;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Typography */
  --font-heading: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;

  /* Transitions */
  --transition: 0.3s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* ===================================
   SCROLL PROGRESS INDICATOR
   =================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #a5cc43;
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(165, 204, 67, 0.5);
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(10, 22, 40, 0.98);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.3s ease-out;
  pointer-events: all;
}

.toast.toast-success {
  border-color: #10b981;
}

.toast.toast-error {
  border-color: #ef4444;
}

.toast.toast-info {
  border-color: var(--accent-cyan);
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-white);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--text-white);
}

.toast.removing {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ===================================
   VIDEO LOADING SKELETONS
   =================================== */
.video-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.9),
    rgba(10, 22, 40, 0.95)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.skeleton-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: shimmer 2s infinite;
}

.skeleton-play-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.2);
  border: 2px solid rgba(255, 107, 53, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-orange);
  animation: pulse 2s infinite;
}

.gallery-video-skeleton {
  border-radius: var(--radius-lg);
}

/* ===================================
   ENHANCED FOCUS STATES
   =================================== */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.nav-link:focus-visible,
.cta-button:focus-visible,
.submit-button:focus-visible,
.lang-toggle:focus-visible,
.lang-option:focus-visible,
.social-icon:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.3);
}

.hamburger:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow:
    0 0 0 3px rgba(255, 107, 53, 0.2),
    0 0 15px rgba(255, 107, 53, 0.3);
}

/* Skip link enhancement */
.skip-to-main:focus {
  top: 10px;
  left: 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
  animation: fadeIn 0.2s ease-out;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

/* Skip to Main Content (Accessibility) */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent-orange);
  color: var(--text-white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-white);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-orange);
}

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

/* Section Title */
.section-title {
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.section-title.center {
  display: block;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-sm);
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}
