body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #000000, #333333);
    color: #000000;
    transition: background-color 0.3s, color 0.3s;
}
body.light {
    background: linear-gradient(135deg, #000000, #333333);
    color: #000000;
}
body.dark {
    background: linear-gradient(135deg, #f0ece3, #d8d0c1);
    color: #f5f0e7;
}
/* Neue Header-Sektion - transparent wie vorher */
#mainHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: transparent !important; /* Transparent wie vorher */
    height: auto !important;
    padding: 0 !important;
}

/* Logo in Header - größere Größe */
#mainHeader #logo, #mainHeader #logo-dark {
    position: fixed !important;
    top: 15px !important;
    left: 16px !important;
    z-index: 10000 !important;
    height: 90px !important; /* Größere Größe */
    width: auto !important;
}

/* Toggle Buttons in Header - korrekte Positionierung */
#mainHeader #themeToggle, #mainHeader #langToggle {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(240, 236, 227, 0.9) !important;
    border: 2px solid #000000 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Language Toggle spezifisch */
#mainHeader #langToggle {
    right: 80px !important; /* Links vom Theme Toggle */
}

.dark #mainHeader #themeToggle, .dark #mainHeader #langToggle {
    background: rgba(45, 45, 45, 0.9) !important;
    border: 2px solid #f0ece3 !important;
}

/* Alle Karten haben jetzt Top-Margin für Header */
.card {
    background: #f0ece3;
    border-radius: 1rem;
    border: 2px solid #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    width: 90vw;
    margin: 0 auto;
    margin-top: 80px !important; /* Karte nach oben verschoben */
    padding-top: 20px !important; /* Normales Padding */
    z-index: 10 !important;
    position: relative !important; /* Wichtig für absolute Positionierung der Footer-Links */
}
.dark .card {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.postcard {
    background: #f0ece3;
    border: 2px solid #000000;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    max-width: 100%;
    width: 90vw;
    margin: 0 auto;
}
.dark .postcard {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
}
.postcard:hover {
    transform: scale(1.02);
}
.btn-primary {
    background: #f0ece3;
    border: 2px solid #000000;
    color: #000000;
    font-weight: 700;
    transition: transform 0.3s ease;
    min-width: 120px;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.btn-secondary {
    background: #f0ece3;
    border: 2px solid #000000;
    color: #000000;
    font-weight: 700;
    transition: transform 0.3s ease;
    min-width: 120px;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.dark .btn-primary {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
    color: #f5f0e7;
}
.dark .btn-secondary {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
    color: #f5f0e7;
}
.btn-primary:hover {
    transform: scale(1.05);
    background: #f0ece3;
    color: #000000;
}
.btn-secondary:hover {
    transform: scale(1.05);
    background: #f0ece3;
    color: #000000;
}
.dark .btn-primary:hover {
    background: #3a3a3a;
}
.dark .btn-secondary:hover {
    background: #3a3a3a;
}
/* Neu: Spezieller Hover für PDF-Download-Button */
#downloadPreview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.dark #downloadPreview:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.5s ease-out;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}
.background-wave {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: none;
}
.photo-box {
    width: 100%;
    height: 12rem;
    background: #e8e4de;
    border: 2px solid #000000;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    cursor: pointer;
    transform: rotate(2deg); /* Nur hier Neigung für Schritt 1 */
}
.dark .photo-box {
    background: #3a3a3a;
    border: 2px solid #f0ece3;
}
.dark .photo-box button {
    color: #f5f0e7;
}
.photo-box:hover {
    transform: scale(1.05) rotate(2deg);
}
#previewContainer, #previewContainerStep3 {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f0ece3, #d8d0c1); /* Subtiler Gradient für Tiefe, farblich passend zu dark */
    border: none;
    /* Keine Neigung für Schritte 2 und 3 */
}
#previewContainerStep3 {
    margin-bottom: 1.5rem;
}
#preview, #previewStep3, .crop-container {
    border-radius: 0.5rem;
    /* Keine Gegen-Neigung */
}
/* #previewStep3, #finalPreview styles are now handled by .postcard-image */
.crop-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    border-radius: 0.5rem;
    /* Mobile-optimierte Touch-Einstellungen */
    touch-action: manipulation; /* Erlaubt Pinch-Zoom aber verhindert Browser-Zoom */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Crop-Box immer sichtbar und full (dashed für Feedback) */
.cropper-crop-box {
    border: 2px dashed #007bff !important; /* Blaue dashed Linie für Intuitivität */
    background: rgba(0, 123, 255, 0.15) !important; /* Leicht sichtbarer Hintergrund */
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    box-sizing: border-box !important;
}

/* Verstecke Crop-Box-Griffe, da sie nicht beweglich sein sollen */
.cropper-point,
.cropper-line {
    display: none !important;
}
.crop-preview {
    display: block;
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
#cropOption {
    width: 90vw;
    max-width: 300px;
    padding: 0.75rem;
    margin-bottom: 1rem; /* Abstand zwischen Dropdown und Foto (eine "Zeile") */
    border-radius: 0.5rem;
    background: #f0ece3;
    border: 2px solid #000000;
    color: #000000;
}
.dark #cropOption {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
    color: #f5f0e7;
}
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    flex-wrap: nowrap;
}
#success .button-container {
    justify-content: center; /* Neu: Zentriert den Button auf Success-Seite */
}
@media (max-width: 768px) {
    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        justify-content: center;
    }
    .button-container button {
        width: 100%;
        min-width: 0;
        max-width: 100% !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* Mobile Button Order: Weiter oben, Zurück unten */
    .button-container .btn-primary {
        order: 1; /* Weiter-Button kommt zuerst */
    }
    .button-container .btn-secondary {
        order: 2; /* Zurück-Button kommt danach */
    }
    
    /* Step 4 spezifische Mobile-Styles */
    #step4 .flex.justify-between {
        flex-direction: row !important;
        gap: 0.5rem;
    }
    
    #step4 .btn-primary, #step4 .btn-secondary {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
        white-space: nowrap !important;
        flex: 1;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}
textarea:not(.address-line-input):not(.message-textarea), 
input[type="text"]:not(.address-line-input) {
    background-color: #f0ece3;
    border: 2px solid #000000;
    border-style: solid;
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    color: #000000;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background-color 0.3s, border-color 0.3s;
    font-weight: 400; /* Regular für Fließtext */
}
#greeting {
    border: none;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 1.2rem;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}
.dark #greeting {
    border: none;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}

