* {
  box-sizing: border-box;
  font-family: 'Raleway', sans-serif;
}

body {
  margin: 0;
  background-color: #222;
  color: #fff;
  overflow-x: hidden;
}

/* Cookie Overlay */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1999;
  display: none;
}
.cookie-overlay.active {
  display: block;
}

/* Ad rails */
.ad-left, .ad-right {
  position: fixed;
  top: 70px;
  width: 120px;
  height: calc(100vh - 70px);
  z-index: 0;
}
.ad-left { left: 0; }
.ad-right { right: 0; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: #222;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0 30px;
  border-bottom: 1px solid #2f2f2f;
}
.navbar a {
  color: #fff;
  text-decoration: none;
  margin: 0 20px;
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .2s ease, box-shadow .2s ease;
}
.navbar a:hover, .navbar a:focus {
  background-color: #254c50;
  outline: none;
}

/* Logo bar under navbar */
.logo-bar {
  position: sticky;
  top: 70px;
  z-index: 500;
  background: #222;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #2f2f2f;
}
.logo-bar img {
  height: 60px;
  width: auto;
}

/* Section wrapper */
.category {
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 20px;
  border-bottom: 2px solid #2f2f2f;
  padding-bottom: 20px;
}
.category:last-child {
  border-bottom: none;
}
.category h2 {
  font-size: 26px;
  color: #fff;
  margin-bottom: 20px;
  border-bottom: 2px solid #254c50;
  padding-bottom: 5px;
}
.category h2.password-generator-title,
.category h2.password-checker-title,
.category h2.subnet-calculator-title {
  text-align: center;
}

