/* ===== CSS VARIABLES & THEME SYSTEM ===== */
:root {
  /* Dark Theme */
  --bg-dark: #0a0a0a;
  --fg-dark: #ffffff;
  --card-bg-dark: rgba(20, 20, 20, 0.95);
  --accent-dark: rgba(255, 255, 255, 0.1);
  --nav-bg-dark: rgba(10, 10, 10, 0.95);
  
  /* Light Theme */
  --bg-light: #ffffff;
  --fg-light: #000000;
  --card-bg-light: rgba(255, 255, 255, 0.95);
  --accent-light: rgba(0, 0, 0, 0.05);
  --nav-bg-light: rgba(255, 255, 255, 0.95);
  
  /* Shared Variables */
  --border-radius: 16px;
  --transition: all 0.3s ease;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, #000000 0%, #333333 100%);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== THEME STYLES ===== */
body.dark {
  background: var(--bg-dark);
  color: var(--fg-dark);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

body.light {
  background: var(--bg-light);
  color: var(--fg-light);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* ===== NAVIGATION ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--nav-bg-dark);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

body.light .navbar {
  background: var(--nav-bg-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-brand h1 {
  font-family: 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: inherit;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.light .nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

body.light .nav-link.active {
  background: rgba(0, 0, 0, 0.1);
}

.nav-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  padding: 0.75rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

body.light .nav-toggle {
  background: rgba(0, 0, 0, 0.05);
}

body.light .nav-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ===== HERO SECTION ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  margin-bottom: 4rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.8;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

body.light .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  width: 100%;
}

.feature-card {
  background: var(--card-bg-dark);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

body.light .feature-card {
  background: var(--card-bg-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-card p {
  opacity: 0.8;
  line-height: 1.6;
}

/* ===== TOOL PAGES ===== */
.tool-page {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tool-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tool-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tool-header p {
  font-size: 1.125rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

.tool-container {
  display: flex;
  justify-content: center;
}

.tool-card {
  background: var(--card-bg-dark);
  padding: 3rem;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 100%;
}

body.light .tool-card {
  background: var(--card-bg-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Tool Card speziell für Converter */
.tool-card.converter-card {
  display: block;
}

.tool-card.converter-card .converter-interface {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== INPUT GROUPS ===== */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

body.light .input-group input,
body.light .input-group select {
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.05);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

body.light .input-group input:focus,
body.light .input-group select:focus {
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== PASSWORD GENERATOR OPTIONS ===== */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.special-options {
  margin: 1rem 0;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-item input[type="checkbox"] {
  width: auto;
  transform: scale(1.2);
}

.option-item label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

/* Range Input Styling */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

body.light input[type="range"] {
  background: rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border: none;
}

#length-value {
  font-weight: 600;
  color: #4dff4d;
}

/* ===== RESULT CONTAINERS ===== */
.result-container {
  margin-top: 2rem;
  text-align: center;
}

.result-label {
  margin-bottom: 1rem;
  font-weight: 600;
  opacity: 0.8;
}

.password-output,
.number-output {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light .password-output,
body.light .number-output {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.copy-btn {
  width: 100%;
}

/* ===== MEDIA CONVERTER SPECIFIC ===== */
.converter-interface {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.file-upload {
  margin-bottom: 0;
}

.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.05);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body.light .upload-area {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.02);
}

.upload-area:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

body.light .upload-area:hover {
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.05);
}

.upload-area.dragover {
  border-color: #4dff4d;
  background: rgba(77, 255, 77, 0.1);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-area p {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.file-types {
  font-size: 0.875rem;
  opacity: 0.7;
}

.format-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.format-selector label {
  font-weight: 600;
}

.format-selector select {
  width: 100%;
}

.convert-btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Result Area */
.result-area {
  margin-top: 2rem;
  text-align: center;
}

.preview-container {
  margin: 1rem 0;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

body.light .preview-container img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== PASSWORD STRENGTH ===== */
.strength-display {
  margin: 2rem 0;
}

.strength-meter {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}

body.light .strength-meter {
  background: rgba(0, 0, 0, 0.1);
}

.strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.strength-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#strength-score {
  font-weight: 600;
  font-size: 1.125rem;
}

.feedback-container {
  margin-top: 2rem;
}

.feedback-container h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

#password-feedback {
  list-style: none;
  text-align: left;
}

#password-feedback li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

#password-feedback li:before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: #ff4444;
}

/* ===== DOWNLOAD BUTTON ===== */
.download-btn {
  display: inline-flex;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #000000 0%, #333333 50%, #666666 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 1rem 0;
}

body.light .download-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #e0e0e0 100%);
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.light .download-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-page {
    padding: 1rem;
  }
  
  .tool-card {
    padding: 2rem;
  }
  
  .range-inputs {
    grid-template-columns: 1fr;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-links {
    flex-wrap: wrap;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .tool-header h1 {
    font-size: 2rem;
  }
  
  .tool-card {
    padding: 1.5rem;
  }
  
  .upload-area {
    padding: 1.5rem 1rem;
  }
}