.dark .message-area {
    background: transparent;
    border: 2px solid #000000;
}

.dark .message-textarea {
    color: #f5f0e7;
}
.dark textarea:not(.address-line-input):not(.message-textarea), 
.dark input[type="text"]:not(.address-line-input) {
    background-color: #2d2d2d;
    border: 2px solid #f0ece3;
    border-style: solid;
    color: #f5f0e7;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
#logo, #logo-dark {
    position: fixed;
    top: 15px; /* Konsistent mit Toggle-Buttons */
    left: 16px;
    width: 120px;
    height: 120px;
    object-fit: contain;
    box-shadow: none;
    filter: brightness(1.2);
    z-index: 10000 !important;
    animation: stampAnimation 1s ease-out forwards;
    transform: rotate(5deg); /* Leichte Diagonalneigung */
    margin-bottom: 100px; /* Weniger Freiraum - Container kürzer */
}
.dark #logo {
    display: none;
}
#logo-dark {
    display: none;
}
.dark #logo-dark {
    display: block;
    box-shadow: none;
    filter: brightness(1.2);
}
@keyframes stampAnimation {
    0% {
        transform: translateY(-150px) rotate(-15deg);
        opacity: 0;
    }
    50% {
        transform: translateY(15px) rotate(10deg) scale(1.1);
        opacity: 0.7;
    }
    80% {
        transform: translateY(-10px) rotate(-2deg) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translateY(0) rotate(5deg); /* Endet mit Neigung */
        opacity: 1;
    }
}
/* #finalPreview styles are now handled by .postcard-image */
@media (max-width: 768px) {
    .card, .postcard {
        padding: 0.5rem;
        width: 85vw;
        margin-top: 80px !important; /* Karte nach oben verschoben */
        padding-top: 20px !important; /* Normales Padding */
    }
    
    /* Step 2 spezifisch - kompakter */
    #step2 {
        padding-top: 15px !important; /* Noch weniger Platz - nur 15px */
        padding-bottom: 0.5rem !important; /* Weniger Abstand zu den Buttons */
    }
    
    /* Step 2 h2 - weniger Abstand zum Container-Top */
    #step2 h2 {
        margin-top: 0.5rem !important; /* Weniger Abstand zum Container-Top */
    }
    .btn-primary, .btn-secondary {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-width: 90px;
        min-height: 32px; /* Reduziert für kompaktere Darstellung */
        width: 100%;
        box-sizing: border-box;
    }
    h1 {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 1rem;
    }
    p {
        font-size: 0.75rem;
    }
    #previewContainer, #previewContainerStep3 {
        width: 100%;
        height: auto; /* Voll nutzbar auf Mobile */
        border-radius: 0.5rem;
        background: transparent;
        border: none;
    }
    #preview, #previewStep3, .crop-container, .crop-preview {
        border-radius: 0.5rem;
        width: 100%; /* Voll nutzbar */
        height: auto;
    }
    
    #previewContainer, #cropContainer {
        width: 100%;
        height: auto;
        min-height: 200px; /* Mindesthöhe für Touch-Fläche */
        aspect-ratio: 3/2; /* DIN A5 Landscape-Seitenverhältnis */
    }
    
    /* Portrait-Modus: 2:3 Seitenverhältnis */
    #previewContainer.portrait, #cropContainer.portrait {
        aspect-ratio: 2/3; /* DIN A5 Portrait-Seitenverhältnis */
    }
    
    .cropper-view-box {
        outline: none !important; /* Kein Outline bei Touch */
    }
    
    .cropper-container {
        touch-action: none; /* Cropper handhabt Touch selbst */
    }
    #cropOption {
        width: 100%;
        max-width: none;
        margin: 0 auto 1rem auto; /* Abstand zum Foto */
        display: block;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    .message-textarea {
        font-size: 1.1rem !important;
        min-height: 100px;
    }
    
    .message-placeholder {
        font-size: 1.1rem;
    }
    
    /* Step 4 Mobile - now uses same structure as Step 3, so no special styles needed */
    
    #step4 #finalGreetingDisplay {
        font-size: 1.1rem !important;
        font-family: 'Caveat', cursive;
        line-height: 1.4;
        color: #000000;
    }
    #logo, #logo-dark {
        width: 100px;
        height: 100px;
        z-index: 10000 !important;
        top: 15px !important; /* Konsistent mit Desktop */
    }
    #previewContainerStep3 {
        width: 100%;
        height: auto;
        overflow: hidden;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 2.25rem;
      }
      #previewStep3 {
        width: 100%;
        height: auto;
        object-fit: contain; /* Besser für Mobile */
      }
    /* #finalPreview mobile styles are now handled by .postcard-image */
}
.cropper-crop-box {
    border: 2px dashed #ffffff !important;
    opacity: 1 !important;
}
.cropper-face, .cropper-view-box {
    opacity: 1 !important;
    background: transparent !important;
}
.cropper-container,
.cropper-canvas,
.cropper-wrap-box {
  max-width: 100% !important;
  max-height: 100% !important;
}
#previewContainer, #cropContainer {
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: transparent;
    border: 2px solid #000000; /* Rahmen für besseres Feedback */
    max-width: 100%; /* Verhindert Überlauf */
    width: auto; /* Automatische Breite */
    height: auto;
    touch-action: pinch-zoom; /* Erlaube Pinch-Zoom auf Mobile */
}

.dark #previewContainer, .dark #cropContainer {
    border: 2px solid #f0ece3;
}
#payment-message {
  color: red;
  margin-top: 10px;
  display: none;
  text-align: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10000;
  max-width: 90%;
}

/* New Address Overlay Popup - App Design */
#newAddressModal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

#newAddressModal .modal-content {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f0ece3;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 420px;
  border: 2px solid #000000;
}

#newAddressModal .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #000000;
  transition: color 0.2s;
}

#newAddressModal .close:hover {
  color: #000000;
}

#newAddressModal h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  text-align: center;
}

#newAddressModal .new-address-content {
  margin-top: 10px;
}

#newAddressModal input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #000000;
  border-radius: 8px;
  font-size: 20px !important;
  margin-bottom: 8px;
  background: white;
  color: #000000;
  transition: border-color 0.2s;
  line-height: 1.2;
}

#newAddressModal input::placeholder {
  font-size: 18px;
  color: #666;
  line-height: 1.2;
}

#newAddressModal input:focus {
  outline: none;
  border-color: #000000;
}