/* Blog-specific styles */
.blog-section {
  margin: 40px auto;
}
.blog-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  margin-bottom: 30px;
  border-bottom: 2px solid #254c50;
}
.blog-article {
  background: #333;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}
.blog-wallpaper {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 300px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.blog-wallpaper h2 {
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
}
.blog-content {
  font-size: 16px;
  color: #ece5da;
  line-height: 1.6;
  margin: 15px 0;
}
.blog-image {
  max-width: 300px;
  margin: 15px;
}
.blog-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.blog-image-left {
  float: left;
  margin-right: 20px;
}
.blog-image-right {
  float: right;
  margin-left: 20px;
}
.blog-image .caption {
  font-size: 14px;
  color: #ece5da;
  text-align: center;
  margin-top: 8px;
}

/* Construction page specific styles */
.title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  color: white;
  margin-top: 3%;
  margin-bottom: 20px;
}
.title .online-text {
  color: #254c50;
}
.construction-message {
  font-size: 36px;
  font-weight: bold;
  color: #254c50;
  text-align: center;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.back-btn {
  background: #254c50;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 20px auto;
}
.back-btn:hover {
  background: #3a5d61;
}
.back-btn:active {
  background: #742323;
}

/* Tile styles (Index-Seite, neues Design) */
.grid > div {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.grid > div:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}
.grid > div svg {
  position: absolute;
  bottom: 0;
  left: 0;
  margin-bottom: 32px;
  transform: scale(1.5);
  opacity: 0.1;
}
.grid > div .relative.pt-10.px-10 {
  display: flex;
  align-items: center;
  justify-content: center;
}
.grid > div img {
  width: 112px; /* w-28 = 112px */
  height: auto;
}
.grid > div .relative.text-white.px-6.pb-6.mt-6 {
  padding: 24px;
  padding-top: 0;
}
.grid > div span.block.opacity-75 {
  opacity: 0.75;
  margin-bottom: -4px;
  font-size: 14px;
}
.grid > div .flex.justify-between {
  display: flex;
  justify-content: space-between;
}
.grid > div .block.font-semibold.text-xl {
  font-size: 20px;
  font-weight: 600;
}

/* Password Generator and Checker specific styles */
.password-container,
.subnet-container {
  text-align: center;
  background: #333;
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.security-notice {
  background: #2a2a2a;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 0 0 20px 0;
  text-align: center;
  color: #ece5da;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #254c50;
}
.security-notice strong {
  color: #fff;
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin: 10px 0;
}

input[type="password"], input[type="text"] {
  width: 100%;
  padding: 10px;
  padding-right: 40px;
  border: none;
  border-radius: 4px;
  background: #444;
  color: white;
  font-size: 16px;
}
input[type="password"]:focus, input[type="text"]:focus {
  outline: none;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #ece5da;
  font-size: 18px;
  user-select: none;
}

.strength-bar {
  width: 100%;
  height: 10px;
  background: #444;
  border-radius: 5px;
  margin: 10px 0;
  overflow: hidden;
  transition: background 0.3s;
}

.strength-fill {
  height: 100%;
  width: 0;
  background: #254c50;
  transition: width 0.3s;
}

.strength-text {
  font-size: 16px;
  margin: 10px 0;
  color: #ece5da;
}

.guidelines-container {
  background: #333;
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.guidelines-container h2 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 15px;
  text-align: center;
}
.guidelines-container p {
  font-size: 16px;
  color: #ece5da;
  margin: 8px 0;
  line-height: 1.5;
}
.guidelines-container p strong {
  color: #fff;
}

/* Subnet Calculator specific styles */
.subnet-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.subnet-form .form-group:last-of-type {
  margin-bottom: 20px; /* oder 25px, je nach gewünschtem Abstand */
}
.subnet-container th, .subnet-container td {
  padding: 8px;
  border: 1px solid #2f2f2f;
  text-align: left;
}

/* Fokus sichtbar für die Toggle-Buttons */
.toggle-button:focus {
  outline: 2px solid #3a5d61;
  outline-offset: 2px;
}

/* Mindestabstand zwischen Logo-Bar und Subnet-Section */
:root { --gap-lg: 64px; }
.logo-bar { margin-bottom: var(--gap-lg); 
}
/* Versteckt die nativen Radio-Inputs zuverlässig in allen Browsern */
.hidden-radio {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
}

.subnet-container th {
  background: #254c50;
}

/* Password Generator specific styles */
input, button {
  margin: 8px;
  padding: 8px;
  border-radius: 4px;
}

label {
  display: block;
  text-align: left;
  margin: 5px 0;
  font-size: 16px;
}

.password-card {
  background: #444;
  padding: 8px;
  margin: 8px 0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.password-card input {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 16px;
  flex: 1;
  padding: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.password-card button {
  background: #254c50;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
  color: white;
  white-space: nowrap;
  font-size: 14px;
}

.password-card button:hover {
  background: #506f72;
}

.generate-btn {
  background: #254c50;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  max-width: 300px;
}

.generate-btn:hover {
  background: #3a5d61;
}

.toggle-button {
  width: 100%;
  height: 60px;
  background-color: #254c50;
  color: white;
  text-align: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 3px 0;
  border: none;
  border-radius: 4px;
  position: relative;
  padding-right: 25px;
}

.toggle-button:hover {
  background-color: #303130;
  transform: scale(1.02);
}

.toggle-button:active {
  background-color: #742323;
}

.toggle-button.disabled {
  background-color: #303130;
  cursor: not-allowed;
  transform: none;
}

.toggle-group {
  margin-bottom: 5px;
}

.status-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: white;
}

.minus-btn,
.plus-btn {
  width: 60px;
  height: 60px;
  background-color: #303130;
  color: white;
  text-align: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 3px;
  border: none;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.minus-btn:hover,
.plus-btn:hover {
  background-color: #3a5d61;
  transform: scale(1.02);
}

.minus-btn:active {
  background-color: #742323;
}

.plus-btn:active {
  background-color: #4d4f4d;
}

.minus-btn.disabled,
.plus-btn.disabled {
  background-color: #303130;
  cursor: not-allowed;
  transform: none;
}

.amount-display {
  width: 60px;
  height: 60px;
  background-color: #303130;
  color: white;
  text-align: center;
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: default;
  border-radius: 4px;
}

.dropdown-container {
  margin: 0 auto;
  position: relative;
  width: 100%;
  color: #ece5da;
  font-size: 18px;
}

.dropdown-container nav {
  position: relative;
}

.dropdown-container h2 {
  font-size: 1.1rem;
  border-radius: 2px;
  background: #303130;
  height: 40px;
  text-transform: uppercase;
  margin-bottom: 0;
  color: inherit;
  font-weight: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 2px 2px 10px -2px rgba(0, 0, 0, 0.35);
  transition: all 0.4s;
}

.dropdown-container:hover h2 {
  transform: translateY(-2px);
  box-shadow: 2px 2px 5px -1px rgba(0, 0, 0, 0.35);
}

#dropdown-toggle {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
  height: 40px;
}

.dropdown-container h2::before {
  position: absolute;
  right: 8px;
  top: 0;
  height: 100%;
  width: 30px;
  background: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  content: "";
  clip-path: polygon(50% 25%, 20% 80%, 80% 80%);
  transform: rotate(180deg) scale(0.75);
}

#dropdown-toggle:not(:checked) ~ h2::before {
  transform: rotate(0deg) scale(0.75);
}

#dropdown-toggle:focus ~ h2 {
  background: #254c50;
}

#dropdown-toggle:checked ~ ul {
  visibility: hidden;
  opacity: 0;
  height: 0;
  padding-top: 0;
}

#dropdown-toggle:not(:checked) ~ ul {
  opacity: 1;
  visibility: visible;
  height: auto;
}

