*,
::before,
::after {
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    /* Standardschrift */
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110vh;
    color: #333;
    position: relative;
}

.background {
    position: fixed;
    background: linear-gradient(135deg, #2A363B, #58637B);
    height: 100vh;
    width: 100%;
    top: 0;
    left: 0;
    
}

.header {
    position: fixed;
    top: 20px; /* Abstand zum oberen Rand */
    left: 50%;
    transform: translateX(-50%);
    width: 90%; /* Breite der Pille */
    max-width: 800px;
    height: 60px; /* Höhe der Pille */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(90deg, #f3f4f688, #e6e9f088);
    border-radius: 30px; /* Runde Ecken, um die Pille zu formen */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid #ddd;
    backdrop-filter: blur(10px);
  }
  
  .logo {
    width:30px; height:auto;
  }
  
  .reload-btn {
    background-color: #212121;    
    font-family: "Rubik", sans-serif;
    color: #fff;
    border: 1px solid rgb(84, 84, 84);
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .reload-btn:hover {
    background-color: #357ABD;
  }
  
  main {
    padding-top: 120px; /* Platz schaffen für den fixierten Header */
  }

.polaroid_container {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    margin: 100px 50px;
    max-width: 900px;
    padding-bottom: 400px;
}
.polaroid {
    background: #fff;
    width: 300px;
    padding: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    border: 4px solid #fff;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    transition: all 0.8s ease;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;  /* Für weiche 3D-Übergänge */
  }
  
  .polaroid::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    filter: blur(7px);
    border-radius: 50%;
    z-index: -1;
  }
  
/* Neue Styles für die animierte Anzeige der neuen Polaroid-Container */
.polaroid.placeholder {
    opacity: 0;
    transform: translateY(30px);
}
.polaroid.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Rotation für jede Karte */
.polaroid_container .polaroid:nth-child(1) {
    transform: rotate(2deg) translateX(-20px);
  }
  
  .polaroid_container .polaroid:nth-child(2) {
    transform: rotate(-1deg) translateX(30px);
  }
  
  .polaroid_container .polaroid:nth-child(3) {
    transform: rotate(3deg) translateX(-40px);
  }
  
  .polaroid_container .polaroid:nth-child(4) {
    transform: rotate(-4deg);
  }

  .quote-container {
    background: linear-gradient(135deg, #2A363B, #535f7a); /* Linearer Verlauf */
    width: 100%;
    aspect-ratio: 2 / 1.4; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 2px;
    box-sizing: border-box;
    padding: 20px;
    position: relative;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.6); /* Innerer Schatten */

  }
  
  .quote {
    font-size: 24px;
    width: calc(100% - 32px);
    text-align: center;
    position: absolute;
    font-family: "Boogaloo", cursive;
    font-weight: 400;
    font-style: normal;
    /*transition: transform 0.8s ease;*/
    transform-style: preserve-3d;
  }
  
  .author {
    font-size: 16px;
    color: gray;
    font-weight: 100;
    margin-top: 15px;
  }

/* Entferne alte Skeleton-Styles */
/* Neue Styles für den Ladebalken mit clip-path-Animation */
#loading-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, rgba(81,224,81,1) 0%, rgba(41,168,8,1) 38%, rgba(7,7,116,1) 62%, rgba(0,212,255,1) 100%);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.5s ease;
    opacity: 0;
    z-index: 1000;
}

/* Neue Styles für die Lade-Nachricht */
#loading-message {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #111;
    background: linear-gradient(90deg, #f3f4f688, #e6e9f088);
    padding: 5px 10px;
    border-radius: 30px; /* Runde Ecken, um die Pille zu formen */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid #ddd;
    backdrop-filter: blur(10px);
}

/* Neue Styles für den Infotext im Header */
.header .info {
    text-align: right;
    margin-left: auto;
    line-height: 1.2;
}
.header .info .main-info {
    font-size: 16px;
    font-weight: bold;
    color: #111;
}
.header .info .sub-info {
    font-size: 12px;
    color: #555;
}

/* Toggle Switch Styles */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 100px;
	height: 34px;
    margin-left: 20px;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ddd;
	transition: 0.4s;
	border-radius: 34px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 4px;
	bottom: 4px;
	background-color: #111;
	transition: 0.4s;
	border-radius: 50%;
}

.toggle-labels {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px;
	pointer-events: none;
	color: #111;
	font-size: 12px;
	font-weight: bold;
}

.toggle-switch input:checked + .toggle-slider {
	background-color: #535f7a;
}

.toggle-switch input:checked + .toggle-slider .toggle-labels span {
  color: #fff;
}

.toggle-switch input:checked + .toggle-slider:before {
	transform: translateX(66px);
  background-color: #fff;
}

/* Fügt weiche Übergänge auf den Label-Texten hinzu */
.toggle-labels span {
	transition: 0.3s ease;
}

/* Wenn der Swich aktiv ist (Zufall ausgewählt), blendet den rechten Text (Neueste) aus */
.toggle-switch input:checked + .toggle-slider .toggle-labels span:nth-child(2) {
	opacity: 0;
}

/* Wenn der Switch inaktiv ist (Neueste ausgewählt), blendet den linken Text (Zufall) aus */
.toggle-switch input:not(:checked) + .toggle-slider .toggle-labels span:nth-child(1) {
	opacity: 0;
}

@media (min-width: 1024px) {
    .polaroid_container {
        max-width: 1060px;
        margin: 100px auto;
    }
}