#newAddressModal .country-display {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #000000;
  border-radius: 8px;
  font-size: 20px !important;
  margin-bottom: 8px;
  cursor: pointer;
  background: white;
  color: #000000;
  transition: border-color 0.2s;
  position: relative;
  line-height: 1.2;
}

#newAddressModal .country-display:hover {
  border-color: #000000;
}

#newAddressModal .country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #000000;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  max-height: 200px;
  overflow: hidden;
  margin-top: 2px;
}

/* iOS Mobile spezifische Fixes für Länder-Dropdown */
@media (max-width: 768px) {
  #newAddressModal .country-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 200px !important;
    z-index: 99999 !important;
    transform: none !important;
    margin-top: 2px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }
  
  /* Verhindert, dass das Dropdown sich bewegt */
  #newAddressModal .country-dropdown.show {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
  }
}

#newAddressModal .country-search {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #f0ece3;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  background: white;
  color: #000000;
  outline: none;
}

#newAddressModal .country-search:focus {
  border-bottom-color: #000000;
}

#newAddressModal .country-options {
  max-height: 150px;
  overflow-y: auto;
}

#newAddressModal .country-dropdown.hidden {
  display: none !important;
}

#newAddressModal .country-dropdown:not(.hidden) {
  display: block !important;
}

#newAddressModal .country-option {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 20px !important;
  color: #000000;
  border-bottom: 1px solid #f0ece3;
  transition: background-color 0.2s;
  line-height: 1.2;
}

#newAddressModal .country-option:hover {
  background: #f0ece3;
}

#newAddressModal .country-option:last-child {
  border-bottom: none;
}

#newAddressModal .flex {
  display: flex;
  gap: 12px;
}

#newAddressModal .flex input {
  margin-bottom: 8px;
}

#newAddressModal .w-1\/3 {
  width: 30%;
}

#newAddressModal .w-2\/3 {
  width: 65%;
}

#newAddressModal .mt-4 {
  margin-top: 20px;
}

#newAddressModal .flex.space-x-3 {
  gap: 16px;
}

#newAddressModal button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  flex: 1;
  transition: all 0.2s;
}

#newAddressModal .btn-primary {
  background: #000000;
  color: white;
  border: 2px solid #000000;
}

#newAddressModal .btn-primary:hover {
  background: #333333;
  border-color: #333333;
  transform: translateY(-1px);
}

#newAddressModal .btn-secondary {
  background: #f0ece3;
  color: #000000;
  border: 2px solid #000000;
}

#newAddressModal .btn-secondary:hover {
  background: #e6ddd0;
  border-color: #333333;
  transform: translateY(-1px);
}

/* Address Management Overlay Popup - same style as new address modal */
#addressModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

#addressModal .modal-content {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f0ece3;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  width: 500px;
  border: 2px solid #000000;
}

#addressModal .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #000000;
  transition: color 0.2s;
}

#addressModal .close:hover {
  color: #000000;
}

#addressModal h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  text-align: center;
}

#addressModal .address-content {
  margin-top: 10px;
}

#addressModal .button-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

#addressModal button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

#addressModal .btn-primary {
  background: #000000;
  color: white;
  border: 2px solid #000000;
}

#addressModal .btn-primary:hover {
  background: #333333;
  border-color: #333333;
  transform: translateY(-1px);
}

#addressModal .btn-secondary {
  background: #f0ece3;
  color: #000000;
  border: 2px solid #000000;
}

#addressModal .btn-secondary:hover {
  background: #e6ddd0;
  border-color: #333333;
  transform: translateY(-1px);
}

#addressModal .address-item {
  background: white;
  border: 2px solid #000000;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

#addressModal .address-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* CENTER THE ENTIRE ADDRESS-DETAILS DIV ELEMENT */
#addressModal .address-item .address-details {
  text-align: center !important;
  display: block !important;
  width: auto !important;
  max-width: 80% !important;
  margin: 0 auto !important;
  padding-right: 0 !important;
}

#addressModal .address-item .address-details > div {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin: 0 auto !important;
}

#addressModal .address-item .address-details .font-medium {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ULTRA STRONG CENTERING RULES - OVERRIDE EVERYTHING */
#addressModal .address-item h3,
#addressModal .address-item .address-details,
#addressModal .address-item .address-details div,
#addressModal .address-item .address-details .font-medium {
  text-align: center !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* GLOBAL CENTERING RULE - CENTER ALL ADDRESS TEXT EVERYWHERE */
.address-item h3,
.address-item .address-details,
.address-item .address-details div,
.address-item .address-details .font-medium {
  text-align: center !important;
  display: block !important;
}

/* Force center alignment for all address elements */
#addressModal .address-item h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  text-align: center !important; /* Force center align the address title */
}

#addressModal .address-item .address-details {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  padding-right: 80px; /* Reserve space for buttons */
  margin-bottom: 8px;
  text-align: center !important; /* Force center align the address text */
}

/* Force center alignment for all divs inside address-details */
#addressModal .address-item .address-details div {
  text-align: center !important;
  display: block !important;
}

/* Force center alignment for font-medium class */
#addressModal .address-item .address-details .font-medium {
  text-align: center !important;
  display: block !important;
}

#addressModal .address-item .edit-btn {
  position: absolute;
  top: 8px;
  right: 50px; /* More space from remove button */
  background: none;
  color: #000000;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: background-color 0.2s;
  z-index: 10;
}

#addressModal .address-item .edit-btn:hover {
  color: #333333;
  background-color: rgba(0, 0, 0, 0.1);
}

#addressModal .address-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  color: #000000;
  border: none;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: background-color 0.2s;
  z-index: 10;
}

#addressModal .address-item .remove-btn:hover {
  color: #333333;
  background-color: rgba(255, 0, 0, 0.1);
}

