:root {
  --primary: #1e88e5;
  --primary-dark: #1565c0;
  --background: #0a0e17;
  --card-bg: rgba(10, 14, 23, 0.92);
  --text-primary: #e2e8f0;
  --text-secondary: #8a9bb0;
}

html {
  scroll-behavior: smooth;
}

        
        /* Farbcodierung basierend auf dem Log-Level */
        .log-info {
          color: #d1d5db;  /* Standard-Grau */
          }
          
        .log-warning{  
          color: #fcd34d;  /* Gelb/Orange für Warnungen */
          }
          
          .log-error{ 
          color: #fca5a5; 
          } 


/* Dashboard Grid - Mobile First Approach */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: Single column */
  gap: 15px; /* Smaller gap on mobile */
  margin-top: 20px;
  padding: 0 10px; /* Add padding for mobile - Beibehalten */
  justify-content: center; /* Zentriert die Gitterspuren innerhalb des Containers */
}

/* Dashboard Cards - Mobile Optimized */
.dashboard-card {
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1.5rem; /* Reduced padding for mobile */
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
  box-sizing: border-box;
}

.dashboard-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.dashboard-card h2 {
  color: #00ffcc;
  margin-top: 0;
  margin-bottom: 1rem; /* Reduced margin for mobile */
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.3rem; /* Smaller font on mobile */
  border-bottom: 2px solid #00ffcc;
  padding-bottom: 0.5rem; /* Reduced padding for mobile */
}

.dashboard-card p {
  color: #e0e0e0;
  line-height: 1.5; /* Tighter line height for mobile */
  margin-bottom: 12px;
  flex-grow: 1;
  font-size: 0.9rem; /* Smaller text on mobile */
}

.dashboard-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.dashboard-card li {
  margin-bottom: 6px;
  color: #ccc;
  font-size: 0.9rem;
}

.dashboard-card .btn {
  display: block;
  width: 100%; /* Full width on mobile */
  margin: 15px 0 0 0; /* Adjusted margins */
  padding: 12px 20px;
  background-color: #00ffcc;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.dashboard-card .btn:hover {
  background-color: #00e6b8;
  transform: translateY(-2px);
}

/* Antenna Control - Mobile Optimized */
.antenna-control-buttons {
  display: flex;
  flex-direction: column; /* Stack buttons vertically on mobile */
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 10px;
}

.antenna-control-buttons button {
  width: 100%;
  padding: 14px 15px; /* Larger touch target */
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  min-height: 44px; /* Minimum touch target size */
}

.antenna-control-buttons button:hover {
  background-color: #45a049;
  transform: translateY(-2px);
}

.antenna-control-buttons button.hb9cv {
  background-color: #f44336;
}

.antenna-control-buttons button.hb9cv:hover {
  background-color: #da190b;
}

.antennaStatus,
.currentAntennaDisplay {
  font-family: 'Share Tech Mono', monospace;
  color: #00ffcc;
  margin-top: 15px;
  font-size: 1rem; /* Adjusted for mobile */
  text-align: center;
}

.currentAntennaDisplay.loading {
  color: #ffcc00;
}

.currentAntennaDisplay.error {
  color: #f44336;
}

/* Status Items - Mobile Optimized */
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #333;
  flex-wrap: wrap; /* Allow wrapping on very small screens */
}

.status-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.status-label {
  color: #e0e0e0;
  font-weight: 400;
  font-size: 0.9rem;
}

.status-value {
  font-family: 'Share Tech Mono', monospace;
  font-weight: bold;
  font-size: 0.9rem;
}

