/* --------------------------------
   1. Variables
-------------------------------- */
:root {
  /* Background colors */
  --bg-dark: #1a202c;
  --bg-darker: #161a25;
  
  /* Gray palette */
  --gray-800: #2d3748;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-400: #a0aec0;
  --gray-300: #cbd5e0;
  --gray-200: #e2e8f0;
  --gray-100: #f7fafc;
  
  /* Indigo palette */
  --indigo-900: #3c366b;
  --indigo-800: #434190;
  --indigo-700: #4c51bf;
  --indigo-600: #5a67d8;
  --indigo-500: #667eea;
  --indigo-400: #7f9cf5;
  --indigo-300: #a3bffa;
  
  /* Yellow palette */
  --yellow-800: #975a16;
  --yellow-700: #b7791f;
  --yellow-300: #faf089;
  --yellow-100: #fefcbf;
}

/* --------------------------------
   2. Base & Layout
-------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

main {
  flex-grow: 1;
  padding: 1rem;
  max-width: 36rem;
  margin: 0 auto;
  width: 100%;
}

/* --------------------------------
   3. Header
-------------------------------- */
header {
  background-color: var(--indigo-600);
  color: white;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 1.875rem;
  font-weight: 600;
  text-align: center;
  margin-left: 0.75rem;
}

/* --------------------------------
   4. Tabs
-------------------------------- */
.tab-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  background-color: var(--gray-800);
  padding: 0.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  color: var(--gray-100);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background-color: var(--gray-700);
}

.tab-button.active {
  background-color: var(--indigo-600);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tab content visibility */
#calculator-tab, #info-tab {
  display: none;
}

#calculator-tab.active, #info-tab.active {
  display: block;
}

/* --------------------------------
   5. Cards & Sections
-------------------------------- */
.card {
  background-color: var(--gray-800);
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-700);
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--indigo-400);
}

/* --------------------------------
   6. Forms
-------------------------------- */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  color: var(--gray-300);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

select, input {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: 0.5rem;
  color: white;
  outline: none;
}

select:focus, input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--indigo-500);
}

/* --------------------------------
   7. Syringe Buttons
-------------------------------- */
.syringe-buttons {
  display: flex;
  gap: 0.75rem;
}

.syringe-button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--gray-700);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.syringe-button:hover {
  background-color: var(--gray-600);
}

.syringe-button.active {
  background-color: var(--indigo-600);
  color: white;
}

.syringe-button:active {
  transform: scale(0.96);
}

.syringe-icon {
  margin-bottom: 0.5rem;
}

/* --------------------------------
   8. Results
-------------------------------- */
.results {
  background-color: var(--gray-700);
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-600);
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.result-row:last-child {
  margin-bottom: 0;
}

.result-label {
  font-weight: 600;
  color: var(--gray-300);
}

.result-value {
  color: white;
  font-weight: 500;
}

/* --------------------------------
   9. Syringe Visualization
-------------------------------- */
.syringe-visualization {
  background-color: var(--gray-700);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--gray-600);
  margin-bottom: 1.5rem;
}

.syringe-title {
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 1.5rem;
  text-align: center;
}

.syringe-container {
  display: flex;
  align-items: center;
}

.syringe-bar {
  flex-grow: 1;
  position: relative;
  height: 4rem;
  background-color: var(--gray-800);
  overflow: hidden;
  border: 1px solid var(--gray-600);
  margin-left: 0.5rem;
}

.syringe-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--indigo-500);
  transition: width 0.3s ease;
}

.syringe-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.syringe-text span {
  font-weight: 500;
  color: white;
  font-size: 0.875rem;
}

.syringe-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.syringe-note {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--indigo-300);
}

.syringe-instruction {
  font-weight: 500;
}

/* --------------------------------
   10. Scale Visualization
-------------------------------- */
.scale {
  position: relative;
  width: 100%;
  height: 65px;
  background-color: var(--gray-800);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-600);
}

.scale-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--indigo-500);
  transition: width 0.3s ease;
}

.scale-marker-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.scale-marker {
  position: absolute;
  top: 0;
  width: 1px;
  background-color: var(--gray-300);
  opacity: 0.7;
}

.scale-marker.long {
  height: 16px;
  opacity: 1;
  width: 2px;
}

.scale-marker.short {
  height: 8px;
  width: 1px;
}

.scale-label {
  position: absolute;
  bottom: -34px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--gray-300);
  text-align: center;
  font-weight: 300;
}

.scale-label.last {
  transform: translateX(-100%);
}

/* --------------------------------
   11. Instructions & Notes
-------------------------------- */
.instructions {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background-color: var(--indigo-900);
  border-radius: 0.5rem;
  color: var(--gray-100);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--indigo-700);
}

.instructions-title {
  font-weight: bold;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  color: var(--indigo-300);
}