/* Mobile responsive fixes for buttons */
@media (max-width: 768px) {
  /* CENTER THE ENTIRE ADDRESS-DETAILS DIV ELEMENT ON MOBILE */
  #addressModal .address-item .address-details {
    text-align: center !important;
    display: block !important;
    width: auto !important;
    max-width: 85% !important;
    margin: 0 auto !important;
    padding-right: 0 !important;
  }
  
  #addressModal .address-item .address-details > div {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  #addressModal .address-item .address-details .font-medium {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* ULTRA STRONG CENTERING RULES FOR MOBILE - OVERRIDE EVERYTHING */
  #addressModal .address-item h3,
  #addressModal .address-item .address-details,
  #addressModal .address-item .address-details div,
  #addressModal .address-item .address-details .font-medium {
    text-align: center !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  #addressModal .address-item h3 {
    text-align: center !important; /* Force center align title on mobile too */
  }
  
  #addressModal .address-item .edit-btn {
    right: 45px; /* Adjust position for mobile */
    width: 22px;
    height: 22px;
    font-size: 14px;
  }
  
  #addressModal .address-item .remove-btn {
    right: 6px; /* Adjust position for mobile */
    width: 22px;
    height: 22px;
    font-size: 18px;
  }
}
#payment-status-message {
  display: none;
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #000000;
}
/* Hidden class for step visibility */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -1 !important;
}

/* Step 4 styling - only when visible */
#step4 {
    position: relative;
    z-index: 1 !important; /* Niedrig, Footer darüber */
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100% !important;
    max-width: 24rem !important; /* Reduziert von 28rem auf 24rem für iPhone */
    min-height: 400px !important;
    /* Remove display: block !important; to allow .hidden class to work */
}

/* Neu: Consent Modal */
#consentModal {
    display: none; /* Default hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    pointer-events: auto;
}
#consentModal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative !important; /* Wichtig für absolute Positionierung des X-Symbols */
}
.dark #consentModal .modal-content {
    background: #2d2d2d;
    color: #f5f0e7;
}
#consentModal button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #000000;
    color: #f5f0e7;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}
.dark #consentModal button {
    background: #f0ece3;
    color: #000000;
}
/* Alte Logo/Toggle Regeln entfernt - jetzt in Header-Sektion */

/* Alte Logo/Toggle Regeln entfernt - jetzt in Header-Sektion */

/* Footer Links - außerhalb des Containers ohne ihn zu vergrößern */
.footer-links {
    position: absolute;
    bottom: -50px; /* 50px unterhalb des Containers */
    right: 0; /* Rechtsbündig */
    text-align: right;
    font-size: 14px;
    width: 100%; /* Volle Breite für rechtsbündige Ausrichtung */
    z-index: 1; /* Sehr niedrig, damit alles andere darüber liegt */
    transition: opacity 0.3s ease; /* Sanfte Übergänge */
    opacity: 1; /* Standardmäßig sichtbar */
    pointer-events: auto; /* Standardmäßig klickbar */
}

/* Footer verstecken nur bei spezifischen Dropdowns/Modals - CSS wird durch JavaScript ersetzt */

.footer-links a {
    color: #000000;
    text-decoration: underline;
    margin: 0 10px;
    cursor: pointer;
}

.dark .footer-links a {
    color: #f5f0e7;
}

.footer-links a:hover {
    color: #666666;
}

.dark .footer-links a:hover {
    color: #cccccc;
}







/* Mobile: Footer Links - einfache Anpassung */
@media (max-width: 768px) {
    .footer-links {
        position: absolute;
        bottom: -50px; /* 50px unterhalb des Containers auch auf Mobile */
        right: 0; /* Rechtsbündig auch auf Mobile */
        text-align: right;
        font-size: 12px;
        width: 100%; /* Volle Breite für rechtsbündige Ausrichtung */
        z-index: 1; /* Sehr niedrig, damit alles andere darüber liegt */
        transition: opacity 0.3s ease; /* Sanfte Übergänge */
        opacity: 1; /* Standardmäßig sichtbar */
        pointer-events: auto; /* Standardmäßig klickbar */
    }
    
    .footer-links a {
        margin: 0 8px;
    }
    
    /* Mobile Karten-Anpassungen */
    .card, .postcard {
        padding: 0.5rem;
        width: 85vw;
        margin-top: 80px !important; /* Karte nach oben verschoben */
        padding-top: 20px !important; /* Normales Padding */
    }
    
    /* Schritt 1: Weniger Abstand zwischen Text und Foto-Container */
    #step1 p#step1_p {
        margin-bottom: 0.25rem !important; /* Noch kleinerer Abstand */
    }
    
    /* Zusätzliche Regel für Schritt 1 Text */
    .card#step1 p.text-lg {
        margin-bottom: 0.25rem !important;
    }
    
    /* Schritt 1: Weniger Abstand zum postcard Container */
    #step1 .postcard {
        margin-top: 0.5rem !important; /* Weniger Abstand zum Container */
    }
}

/* Wichtige Regeln für Karten und Schritte wiederherstellen */
.card {
    background: #f0ece3;
    border-radius: 1rem;
    border: 2px solid #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    width: 90vw;
    margin: 0 auto;
    margin-top: 80px !important; /* Karte nach oben verschoben */
    padding-top: 20px !important; /* Normales Padding */
    z-index: 10 !important;
    position: relative !important; /* Wichtig für absolute Positionierung der Footer-Links */
}

.dark .card {
    background: #2d2d2d;
    border: 2px solid #f0ece3;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* Verstecke alle Karten außer der aktuellen */
.card.hidden {
    display: none !important;
}

/* Allgemeine Input-Feld Regeln - keine Unterstreichungen */
input, textarea {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}

/* Vorschau-Elemente - keine Unterstreichungen */
.photo-text-display-front, #photoTextDisplayFront, .photo-text-display {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}

/* B&W Toggle Button für Step 2 */
.bw-toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid white;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bw-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.bw-toggle-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    border-color: black;
}

/* Mobile B&W Button */
@media (max-width: 768px) {
    .bw-toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 9px;
        top: 8px;
        left: 8px;
    }
}

/* Text Overlay für Foto-Seite in Step 3 - Cursor-ähnlich */
.photo-text-overlay {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 1;
    pointer-events: none; /* Allow clicks to pass through to postcard flip */
    display: none; /* Hide the input field completely */
}

.photo-text-input {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    transition: all 0.3s ease;
    pointer-events: auto; /* Re-enable for input */
    outline: none;
    font-family: 'Caveat', cursive, sans-serif;
}

.photo-text-input:focus {
    border-bottom-color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.1);
}

