/* IT-Frey Website - Modern Dark Theme with Animations */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --green: #22c55e;
  --border: #27272a;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: #000 !important;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

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

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  background: rgba(10, 10, 15, 0.6) !important;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 200, 80, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 255, 100, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Terminal Card */
.terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 2rem 0;
  max-width: 600px;
  height: 280px;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for terminal */
.terminal-body::-webkit-scrollbar {
  width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
.terminal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.terminal-line {
  margin: 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-prompt {
  color: var(--green);
}

.terminal-command {
  color: var(--text-primary);
}

.terminal-output {
  color: var(--text-secondary);
}

/* Log colors */
.log-info { color: #60a5fa; }
.log-success { color: #22c55e; }
.log-warning { color: #eab308; }
.log-error { color: #ef4444; }
.log-time { color: #6b7280; }
.log-ip { color: #a78bfa; }
.log-path { color: #f472b6; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: var(--accent);
  animation: blink 1s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Features List */
.features {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.features h3 {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features ul {
  list-style: none;
}

.features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.features li::before {
  content: '✓';
  color: var(--green);
  font-weight: bold;
}

/* Software Section */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.software-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.software-card:hover {
  border-color: var(--accent);
}

.software-card h3 {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.software-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.software-tag {
  display: inline-block;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-family: var(--font-mono);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
}

.contact-value {
  font-size: 1.1rem;
}

.map-placeholder {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Footer */
footer {
  position: relative;
  background: rgba(15, 15, 20, 0.85) !important;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    padding: 0.5rem 0;
  }

  .hero {
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .terminal {
    margin-left: auto;
    margin-right: auto;
  }

  .btn-group {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .service-card, .software-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
  }

  .services-grid .service-card:nth-child(1) { animation-delay: 0.1s; }
  .services-grid .service-card:nth-child(2) { animation-delay: 0.2s; }
  .services-grid .service-card:nth-child(3) { animation-delay: 0.3s; }

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

/* Downloads Section */
.downloads-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.download-card:hover {
  border-color: var(--accent);
}

.download-icon {
  font-size: 2rem;
  min-width: 50px;
  text-align: center;
}

.download-info {
  flex: 1;
}

.download-info h3 {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.download-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.download-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.downloads-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1rem;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.cookie-content a {
  color: var(--accent);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Responsive Downloads */
@media (max-width: 768px) {
  .download-card {
    flex-direction: column;
    text-align: center;
  }
  
  .download-meta {
    justify-content: center;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==================== MATRIX RAIN FIXED BACKGROUND ==================== */
#matrix-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: #0a0a0f;
  pointer-events: none;
}

#particles {
  position: absolute;
  top: 0;
  left: 0;
}

/* Content sections with semi-transparent background - Matrix Rain visible */
main section {
  position: relative;
  background: rgba(10, 10, 15, 0.75) !important;
}

main section:nth-child(odd) {
  background: rgba(15, 15, 20, 0.8) !important;
}

/* ==================== LIVE STATUS BADGE ==================== */
.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: pulse 2s infinite;
}

.status-badge.online .status-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.status-badge.offline .status-dot {
  background: #ef4444;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ==================== GLOWING BUTTON ==================== */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* ==================== TERMINAL STYLES ==================== */
.terminal-green {
  color: var(--green);
}

.terminal-output {
  white-space: pre-wrap;
  color: var(--text-secondary);
  margin: 0.25rem 0 0.5rem 1.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ==================== KI SECTION ==================== */
.ki-section {
  background: transparent !important;
}

.ki-content {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.ki-intro {
  margin-bottom: 2rem;
}

.ki-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
}

/* Video */
.ki-video {
  margin: 2.5rem 0;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-caption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Timeline */
.ki-timeline {
  margin: 3rem 0;
}

.ki-timeline h3 {
  margin-bottom: 2rem;
  color: var(--green);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s;
}

.timeline-item:hover {
  border-color: var(--green);
  transform: translateX(5px);
}

.timeline-item.highlight {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  min-width: 70px;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.timeline-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.text-green {
  color: var(--green);
}

.text-red {
  color: #ef4444;
}

/* Fazit */
.ki-fazit {
  background: var(--bg-card);
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 2rem;
}

.ki-fazit h3 {
  color: var(--green);
  margin-bottom: 1rem;
}

.ki-fazit p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.ki-source {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .timeline-year {
    font-size: 1.2rem;
  }
}

/* ==================== TOOLS SECTION - KACHELN ==================== */
.tools-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.tools-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tool-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-tile:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tile-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.tool-tile h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.tile-content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tile-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
}

.tile-input:focus {
  outline: none;
  border-color: var(--accent);
}

.tile-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tile-options label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.tile-options input[type="checkbox"] {
  accent-color: var(--accent);
}

.tile-btn {
  padding: 0.6rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.75rem;
}

.tile-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tile-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.tile-btn.primary:hover {
  background: var(--accent-hover);
}

.tile-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

/* IP Display */
.ip-display {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ip-address {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

.ip-loading {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* QR Output */
.qr-output {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-output svg {
  max-width: 120px;
}

@media (max-width: 900px) {
  .tools-tiles {
    grid-template-columns: 1fr;
  }
}

/* ==================== 3D TILT CARDS ==================== */
.tilt-card {
  transition: transform 0.1s ease-out, box-shadow 0.3s;
  transform-style: preserve-3d;
}

.tilt-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ==================== SERVICE HOURS ==================== */
.service-hours {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.hours-display {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.availability {
  font-size: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.status-online {
  color: var(--green);
}

.status-offline {
  color: #ef4444;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .status-badge {
    display: none;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-options {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