.dropdown-container ul {
  padding-left: 0;
  padding-top: 0.5rem;
  margin-top: 0;
  background: #333;
  list-style: none;
  text-align: center;
  transition: all 0.4s ease-out;
  width: 100%;
  position: absolute;
  z-index: 2;
}

.dropdown-container ul li {
  border-radius: 2px;
  position: relative;
  line-height: 1.5;
  width: 100%;
  margin: 0 0 0.25rem 0;
  background: #303130;
  transition: background 0.45s;
  box-shadow: 2px 2px 10px -2px rgba(0, 0, 0, 0.35);
}

.dropdown-container ul li:hover,
.dropdown-container ul li a:focus {
  background: #3a5d61;
}

.dropdown-container ul a {
  display: block;
  color: inherit;
  text-transform: lowercase;
  font-weight: 200;
  text-decoration: none;
  padding: 8px;
  font-size: 16px;
}

.content {
  max-width: 55ch;
  margin: 20px auto;
  color: #ece5da;
}

.content h2 {
  font-size: 20px;
}

.heading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  text-align: center;
}

.heading-container h2 {
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 20px;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #333;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  max-width: 600px;
  margin: 0 auto;
}
.cookie-content h2 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 15px;
  text-align: center;
}
.cookie-content p {
  font-size: 16px;
  color: #ece5da;
  margin-bottom: 20px;
  line-height: 1.5;
}
.cookie-options {
  margin-bottom: 20px;
}
.cookie-options label {
  display: block;
  margin: 10px 0;
  font-size: 16px;
  color: #ece5da;
}
.cookie-options input {
  margin-right: 10px;
}
.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-buttons button {
  background: #254c50;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}
.cookie-buttons button:hover {
  background: #3a5d61;
}
.cookie-consent.hidden {
  display: none;
}

/* Cookie Reset Button */
.cookie-reset-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  margin: 0 10px;
  cursor: pointer;
  text-decoration: none;
}
.cookie-reset-btn:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  background-color: #222;
}
footer a, footer button {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
}
footer a:hover {
  text-decoration: underline;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .ad-left, .ad-right {
    display: none;
  }
  .navbar {
    padding: 0 15px;
  }
  .navbar a {
    font-size: 18px;
    margin: 0 12px;
    padding: 6px 10px;
  }
  .logo-bar {
    padding: 16px 0;
  }
  .logo-bar img {
    height: 52px;
  }
  .category {
    margin: 40px auto;
    padding: 0 15px;
    padding-bottom: 15px;
  }
  .category h2 {
    font-size: 24px;
  }
  .title {
    font-size: 28px;
    margin-top: 5%;
  }
  .construction-message {
    font-size: 28px;
  }
  .construction-message span {
    font-size: 60px;
  }
  .back-btn {
    font-size: 14px;
    padding: 10px 16px;
    max-width: 200px;
  }
  .grid > div img {
    width: 96px;
  }
  .grid > div .block.font-semibold.text-xl {
    font-size: 18px;
  }
  .password-container,
  .subnet-container {
    padding: 15px;
    max-width: 100%;
    margin: 0 auto 15px;
  }
  .security-notice {
    padding: 12px 15px;
    font-size: 14px;
  }
  .password-wrapper input {
    font-size: 14px;
    padding: 8px;
    padding-right: 35px;
  }
  .toggle-password {
    font-size: 16px;
  }
  .strength-bar {
    height: 8px;
  }
  .strength-text {
    font-size: 14px;
  }
  .guidelines-container {
    padding: 15px;
    margin: 15px auto;
  }
  .guidelines-container h2 {
    font-size: 18px;
  }
  .guidelines-container p {
    font-size: 14px;
  }
  label, .password-card input, .dropdown-container ul a {
    font-size: 14px;
  }
  .password-card button {
    font-size: 12px;
    padding: 4px 8px;
  }
  .generate-btn {
    font-size: 14px;
    padding: 10px 16px;
  }
  .toggle-button, .amount-display, .minus-btn, .plus-btn {
    font-size: 1rem;
    height: 50px;
  }
  .dropdown-container {
    font-size: 16px;
  }
  .dropdown-container h2 {
    font-size: 1rem;
    height: 36px;
  }
  #dropdown-toggle {
    height: 36px;
  }
  .content h2, .heading-container h2 {
    font-size: 18px;
  }
  .cookie-consent {
    bottom: 15px;
    left: 15px;
    right: 15px;
    padding: 15px;
  }
  .cookie-content h2 {
    font-size: 18px;
  }
  .cookie-content p {
    font-size: 14px;
  }
  .cookie-options label {
    font-size: 14px;
  }
  .cookie-buttons button {
    font-size: 14px;
    padding: 8px 16px;
  }
  .cookie-reset-btn {
    font-size: 12px;
    margin: 0 8px;
  }
  /* Blog-specific mobile styles */
  .blog-title {
    font-size: 28px;
  }
  .blog-wallpaper {
    height: 200px;
  }
  .blog-wallpaper h2 {
    font-size: 24px;
  }
  .blog-content {
    font-size: 14px;
  }
  .blog-image {
    float: none;
    margin: 15px auto;
    max-width: 100%;
  }
  .blog-image img {
    max-width: 100%;
  }
  .blog-image .caption {
    font-size: 12px;
  }
}
/* ---------- Globale, konsistente Abstände in Content-Blöcken ---------- */
.content h2 {
  margin-top: 32px !important;      /* Abstand ÜBERSCHRIFT nach oben */
  margin-bottom: 24px !important;   /* Abstand ÜBERSCHRIFT zum Text */
  line-height: 1.3;
}