.photo-text-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Dark mode für Text Overlay */
.dark .photo-text-input {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.dark .photo-text-input:focus {
    border-bottom-color: #fff;
    background: rgba(0, 0, 0, 0.2);
}

.dark .photo-text-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Text Overlay */
@media (max-width: 768px) {
    .photo-text-overlay {
        bottom: 25px;
        width: 75%;
    }
    
    .photo-text-input {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Direkte Text-Eingabe auf Foto - NUR VORDERSEITE */
.postcard-side.postcard-front .photo-text-display-front {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Caveat', cursive;
    text-align: center;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
    pointer-events: auto;
    z-index: 5;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    background: transparent;
    border: none;
    outline: none;
    cursor: text;
    min-height: 1.4em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.postcard-side.postcard-front .photo-text-display-front:focus {
    background: rgba(0, 0, 0, 0.1);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: transparent !important;
}





/* Vorderseite Text-Display - NUR für Vorderseite */
/* #photoTextDisplayFront - entfernt, da doppelt mit .photo-text-display-front */

/* Placeholder NUR für Vorderseite anzeigen - SEHR SPEZIFISCH */
.postcard-side.postcard-front #photoTextDisplayFront:empty:before,
.postcard-side.postcard-front #photoTextDisplayFront.is-empty:before {
    content: attr(data-placeholder) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-style: italic !important;
    pointer-events: none !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: normal !important;
}

/* EXPLIZIT: Rückseite darf KEINE Vorderseiten-Elemente anzeigen */
.postcard-side.postcard-back #photoTextDisplayFront,
.postcard-side.postcard-back .photo-text-display-front {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important; /* Safari */
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    z-index: -1 !important;
    content: none !important;
    transform: scale(0) !important; /* Extra-Skalierung für Safari */
    clip: rect(0, 0, 0, 0) !important; /* Clipping für alte Browser */
}

/* Safari-spezifische Front/Back-Trennung - GLOBAL */
@supports (-webkit-touch-callout: none) {
    .postcard-side.postcard-back #photoTextDisplayFront,
    .postcard-side.postcard-back .photo-text-display-front {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        transform: scale(0) !important;
        clip: rect(0, 0, 0, 0) !important;
    }
    
    /* Verhindere Fokus/Interaktion auf iOS */
    #photoTextDisplayFront {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        touch-action: none !important;
    }
}

/* Wenn geflippt: Stelle sicher, dass Front-Elemente deaktiviert sind */
.postcard-flip-inner.flipped .postcard-front {
    pointer-events: none !important; /* Keine Interaktion auf Front, wenn Rückseite sichtbar */
    opacity: 0 !important; /* Extra-Verstecken */
}



/* Mobile Text Display */
@media (max-width: 768px) {
    .postcard-side.postcard-front #photoTextDisplayFront {
        bottom: 25px;
        font-size: 1.0rem;
        max-width: 75%;
    }
    
    /* Kompakte Buttons für Mobile */
    .button-container {
        margin-top: 0.5rem !important;
        padding: 0.25rem !important;
    }
    
    .button-container button {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    /* Header-Buttons kompakter */
    .header-buttons button {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* iPhone-spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    /* iPhone Button-Fixes - kürzere Buttons */
    .button-container {
        max-width: 90% !important;
        margin: 0 auto !important;
    }
    
    .button-container button {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    /* iPhone Safari-spezifische Fixes */
    
    /* Logo und Header-Fixes */
    .header-buttons {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 0.5rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 0.5rem !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .header-buttons button {
        background: #fff !important;
        border: 1px solid #ddd !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Card Container - mehr Platz für Header */
    .card {
        margin-top: 4rem !important; /* Platz für fixed header buttons */
    }
    
    /* Postcard Container - responsive */
    .postcard-container {
        margin-bottom: 0.5rem !important;
    }
    
    .postcard-flip-container {
        max-width: 100% !important;
        height: 250px !important; /* iPhone specific height */
    }
    
    /* Step 3 Container - keine Höhenbegrenzung mehr */
    #step3 {
        padding-bottom: 1rem !important;
    }
    
    /* Verhindert, dass Placeholder auf Rückseite erscheint */
    .postcard-side.postcard-back .photo-text-display-front {
        display: none !important;
    }
    
    /* Text-Input auf Rückseite - iPhone-spezifisch */
    .postcard-back .message-textarea {
        -webkit-appearance: none !important;
        appearance: none !important;
        border-radius: 0 !important;
    background: transparent !important;
    }
    
    /* Verhindert Zoom beim Fokus auf Input-Felder */
    input[type="text"], 
    input[type="email"], 
    textarea {
        font-size: 16px !important;
        transform: scale(1) !important;
    }
    
    /* Safari-spezifische File-Input-Fixes */
    input[type="file"] {
        -webkit-appearance: none !important;
        appearance: none !important;
    border: none !important;
        background: transparent !important;
        cursor: pointer !important;
    }
    
    /* Safari-spezifische File-Input-Hover-Fixes */
    input[type="file"]:hover {
        background: rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Safari-spezifische Front/Back-Trennung */
    .postcard-side.postcard-back #photoTextDisplayFront {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: 1000 !important;
        text-decoration: none !important;
        text-decoration-line: none !important;
        text-decoration-style: none !important;
        text-decoration-color: transparent !important;
    }
    
    .postcard-side.postcard-back .photo-text-display-front {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: 1000 !important;
    }
    
    /* Safari-spezifische Front/Back-Trennung - noch spezifischer */
    .postcard-flip-container .postcard-side.postcard-back #photoTextDisplayFront,
    .postcard-flip-container .postcard-side.postcard-back .photo-text-display-front {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: 1000 !important;
        content: none !important;
    }
    
    /* Button-Container - kompakter */
    .button-container {
        margin-top: 1rem !important;
        padding: 0.5rem !important;
    }
    
    /* Header-Buttons - sicherstellen dass sie sichtbar sind */
    .header-buttons {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 0.5rem !important;
    }
    
    /* Verhindert, dass Buttons von Container verdeckt werden */
    .header-buttons button {
        background: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .dark .header-buttons button {
        background: rgba(0, 0, 0, 0.8) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
    }
    
    /* Card - keine Höhenbegrenzung mehr (entfernt) */
    
    /* Zusätzliche iPhone-spezifische Fixes */
    body {
        -webkit-overflow-scrolling: touch !important;
        overflow-x: hidden !important;
    }
    
    /* Verhindert horizontales Scrollen */
    .postcard-container, .postcard-flip-container {
        overflow-x: hidden !important;
    }
    
    /* Kompakte Buttons für iPhone */
    .button-container {
        margin-top: 0.5rem !important;
        padding: 0.25rem !important;
    }
    
    .button-container button {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .button-container button {
        flex: 1 !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
        min-height: auto !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    /* Header-Buttons kompakter */
    .header-buttons button {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
    }
}

/* iOS-spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    /* Schritt 3: Header-Buttons sollen nicht am Viewport kleben, sondern mit der Karte scrollen */
    #step3 .header-buttons {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
    /* Step 3: Inhalt unter fixiertem Seiten-Header beginnen lassen */
    #step3 {
        padding-top: 4.5rem !important; /* Platz für #mainHeader und Buttons auf iOS */
    }

    /* Modale über alles legen, auch über Header-Buttons */
    #privacyModal, #impressumModal {
        z-index: 3000 !important;
    }
    #privacyModal .modal-content, #impressumModal .modal-content {
        position: relative !important;
        z-index: 3001 !important;
    }
    #privacyModal .close, #impressumModal .close {
        pointer-events: auto !important;
        z-index: 3002 !important;
    }

    /* Schritt 4: Gleichmäßiger weißer Rand um das Foto */
    #step4 .postcard-front {
        box-sizing: border-box !important;
        padding: 0.2rem !important; /* gleichmäßig rundum */
    }
    #step4 .postcard-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* gleichmäßiger Rand, kein Clipping unten */
        display: block !important;
    }
}

    
    /* Step 4 Desktop - reduce left/right padding like Step 3 */
    @media (min-width: 769px) {
        #step4 .postcard {
            padding: 1.5rem 0.5rem !important; /* Reduce left/right padding like Step 3 */
        }
        
        #step4 .postcard-front {
            padding: 0.2rem !important; /* Same as Step 3 */
        }
        
        #step4 .postcard-back {
            padding: 0.3rem !important; /* Same as Step 3 */
        }
    }
    
    /* Step 4 Desktop Button Container - add gap between buttons */
    #step4 .flex.justify-between {
        gap: 0.75rem !important;
    }
    
    /* Step 4 Desktop Buttons - smaller font to fit side by side */
    #step4 .btn-primary, #step4 .btn-secondary {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.7rem !important;
        white-space: nowrap !important;
    }