.instructions p {
  margin-bottom: 0.5rem;
}

.instructions p:last-child {
  margin-bottom: 0;
}

/* --------------------------------
   12. Peptide Items
-------------------------------- */
.peptide-item {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background-color: var(--gray-700);
  border-radius: 0.5rem;
  border: 1px solid var(--gray-600);
}

.peptide-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: var(--indigo-300);
}

.peptide-info {
  margin-bottom: 0.75rem;
  color: var(--gray-200);
}

.peptide-info span {
  font-weight: 600;
  color: white;
}

.peptide-info:last-child {
  margin-bottom: 0;
}

/* --------------------------------
   13. Info Tab Styles
-------------------------------- */
.info-card {
  max-width: 100%;
  background-color: var(--gray-800);
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-700);
}

.info-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--gray-200);
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--indigo-500);
  padding-left: 1rem;
}

.info-step {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--gray-700);
  border-radius: 0.75rem;
  border: 1px solid var(--gray-600);
  position: relative;
  transition: all 0.2s ease;
}

.info-step:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.info-step:last-of-type {
  margin-bottom: 2rem;
}

.info-step-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--indigo-300);
  display: flex;
  align-items: center;
}

.info-step-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--indigo-500);
  border-radius: 50%;
  margin-right: 10px;
}

.info-step p {
  line-height: 1.6;
}

.info-list {
  list-style-type: none;
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.info-list li {
  margin-bottom: 0.5rem;
  position: relative;
  line-height: 1.5;
}

.info-list li::before {
  content: "•";
  color: var(--indigo-400);
  font-weight: bold;
  display: inline-block;
  width: 1rem;
  margin-left: -1rem;
}

.info-tip {
  background-color: var(--indigo-900);
  padding: 0.75rem;
  margin: 0.75rem 0;
  border-radius: 0.5rem;
  border-left: 3px solid var(--indigo-500);
  color: var(--gray-200);
  transition: all 0.2s ease;
}

.info-tip strong {
  color: var(--indigo-300);
}


/* --------------------------------
   15. Footer
-------------------------------- */
footer {
  background-color: var(--bg-darker);
  margin-top: 2rem;
  color: var(--gray-300);
  border-top: 1px solid var(--gray-700);
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.footer-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--indigo-400);
}

.footer-section p {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--gray-300);
}

.footer-list {
  list-style: none;
  padding: 0;
}

.footer-list li {
  margin-bottom: 0.75rem;
}