.content h2:first-child {
  margin-top: 0 !important;         /* erste H2 im .content-Block nicht doppelt absetzen */
}

.content p {
  margin-top: 0 !important;         /* vermeidet Margin-Collapse mit H2 */
  margin-bottom: 32px !important;   /* Abstand zwischen Absätzen/Blöcken */
  line-height: 1.6;
}

/* Optional: die Badge-Zeile über der Box etwas luftiger machen */
.heading-container {
  margin-bottom: 28px !important;
}

/* Einheitliche Abstände in Tool-Boxen (gilt für alle Tools mit .password-container) */
.password-container h2 {
  margin: 0 0 16px 0;              /* Titel in der Box */
  line-height: 1.3;
}

.password-container .form-group {
  margin: 12px 0;                  /* Standardabstand zwischen Feldern */
  text-align: left;                /* wie bei deinen Labels */
}
.password-container .form-group:first-of-type { margin-top: 0; }
.password-container .form-group:last-of-type  { margin-bottom: 24px; } /* Luft vor Buttons */

.password-container #fileList {
  margin: 12px 0 16px;             /* ausgewählte Dateien (Cards) */
}

.password-container .actions-row {  /* Button-Zeile (Clear/Merge) */
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 4px;
}

/* Fokusoptik konsistent */
.form-input:focus, .toggle-button:focus, .generate-btn:focus {
  outline: 2px solid #3a5d61;
  outline-offset: 2px;
}
/* File-Picker Layout wie bei deinen Tools */
.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Eigener Status-Text neben dem Button */
.file-chosen {
  font-size: 14px;
  color: #ece5da;
}

/* Native Datei-Eingabe visuell verstecken, aber zugänglich lassen */
.sr-only-file {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  /* Optional: für Screenreader sichtbar lassen (ohne aria-hidden) */
}