/* Neu: Datenschutz- und Impressum-Modale */
#privacyModal, #impressumModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0,0,0.8);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    z-index: 1500;
}
#privacyModal .modal-content, #impressumModal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 90%;
    min-width: 300px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative !important; /* Wichtig für absolute Positionierung des X-Symbols */
}

/* Spezifische Regeln für Modal-Überschriften */
#privacyModal h2, #impressumModal h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Mobile-spezifische Modal-Anpassungen */
@media (max-width: 768px) {
    #privacyModal .modal-content, #impressumModal .modal-content {
        max-width: 95%;
        min-width: 280px;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    #privacyModal h2, #impressumModal h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    /* Consent Modal Mobile Fix */
    #consentModal .modal-content {
        max-width: 95%;
        min-width: 280px;
        padding: 1.5rem;
        margin: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    #consentModal h2 {
        font-size: 1rem;
        line-height: 1.2;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* X-Symbol auf Mobile größer - einfaches × Symbol */
    #privacyModal .close, #impressumModal .close, #consentModal .close {
        font-size: 2rem !important;
        top: 1rem !important;
        right: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
.dark #privacyModal .modal-content, .dark #impressumModal .modal-content {
    background: #2d2d2d;
    color: #f5f0e7;
}
#privacyModal .close, #impressumModal .close, #consentModal .close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    cursor: pointer !important;
    font-size: 2rem !important; /* Größer für bessere Sichtbarkeit */
    color: #000000 !important;
    font-weight: bold !important;
    z-index: 1000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important; /* Sicherstellen, dass es sichtbar ist */
    background: rgba(255, 255, 255, 0.9) !important; /* Weißer Hintergrund für besseren Kontrast */
    border-radius: 50% !important; /* Runder Hintergrund */
    width: 2.5rem !important; /* Feste Breite */
    height: 2.5rem !important; /* Feste Höhe */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
}
.dark #privacyModal .close, .dark #impressumModal .close, .dark #consentModal .close {
    color: #f5f0e7;
    background: rgba(0, 0, 0, 0.8) !important; /* Dunkler Hintergrund für Dark Mode */
}

/* Hover-Effekt für Close-Button */
#privacyModal .close:hover, #impressumModal .close:hover, #consentModal .close:hover {
    background: rgba(255, 255, 255, 1) !important; /* Vollständig weißer Hintergrund beim Hover */
    transform: scale(1.1) !important; /* Leichte Vergrößerung */
}

.dark #privacyModal .close:hover, .dark #impressumModal .close:hover, .dark #consentModal .close:hover {
    background: rgba(0, 0, 0, 1) !important; /* Vollständig schwarzer Hintergrund beim Hover */
}

/* Postkarten-Design für Step 3 */
.postcard-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.postcard-flip-container {
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    height: 300px;
    position: relative;
    margin: 0 auto;
    z-index: 1 !important; /* Niedrig, Footer darüber */
    isolation: isolate !important; /* Verhindert, dass 3D Fixed-Elemente beeinflusst */
    contain: layout !important; /* Verhindert, dass 3D-Transforms den Footer beeinflussen */
}

/* Desktop spezifisch - größere Postkarte */
@media (min-width: 769px) {
    .postcard-flip-container {
        max-width: 400px;
        height: 300px;
    }
}

.postcard-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    contain: layout !important; /* Verhindert, dass 3D-Transforms den Footer beeinflussen */
}

.postcard-flip-inner.flipped {
    transform: rotateY(180deg);
    contain: layout !important; /* Verhindert, dass 3D-Transforms den Footer beeinflussen */
}

.postcard-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Safari-Fix */
    -moz-backface-visibility: hidden; /* Für ältere Firefox, falls nötig */
    transform-style: preserve-3d; /* Erhalte 3D-Kontext */
    -webkit-transform-style: preserve-3d; /* Safari */
    border: 2px solid #000000;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dark .postcard-side {
    background: #f5f5f5;
    border: 2px solid #f0ece3;
}

.postcard-front {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    box-sizing: border-box;
    position: relative;
    height: auto;
    width: 100%;
}

.postcard-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg); /* Safari-Fix */
    display: flex;
    padding: 0.3rem;
    overflow: visible;
}

.postcard-image {
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
    display: block;
    object-fit: cover;
}

.postcard-left {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    position: relative;
}

.message-area {
    flex: 1;
    position: relative;
    min-height: 80px;
    background: transparent !important;
    border: 2px solid #000000;
    border-radius: 0.5rem;
    padding: 0;
    margin-right: 0.5rem;
}