.footer-list li a,
.footer-link {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer-list li a:hover,
.footer-link:hover {
  color: var(--indigo-400);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1.5rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}

.footer-legal li a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-legal li a:hover {
  color: var(--indigo-400);
}

/* --------------------------------
   16. Responsive Design
-------------------------------- */
/* Tablets */
@media (max-width: 768px) {
  /* Header adjustments */
  header {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  /* Line height adjustments */
  p, li {
    line-height: 1.4;
  }
  
  /* Card spacing */
  .card {
    padding: 1.25rem;
  }
  
  /* Touch targets */
  select, 
  input, 
  .syringe-button,
  .tab-button {
    min-height: 44px;
  }
  
  /* Footer adjustments */
  .footer-elements {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-legal {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  /* Header optimizations */
  header {
    padding: 0.9rem;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  /* Container adjustments */
  .container {
    padding: 0;
  }
  
  main.container {
    padding: 0.5rem;
  }
  
  /* Tab optimizations */
  .tab-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .tabs {
    width: 100%;
    border-radius: 0.5rem;
  }
  
  .tab-button {
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    text-align: center;
  }
  
  /* Form optimizations */
  .form-group {
    margin-bottom: 1rem;
  }
  
  label {
    font-size: 0.95rem;
  }
  
  select, input {
    padding: 0.6rem;
    font-size: 0.95rem;
  }
  
  /* Results optimizations */
  .results {
    padding: 1rem;
  }
  
  .result-row {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  
  /* Syringe optimizations */
  .syringe-visualization {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .syringe-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .syringe-note {
    margin-top: 1rem;
    font-size: 0.9rem;
  }
  
  /* Instructions optimizations */
  .instructions {
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .instructions-title {
    font-size: 1rem;
  }
  
  .instructions p {
    font-size: 0.9rem;
  }
  
  /* Info tab optimizations */
  .info-intro {
    font-size: 0.95rem;
    padding-left: 0.7rem;
    margin-bottom: 1.25rem;
  }
  
  .info-step {
    padding: 1rem 0.75rem;
    margin-bottom: 1.25rem;
  }
  
  .info-step-title {
    font-size: 1.05rem;
  }
  
  .info-tip {
    padding: 0.7rem;
    font-size: 0.9rem;
  }
  
  .info-list li {
    font-size: 0.9rem;
  }
  
  /* Footer optimizations */
  .footer-container {
    padding: 1.5rem 0.75rem;
  }
  
  .footer-heading {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .footer-section p,
  .footer-list li a {
    font-size: 0.9rem;
  }
  
  .footer-legal li a {
    font-size: 0.8rem;
  }
}

/* Small mobile devices */
@media (max-width: 400px) {
  .scale {
    height: 50px;
  }
  
  .scale-label {
    font-size: 9px;
    bottom: -30px;
  }
  
  .scale-marker.long {
    height: 12px;
  }
  
  .scale-marker.short {
    height: 6px;
  }
  
  .syringe-buttons {
    flex-direction: column;
  }
}

/* --------------------------------
   18. Only for Safari 
-------------------------------- */

/* Override default select styling for cross-browser consistency */
select {
  /* Match appearance across browsers */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  /* Consistent sizing with inputs */
  height: 46px;
  line-height: 1.2;
  
  /* Remove Safari's default styling */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white'><polygon points='4,6 12,6 8,12'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  background-color: var(--gray-700);
  padding-right: 40px;
  
  /* Additional consistency */
  border: 1px solid var(--gray-600);
  border-radius: 0.5rem;
  color: white;
  outline: none;
  cursor: pointer;
}

/* Fix for Safari Mac/iOS */
select::-ms-expand {
  display: none;
}

/* Add drop shadow when focused */
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--indigo-500);
  border-color: var(--indigo-400);
}

/* Ensure all form controls have consistent height */
select, input, .form-control {
  height: 46px;
  box-sizing: border-box;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  select {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Explicitly set properties for consistent appearance on all devices */
select, input {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
}

/* Media queries adjustments */
@media (max-width: 480px) {
  select, input, .form-control {
    height: 44px;
    font-size: 15px;
  }
}

/* --------------------------------
   18. Image container
-------------------------------- */
/* Image containers with positioning */
.vial-image-container,
.bac-image-container {
  position: relative;
}

/* Style for both input fields to make room for the images */
.vial-image-container input,
.bac-image-container input {
  width: calc(100% - 95px);
}

/* Add the vial image */
.vial-image-container::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 85px;
  height: 80px;
  background-image: url('/peptides/calc-vial.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Add the BAC water image */
.bac-image-container::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 85px;
  height: 80px;
  background-image: url('/peptides/calc-bac.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vial-image-container::after,
  .bac-image-container::after {
    width: 70px;
    height: 70px;
  }
  
  .vial-image-container input,
  .bac-image-container input {
    width: calc(100% - 80px);
  }
}

@media (max-width: 480px) {
  .vial-image-container::after,
  .bac-image-container::after {
    width: 60px;
    height: 60px;
  }
  
  .vial-image-container input,
  .bac-image-container input {
    width: calc(100% - 65px);
  }
}

/* --------------------------------
   19. Tagebuch/Diary Styles
-------------------------------- */

/* Diary Tab Selection */
.diary-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--gray-800);
  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.diary-tab-button {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  color: var(--gray-100);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.diary-tab-button:hover {
  background-color: var(--gray-700);
}

.diary-tab-button.active {
  background-color: var(--indigo-600);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Diary Content Sections */
.diary-content {
  display: none;
}

.diary-content.active {
  display: block;
}

/* Diary Header */
.diary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.diary-header h2 {
  margin-bottom: 0;
}

.diary-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background-color: var(--gray-700);
  color: white;
  border: 1px solid var(--gray-600);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.action-button:hover {
  background-color: var(--gray-600);
}

#add-log-entry-btn {
  background-color: var(--indigo-600);
  border-color: var(--indigo-700);
}

#add-log-entry-btn:hover {
  background-color: var(--indigo-700);
}

/* Diary Table */
.diary-table-container {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.diary-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: var(--gray-100);
}

.diary-table th {
  background-color: var(--gray-700);
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--gray-600);
  white-space: nowrap;
}

.diary-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-700);
}

.diary-table tr:nth-child(even) {
  background-color: var(--gray-700);
}

.diary-table tr:nth-child(odd) {
  background-color: var(--gray-800);
}

.diary-table tr:hover {
  background-color: var(--gray-600);
}

/* Delete Button */
.delete-button {
  background-color: rgba(220, 38, 38, 0.7);
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-button:hover {
  background-color: rgb(220, 38, 38);
}

/* Empty Message */
.empty-diary-message {
  padding: 2rem;
  text-align: center;
  color: var(--gray-400);
  border: 1px dashed var(--gray-600);
  border-radius: 0.5rem;
  margin: 1rem 0;
  display: none;
}

/* Add to Diary Button in Calculator */
.diary-button-container {
  margin-top: 1.5rem;
  text-align: center;
}

.diary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  background-color: var(--indigo-600);
  color: white;
  border: 1px solid var(--indigo-700);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.diary-button:hover {
  background-color: var(--indigo-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.diary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.diary-button-icon {
  font-size: 1.2rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100;
  overflow: auto;
}

.modal-content {
  background-color: var(--gray-800);
  margin: 10% auto;
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  background-color: var(--gray-700);
}

.modal-header h3 {
  margin: 0;
  color: var(--indigo-300);
  font-weight: 600;
}

.close-modal {
  color: var(--gray-400);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--gray-100);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-700);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Modal Buttons */
.primary-button, .secondary-button {
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.primary-button {
  background-color: var(--indigo-600);
  color: white;
}

.primary-button:hover {
  background-color: var(--indigo-700);
}

.secondary-button {
  background-color: var(--gray-700);
  color: var(--gray-200);
  border: 1px solid var(--gray-600);
}

.secondary-button:hover {
  background-color: var(--gray-600);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--gray-800);
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s ease-out;
  max-width: 350px;
}

.toast.success {
  border-left: 4px solid #10B981;
}

.toast.error {
  border-left: 4px solid #EF4444;
}

.toast.info {
  border-left: 4px solid var(--indigo-500);
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .diary-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .diary-actions {
    width: 100%;
  }
  
  .action-button {
    flex: 1;
    justify-content: center;
  }
  
  .diary-table th,
  .diary-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .modal-content {
    margin: 20% auto;
    width: 95%;
  }
}

@media (max-width: 480px) {
  .diary-tabs {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .action-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .diary-table th,
  .diary-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .delete-button {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* 

CSS für die Disclaimer-Abschnitte 

*/

/* CSS für wirklich breite Disclaimer, die Einschränkungen der Container umgehen */

/* Container für beide Disclaimer-Karten */
.disclaimer-section {
  margin-top: 3rem;
  width: 100%; /* Volle Container-Breite */
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw; /* Viewport-Breite */
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* Allgemeines Styling für die Disclaimer-Karten */
.disclaimer-card {
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  width: 100%;
  max-width: 1200px; /* Maximale Breite für sehr große Bildschirme */
  margin-left: auto;
  margin-right: auto;
}

/* Medical Disclaimer spezifisch */
.medical-disclaimer {
  background-color: rgba(220, 38, 38, 0.1); /* Leicht roter Hintergrund */
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.medical-disclaimer .disclaimer-title {
  color: rgb(248, 113, 113); /* Rötlicher Titel */
}

.medical-disclaimer::before {
  content: "⚕️"; /* Medizin-Symbol */
  position: absolute;
  left: -10px;
  top: -10px;
  background-color: rgb(220, 38, 38);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Data Privacy spezifisch */
.privacy-disclaimer {
  background-color: rgba(79, 70, 229, 0.1); /* Leicht blauer/lila Hintergrund */
  border: 1px solid rgba(79, 70, 229, 0.3);
}

.privacy-disclaimer .disclaimer-title {
  color: rgb(129, 140, 248); /* Bläulicher Titel */
}

.privacy-disclaimer::before {
  content: "🔒"; /* Schloss-Symbol */
  position: absolute;
  left: -10px;
  top: -10px;
  background-color: rgb(79, 70, 229);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Überschrift der Disclaimer */
.disclaimer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Text innerhalb des Disclaimers */
.disclaimer-card p {
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--gray-300);
}

.disclaimer-card p:last-child {
  margin-bottom: 0;
}

.disclaimer-card em {
  font-style: italic;
  font-weight: 500;
}

/* Abstand zwischen den Karten */
.disclaimer-card + .disclaimer-card {
  margin-top: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .disclaimer-section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.85rem;
  }
  
  .disclaimer-card {
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
  }
  
  .disclaimer-title {
    font-size: 1rem;
  }
}

/* Animation beim Laden der Seite */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.disclaimer-card {
  animation: fadeIn 0.5s ease-out forwards;
}

.medical-disclaimer {
  animation-delay: 0.1s;
}

.privacy-disclaimer {
  animation-delay: 0.3s;
}

/*--*/
.peptide-info-content {
  margin-top: 1.5rem;
  min-height: 300px; /* Gibt dem leeren Bereich etwas Höhe */
}

#calculator-tab, #tagebuch-tab, #peptide-info-tab, #info-tab {
  display: none; /* Standardmäßig alle Tabs ausblenden */
}

#calculator-tab.active, #tagebuch-tab.active, #peptide-info-tab.active, #info-tab.active {
  display: block; /* Nur aktive Tabs anzeigen */
}
/*--*/
/* Peptide Card Wrapper mit Abstand */
.peptide-card-wrapper {
  margin-bottom: 0.75rem; /* Großer Abstand zwischen den Cards */
}

.peptide-card-wrapper:last-child {
  margin-bottom: 0; /* Kein Abstand nach der letzten Card */
}