.status-online { color: #4CAF50; }
.status-offline { color: #f44336; }
.status-info { color: #88ccff; }
.status-warning { color: #ffcc00; }

/* Log Area - Mobile Optimized */
.log-area {
  background-color: #1a1a1a;
  border: 1px solid #333;
  max-height: 200px; /* Reduced height for mobile */
  overflow-y: auto;
  padding: 12px; /* Reduced padding */
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem; /* Smaller font for mobile */
  color: #ddd;
  line-height: 1.4;
}

.log-area p {
  margin: 3px 0;
  white-space: pre-wrap;
}

.log-area p.log-info { color: #88ccff; }
.log-area p.log-warn { color: #ffcc00; }
.log-area p.log-error { color: #ff6666; }
.log-area p.log-success { color: #4CAF50; }

/* Quick Actions - Mobile Optimized */
.quick-action-list li {
  margin-bottom: 10px;
}

.quick-action-list .btn {
  background-color: #444;
  color: #00ffcc;
  border: 1px solid #00ffcc;
  width: 100%;
  padding: 12px;
  min-height: 44px;
}

.quick-action-list .btn:hover {
  background-color: #00ffcc;
  color: #1a1a1a;
}

/* Body and General Styles */
body {
  font-family: 'Roboto', sans-serif;
  background: var(--background) url('/static/images/background-main.webp') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  line-height: 1.6;
}

.tech-font {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: -0.5px;
}

/* Header - Mobile Optimized */
header {
  background-color: rgba(10, 14, 23, 0.85);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem; /* Reduced padding for mobile */
  gap: 1rem; /* Reduced gap */
  flex-wrap: wrap; /* Allow wrapping */
}

.nav-links {
  display: flex;
  gap: 0.5rem; /* Smaller gap on mobile */
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.6rem 1rem; /* Smaller padding */
  border-radius: 6px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem; /* Smaller font */
  min-height: 44px; /* Touch target */
  display: flex;
  align-items: center;
}

.nav-link:hover, .nav-link:focus {
  background-color: rgba(30, 136, 229, 0.2);
  color: var(--primary);
}

.avatar-link {
  display: flex;
  align-items: center;
}

.avatar-glow {
  box-shadow: 0 0 25px rgba(30, 136, 229, 0.7);
  transition: all 0.4s ease;
  border: 2px solid var(--primary);
  width: 50px; /* Smaller on mobile */
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-link:hover .avatar-glow {
  box-shadow: 0 0 35px rgba(30, 136, 229, 0.9);
  transform: scale(1.05);
}

/* Main Content - Mobile Optimized */
main {
  flex-grow: 1;
  max-width: 1400px;
  margin: 1.5rem auto; /* Centers the main element itself */
  padding: 0; /* Horizontal padding auf Mobilgeräten entfernt, nur die Grids bestimmen den Abstand */
  width: 100%;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 1.5rem; /* Reduced gap */
  padding: 0 0.5rem; /* Reduced padding - Beibehalten */
  justify-content: center; /* Zentriert die Gitterspuren innerhalb des Containers */
}

/* Cards - Mobile Optimized */
.card {
  background-size: cover;
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1.5rem; /* Reduced padding */
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card h2 {
  position: relative;
  padding-bottom: 0.5rem; /* Reduced padding */
  margin-bottom: 1rem; /* Reduced margin */
  font-size: 1.4rem; /* Smaller font */
  color: var(--primary);
}

.card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px; /* Shorter line */
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.4;
  font-size: 0.9rem; /* Smaller text */
}

/* Footer - Mobile Optimized */
footer {
  background-color: rgba(10, 14, 23, 0.85);
  text-align: center;
  padding: 2rem 1rem; /* Reduced padding */
  font-size: 0.9rem; /* Smaller font */
  color: var(--text-secondary);
  border-top: 1px solid rgba(30, 136, 229, 0.3);
  margin-top: 2rem; /* Reduced margin */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Reduced gap */
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem; /* Smaller gaps */
}

.footer-link {
  transition: color 0.2s;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-link:hover, .footer-link:focus {
  color: var(--primary);
}

/* Special Card Styles - Mobile Optimized */
.coming-soon-card {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 150px; /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
}

.coming-soon-card .overlay {
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.coming-soon-card h2,
.coming-soon-card p {
  margin: 0;
  padding: 0.25rem 1rem;
  text-align: center;
  font-size: 1rem; /* Adjusted for mobile */
}

.card-with-image {
  background-color: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-size: cover;
  background-position: center top;
}

.card-image {
  width: 100%;
  height: 150px; /* Reduced height for mobile */
  object-fit: cover;
  object-position: bottom;
  display: block;
  border-radius: 1rem;
  padding: 0.1rem;
  border: 1px solid rgba(30, 136, 229, 0.2);
  transition: all 0.3s ease;
}

/* Text Cards - Mobile Optimized */
.card-text {
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1.5rem; /* Reduced padding */
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-text h2 {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem; /* Smaller font */
  color: yellow;
}

.card-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px; /* Shorter line */
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.card-text p {
  color: lightgrey;
  line-height: 1.4;
  font-size: 0.9rem;
}

.card-text b,
.card-text em {
  color: cyan;
  line-height: 1.4;
}

.text-grid-container {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 1.5rem;
  padding: 0 0.5rem; /* Reduced padding - Beibehalten */
  justify-content: center; /* Zentriert die Gitterspuren innerhalb des Containers */
}

/* Title Cards - Mobile Optimized */
.card-title {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--card-bg);
  backdrop-filter: blur(0.1px);
  -webkit-backdrop-filter: blur(0.1px);
  border-radius: 1rem;
  padding: 1.5rem; /* Adjusted padding */
  transition: all 0.3s ease;
  border: 0.1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 2px rgba(0, 0, 0, 0.25);
  width: 100%; /* Full width on mobile */
  min-height: 60px; /* Minimum height */
  box-sizing: border-box;
  justify-self: center; /* Zentriert die Karte in ihrer Gitterzelle */
}

.card-title h2 {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: var(--primary);
  text-align: center;
}

.card-title2 {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--card-bg);
  backdrop-filter: blur(0.1px);
  -webkit-backdrop-filter: blur(0.1px);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 0.1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 2px rgba(0, 0, 0, 0.25);
  width: 100%; /* Full width on mobile */
  min-height: 40px;
  box-sizing: border-box;
  justify-self: center; /* Zentriert die Karte in ihrer Gitterzelle */
}

.card-title2 p {
  color: lightgrey;
  text-align: center;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* SDR Card */
.card-SDR {
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 136, 229, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-SDR h2 {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--primary);
}

.title-grid-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch; /* Full width on mobile */
}

/* Status Indicators - Mobile Optimized */
.status-container1 {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(200,200,200,0.7);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-indicator1,
.status-indicator1-off {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0; /* Prevent shrinking */
}

.status-indicator1 {
  background: #0f0;
  box-shadow: 0 0 10px #0f0;
}

.status-indicator1-off {
  background: #ff0000;
  box-shadow: 0 0 10px #ff0000;
}

.status-text1 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
}

/* Scroll behavior */
#WebSDR {
  scroll-margin-top: 80px;
}

.scroll-button {
  color: white;
}

/* Text field containers */
.textfeld-container {
  margin-bottom: 15px;
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 0 20px;
  }
  
  .antenna-control-buttons {
    flex-direction: row;
    gap: 15px;
  }
  
  .antenna-control-buttons button {
    flex: 1;
  }
  
  .dashboard-card {
    padding: 2rem;
  }
  
  .dashboard-card h2 {
    font-size: 1.5rem;
  }
  
  .dashboard-card .btn {
    width: fit-content;
    margin: 15px auto 0 auto;
  }
  
  .grid-container,
  .text-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
  }
  
  .card-title {
    width: 300px;
  }
  
  .card-title2 {
    width: 400px;
  }

  /* Padding für Main auf Tablet und Desktop wieder hinzufügen */
  main {
    padding: 0 2rem;
  }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
  }
  
  .dashboard-card {
    padding: 2.5rem;
  }
  
  .dashboard-card h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  
  .dashboard-card p {
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  .card h2 {
    font-size: 1.8rem;
  }
  
  .card h2::after {
    width: 70px;
  }
  
  .card-text h2::after {
    width: 190px;
  }
  
  .header-container {
    padding: 0 2rem;
    gap: 2rem;
    flex-wrap: nowrap;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
.nav-link {
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
  }
  
  .avatar-glow {
    width: 60px;
    height: 60px;
  }
  
  main {
    margin: 3rem auto;
    padding: 0 2rem; /* Padding hier belassen, da es durch Media Query überschrieben wird */
  }
  
  .grid-container {
    padding: 1rem;
    gap: 2.5rem;
  }
  
  .card {
    padding: 2.5rem;
  }
}

/* Large Desktop Styles (1440px and up) */
@media (min-width: 1440px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }
}