.message-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    color: #4a90e2;
    font-family: 'Caveat', cursive;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.message-textarea {
    width: 100%;
    height: 100%;
    min-height: 80px;
    border: none;
    background: transparent !important;
    padding: 0;
    font-family: 'Caveat', cursive;
    font-size: 0.9rem;
    color: #000000;
    resize: none;
    outline: none;
    line-height: 1.4;
    box-sizing: border-box;
    border-radius: 0.5rem;
}

/* Zeichenzähler für Gruß-Text */
.message-textarea:focus {
    border: 2px solid #007bff;
    background: rgba(0, 123, 255, 0.05) !important;
}

/* Warnung bei zu viel Text */
.message-textarea:invalid {
    border: 2px solid #ff6b6b;
    background: rgba(255, 107, 107, 0.05) !important;
}

/* Zeichenzähler-Anzeige */
.message-area::after {
    content: attr(data-count);
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.7rem;
    color: #666;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-area:focus-within::after {
    opacity: 1;
}

.message-textarea:focus + .message-placeholder,
.message-textarea:not(:placeholder-shown) + .message-placeholder,
.message-textarea:valid + .message-placeholder {
    opacity: 0;
}

.postcard-divider {
    width: 0;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}


.postcard-right {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    position: relative;
}

.stamp-container {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    z-index: 2;
}

.digital-stamp {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 50px;
    height: 35px;
    background: #f0ece3;
    border: 2px solid #000000;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.stamp-design {
    text-align: center;
    color: #2c1810;
}


.stamp-text {
    font-size: 0.5rem;
    font-weight: bold;
    line-height: 1;
}

.postmark {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.35rem;
    font-weight: bold;
    color: #333;
}

.postmark-text {
    line-height: 1;
}


.address-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.address-line {
    position: relative;
    margin-bottom: 0.5rem;
    height: 1.6rem;
}

.address-line-bg {
    position: absolute;
    bottom: 0.1rem;
    left: 0;
    right: 20%;
    height: 1px;
    background: #000000;
    z-index: 2;
}

/* PLZ Linie länger machen */
.address-line-small .address-line-bg {
    right: 10%;
}

/* Ort Linie kürzer machen */
.address-line-large .address-line-bg {
    right: 30%;
}

.address-line-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: -0.1rem;
}

.address-line-small {
    flex: 0 0 25%;
}

.address-line-large {
    flex: 1;
}

.address-line-input {
    border: none !important;
    background: transparent !important;
    padding: 0.2rem 0 !important;
    margin: 0 !important;
    font-size: 0.8rem;
    color: #000000;
    outline: none !important;
    font-family: 'Poppins', sans-serif;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.address-line-input::placeholder {
    color: #999999;
    font-size: 0.8rem;
}

.address-line-input:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.country-select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.8rem;
    color: #000000;
    outline: none !important;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    position: relative;
    z-index: 2;
    height: auto;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.country-select:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Dropdown nach unten öffnen */
.country-select {
    transform: translateY(0);
}

.country-select:focus {
    transform: translateY(0);
}

.country-dropdown-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 9998;
}

.country-select-display {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.75rem;
    color: #000000;
    outline: none !important;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 100%;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: flex;
    align-items: flex-end;
}

.country-dropdown {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
    background: white;
    border: 1px solid #cccccc;
    border-radius: 0.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    max-height: 200px;
    overflow: hidden;
    display: none;
    width: 300px;
    box-sizing: border-box;
    min-width: 200px;
}

.country-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ENTFERNT - Duplikat */

.country-option:hover {
    background-color: #f5f5f5;
}

.country-option:active {
    background-color: #e0e0e0;
}

.country-option:last-child {
    border-bottom: none;
}

.country-options {
    max-height: 150px;
    overflow-y: scroll;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    background: white;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Simple mobile fixes */
@media (max-width: 768px) {
    .country-options {
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        height: 150px;
        overscroll-behavior: contain;
    }
}

/* Chrome Mobile: When keyboard is open, make dropdown smaller and more scrollable */
@media (max-width: 768px) and (max-height: 500px) {
    .country-options {
        height: 120px !important;
        -webkit-overflow-scrolling: touch !important;
        overflow-y: scroll !important;
        touch-action: pan-y !important;
    }
}

/* Chrome Mobile: Force step visibility - prevent overlapping */
@media (max-width: 768px) {
    .hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        z-index: 1000 !important;
    }
    
    .fade-in {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        z-index: 1 !important;
    }
}

.country-option {
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #000000;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: white;
    display: block;
}

.country-option:hover {
    background-color: #f5f5f5;
}

.country-option:last-child {
    border-bottom: none;
}

.country-search {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    border: none !important;
    background: white !important;
    padding: 0.5rem !important;
    font-size: 0.8rem;
    color: #000000;
    outline: none !important;
    font-family: 'Poppins', sans-serif;
    border-bottom: 1px solid #cccccc !important;
    z-index: 1;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.country-search:focus {
    border-bottom-color: #4a90e2 !important;
    background: white !important;
}

.country-search::placeholder {
    color: #999999;
    font-size: 0.7rem;
}

.country-select:focus + .country-search {
    display: block;
}

/* Flip Button über den anderen Buttons */
.flip-button-above {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}



/* Mobile Responsive für Postkarten-Design */
@media (max-width: 768px) {
    .postcard-flip-container {
        max-width: 100%;
        height: 250px;
    }
    
    .postcard-front {
        padding: 0.2rem; /* Uniform 0.2rem for mobile */
    }
    
    .postcard-back {
        flex-direction: row;
        padding: 0.3rem;
        gap: 0.2rem;
    }
    
    .flip-button-above {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Step 4 Mobile - 0.2rem uniform padding */
    #step4 .postcard {
        padding: 0.2rem !important; /* 0.2rem uniform padding for mobile */
        margin-bottom: 1rem !important; /* Keep margin for button spacing */
    }
    
    #step4 .postcard-front {
        padding: 0.2rem !important; /* 0.2rem padding for mobile */
    }
    
    #step4 .postcard-back {
        padding: 0.3rem !important; /* 0.3rem padding for mobile */
    }
    
    /* Mobile: Make greeting text box smaller */
    #step4 .message-area {
        min-height: 60px !important; /* Smaller height for mobile */
        font-size: 0.7rem !important; /* Smaller text for mobile */
    }
    
    #step4 .message-textarea {
        min-height: 60px !important; /* Smaller height for mobile */
        font-size: 0.7rem !important; /* Smaller text for mobile */
    }
    
    #step4 .button-container {
        margin-top: 1rem !important;
    }
    
    
    .postcard-image {
        width: 100%;
        height: 100%;
        border-radius: 0.25rem;
        display: block;
        object-fit: cover;
    }
    
    .postcard-left {
        flex: 1.5;
        min-height: 60px;
        margin-right: 0.05rem;
    }
    
    .postcard-right {
        flex: 1;
        min-height: 180px;
    }
    
    /* .postcard-divider is already set to transparent, no mobile override needed */
    
    
    .stamp-container {
        position: static;
        align-self: flex-end;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .address-section {
        margin-top: 30px;
        gap: 0.2rem;
    }
    
    .address-line-row {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .address-line-small {
        flex: 0 0 30%;
    }
    
    .address-line-large {
        flex: 1;
    }
    
    .address-line {
        height: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .address-line-input {
        font-size: 0.75rem !important;
        padding: 0.25rem 0 !important;
    }
    
    /* Mobile: Force same font size for input text */
    @media (max-width: 768px) {
        .address-line-input {
            font-size: 0.75rem !important;
        }
        
        /* Extra specific for mobile address inputs */
        input.address-line-input {
            font-size: 0.75rem !important;
        }
        
        /* Even more specific - target all address inputs */
        .address-line input[type="text"].address-line-input {
            font-size: 0.75rem !important;
        }
        
        /* Nuclear option - target by attribute */
        input[class*="address-line-input"] {
            font-size: 0.75rem !important;
        }
    }
    
    .address-line-input::placeholder {
        font-size: 0.75rem !important;
    }
    
    .address-line-bg {
        bottom: 0.02rem;
    }
    
    /* PLZ Linie länger machen (mobile) */
    .address-line-small .address-line-bg {
        right: 10%;
    }
    
    /* Ort Linie kürzer machen (mobile) */
    .address-line-large .address-line-bg {
        right: 30%;
    }
    
    .country-dropdown {
        left: 0;
        right: 0;
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

/* Safari-spezifische Fixes ENTFERNT - verursachten Konflikte */
    
    /* Touch-Optimierungen für Mobile */
    input, textarea, select, button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Scroll-Verhalten optimieren */
    .postcard-flip-container {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Zoom bei Input-Focus verhindern */
    input[type="text"], textarea {
        font-size: 11px !important;
        text-decoration: none !important;
        text-decoration-line: none !important;
        text-decoration-style: none !important;
        text-decoration-color: transparent !important;
    }
    
    /* Grußtext behält größere Schriftgröße auf Mobile */
    #greeting {
        font-size: 1rem !important;
        text-decoration: none !important;
        text-decoration-line: none !important;
        text-decoration-style: none !important;
        text-decoration-color: transparent !important;
    }


/* Step 4 Display Elements */
.address-display {
    font-size: 0.85rem;
    color: #000000;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
    word-wrap: break-word;
}

.dark .address-display {
    color: #f5f0e7;
}

#finalGreetingDisplay {
    background: transparent !important;
    border: none !important;
    resize: none;
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: #000000;
    line-height: 1.3;
    padding: 0.5rem;
    width: 100%;
    height: 100%;
    min-height: 80px;
}

.dark #finalGreetingDisplay {
    color: #f5f0e7;
}

/* Order Summary Styling - Compact and Consistent */
.order-summary {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  margin-bottom: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 2px 0;
  border-bottom: none;
}

.summary-row:last-child {
  border-bottom: none;
  margin-bottom: 8px;
}

.summary-label {
  flex: 0 0 auto;
  font-size: 16px;
  color: #000000;
  font-weight: 600;
  min-width: 100px;
}

.summary-value {
  flex: 1;
  text-align: right;
  font-size: 16px;
  color: #000000;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/* Button in summary-value should be subtle and match other buttons */
.summary-value button {
  /* Inherit standard btn-secondary styling but more subtle */
  font-weight: 500;
  transition: transform 0.3s ease;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 0.5rem; /* Match standard button radius */
  min-width: auto;
  width: auto;
  border-width: 1px; /* Thinner border */
  opacity: 0.8; /* Slightly transparent */
}

.summary-value button:hover {
  opacity: 1; /* Full opacity on hover */
  transform: scale(1.02); /* Subtle hover effect */
}

/* Special styling for price */
.summary-row:last-child .summary-value {
  font-size: 18px;
  color: #2563eb;
  font-weight: 700;
}

/* Dark mode support */
.dark .summary-label {
  color: #e6ddd0;
}

.dark .summary-value {
  color: #e6ddd0;
}

.dark .summary-row:last-child .summary-value {
  color: #60a5fa;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .summary-row {
    gap: 12px;
    padding: 1px 0;
  }
  
  .summary-label {
    font-size: 14px;
    min-width: 80px;
  }
  
  .summary-value {
    font-size: 14px;
  }
  
  .summary-value button {
    font-size: 10px;
    padding: 1px 6px;
    opacity: 0.7; /* Even more subtle on mobile */
  }
  
  .summary-row:last-child .summary-value {
    font-size: 16px;
  }
  
  .summary-row:last-child {
    margin-bottom: 6px;
  }
}

/* Crop Mode Buttons */
.crop-mode-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.crop-mode-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #000000;
    border-radius: 0.5rem;
    background-color: #f0ece3;
    color: #000000;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 150px;
}

.crop-mode-btn:hover {
    background-color: #f0ece3;
    color: #000000;
    transform: scale(1.05);
}

.crop-mode-btn.active {
    background-color: #000000;
    border-color: #000000;
    color: #f0ece3;
}

.crop-mode-btn.active:hover {
    background-color: #333333;
    border-color: #333333;
    color: #f0ece3;
}

/* Dark mode styles */
.dark .crop-mode-btn {
    background-color: #2d2d2d;
    border-color: #f0ece3;
    color: #f5f0e7;
}

.dark .crop-mode-btn:hover {
    background-color: #3a3a3a;
    border-color: #f0ece3;
    color: #f5f0e7;
}

.dark .crop-mode-btn.active {
    background-color: #f0ece3;
    border-color: #f0ece3;
    color: #000000;
}

.dark .crop-mode-btn.active:hover {
    background-color: #f0ece3;
    border-color: #f0ece3;
    color: #000000;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .crop-mode-buttons {
        gap: 0.25rem;
    }
    
    .crop-mode-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        max-width: 140px;
    }
}

