body {
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    font-family: "Segoe UI", Roboto, sans-serif;
    touch-action: pan-x pan-y;
}

#quote-container {
    height: 100vh; /* Where the container starts, for longer verses*/
    position: relative;
    overflow: hidden;
}

.quote-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: white;
    cursor: pointer;
}

.quote-card.dragging {
    transition: none;
}

.quote-card:not(.dragging) {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-in-out;
}

#current-card {
    opacity: 1;
    transform: translate(-50%, -50%);
}

#next-card {
    opacity: 0;
    transform: translate(-50%, 100%);
}

.quote-card.sliding-out {
    transform: translate(-50%, -150%);
    opacity: 0;
}

.quote-card.sliding-in {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.quote-text {
    font-size: 1.4em;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    margin: 0;
}

.detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.detail-view.active {
    display: block;
}

.detail-content {
    padding: 60px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 50px;
}

#back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #007aff;
    pointer-events: auto;
}

#detail-quote {
    font-size: 1.8em;
    border-left: 5px solid #007aff;
    margin: 20px 0;
    padding-left: 20px;
}

.story-text {
    font-size: 1.2em;
    line-height: 1.8;
    color: #555;
    margin: 30px 0;
}

#share-button {
    background-color: #007aff; /* Apple-like blue */
        top: 20px; /* Adjust based on spacing */
        right: 20px;
        z-index: 1001;
        position: fixed;
        pointer-events: auto;
}

#share-button:hover {
    background-color: #0051a8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.navigation-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#next-quote-btn {
    background-color: #007aff; /* Apple-like blue */
    transition: transform 0.2s ease;
/*    pointer-events: auto;*/
    border: none;
    padding: 12px 64px;
    border-radius: 980px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#next-quote-btn:hover {
    transform: translateY(-5px);
    transform: scale(1.02);
}

#next-quote-btn:active {
    transform: scale(0.98);
    background: #0062C3;
  }

  #next-quote-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1);
    transition: 0.5s;
  }

  #next-quote-btn:active::after {
    transform: scale(20);
    opacity: 0;
    transition: 0s;
  }

.navigation-controls span {
    color: #777;
    font-size: 9px;
    animation: fadeOut 10s forwards; /* Animation hinzufügen */
}

.navigation-controls i {
    font-size: 30px;
}

/* Add key press animation */
.key-pressed {
    animation: keyPress 0.1s ease;
}

@keyframes keyPress {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.top-buttons {
        position: relative;
        height: 0; /* Ensures the buttons do not affect the layout flow */
        pointer-events: auto;
}

#left-button {
        visibility: visible; 
        background-color: #007aff; /* Apple-like blue */
        position: absolute;
        top: 20px; /* Adjust based on spacing */
        left: 20px;
        z-index: 1000;
        position: fixed;
        pointer-events: auto;
}

#right-button {
        background-color: #007aff; /* Apple-like blue */
        position: absolute;
        top: 20px; /* Adjust based on spacing */
        right: 20px;
        z-index: 1000;
        position: fixed;
}

.switch {
    position: fixed;
    top: 39px; /* Adjust based on spacing */
    left: 49%;
    transform: translateX(-50%);
    z-index: 1000;
    display: inline-block;
}

.switch label {
    font-size: 15px; /* Larger text */
    color: #007aff;
}

.switch label input[type=checkbox]:checked + .lever {
    background-color: #f0f0f0; /* Default color */
}
  
.switch label input[type=checkbox]:checked + .lever:after {
    background-color: #007aff; /* Thumb color when checked */
}

#refresh-btn {
        background-color: #007aff; /* Apple-like blue */
        position: absolute;
        top: 20px; /* Adjust based on spacing */
        right: 20px;
        z-index: 1000;
        position: fixed;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: Arial, sans-serif;
    flex-direction: column;
}

.finger {
    width: 40px;
    height: 60px;
    margin-bottom: 30px;
    background: white;
    border-radius: 20px;
    position: relative;
    animation: moveFinger 1.5s infinite;
}

.finger::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: black;
    border-radius: 50%;
}

@keyframes moveFinger {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
    100% {
        transform: translateY(0);
    }
}

#overlay-text {
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone {
    position: relative;
    width: 60px;
    height: 100px;
    background: #f1f1f1;
    border: 2px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

.box {
    position: absolute;
    width: 80%;
    height: 30%;
    background: #ddd;
    border-radius: 8px;
    left: 10%;
    animation: slide 2s infinite linear;
}

@keyframes slide {
    0% {
        top: 50%; /* Startet in der Mitte */
        transform: translateY(-50%); /* Zentriert die Box vertikal */
    }
    100% {
        top: -30%; /* Fliegt nach oben aus dem Bild */
    }
} 

#quotes-view {
    display: none; /* Initially hidden */
    background-color: #f5f5f5; /* Matches the site's background */
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}

#quotes-view.active {
    display: block; /* Display when active */
}

#search-bar {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 17px; /* Sicherstellen, dass die Schriftgröße mindestens 16px ist */
    outline: none; /* Optional: Verhindert zusätzliche Rahmen beim Fokus */
}

#quotes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#quotes-list li {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    cursor: pointer;
    color: #333;
    background-color: #ffffff; /* Light gray for contrast */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 8px; /* Smooth corners */
    margin-bottom: 10px; /* Space between items */
}

#quotes-list li:hover {
    background-color: #0051a8; 
    color: white;
}

#back-to-main {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #007aff; /* Matches site theme */
}

@media (max-width: 768px) {
    #quotes-view {
        padding: 10px; /* Reduce padding for smaller screens */
    }

    #search-bar {
        font-size: 14px; /* Adjust font size for mobile */
    }

    #quotes-list li {
        padding: 10px; /* Reduce padding for mobile */
        font-size: 14px; /* Adjust text size */
    }

}

search-icon {
    position: relative;
  }
  
  search-icon:before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    background-color: #555;
    bottom: 0;
    width: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill-rule='evenodd'%3E%3Cpath d='M16.036 18.455l2.404-2.405 5.586 5.587-2.404 2.404zM8.5 2C12.1 2 15 4.9 15 8.5S12.1 15 8.5 15 2 12.1 2 8.5 4.9 2 8.5 2zm0-2C3.8 0 0 3.8 0 8.5S3.8 17 8.5 17 17 13.2 17 8.5 13.2 0 8.5 0zM15 16a1 1 0 1 1 2 0 1 1 0 1 1-2 0'%3E%3C/path%3E%3C/svg%3E") center / contain no-repeat;
  }

  .save-highlight-btn {
    background: #007aff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Abstand zwischen Icon und Text */
    font-size: 14px;
    margin: 10px 0;
}

.save-highlight-btn:hover {
    background: #0051a8;
}

.save-highlight-btn:focus {
    background-color: #0051a8;
}

.material-icons {
    font-size: 18px; /* Größe des Icons */
    vertical-align: middle;
}

#success-message {
    position: fixed;
    top: 7%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4caf50; /* Grüner Hintergrund für Erfolg */
    color: white;
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: none; /* Standardmäßig ausgeblendet */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#success-message .material-icons {
    margin-right: 10px;
    font-size: 2rem;
}

#failed-message {
    position: fixed;
    top: 7%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #d01010; /* Grüner Hintergrund für Erfolg */
    color: white;
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: none; /* Standardmäßig ausgeblendet */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#failed-message .material-icons {
    margin-right: 10px;
    font-size: 2rem;
}

p{
    font-size: 16px;
    color: #333;
}

#update-message {
    display: none;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
  }

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212121;
    }
    .quote-card {
        background: #171717;
        box-shadow: 0 2px 5px #000;
    }
    #quotes-view {
        background-color: #212121;
    }
    .flow-text {
        color: #f5f5f5;
    }
    .story-text {
        color: #f5f5f5;
    }
    #loading {
        background-color: #212121;
    }
    .quote-text {
        color: #f5f5f5;
    }
    #quotes-list li {
        background-color: #171717;
        color: #f5f5f5;
    }
    #search-bar {
        background-color: #000;
        color: #f5f5f5;
    }
    .detail-view {
        background-color: #212121;
    }
    .phone {
        background: #000;
        border: 2px solid #211e1e;
    }
    .box {
        background: #171717;
    }
    search-icon:before {
        background: url("data:image/svg+xml,%3Csvg+xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27+width%3D%2725%27+height%3D%2725%27+viewBox%3D%270+0+25+25%27+fill-rule%3D%27evenodd%27%3E%0D%0A++%3Cpath+d%3D%27M16.036+18.455l2.404-2.405+5.586+5.587-2.404+2.404zM8.5+2C12.1+2+15+4.9+15+8.5S12.1+15+8.5+15+2+12.1+2+8.5+4.9+2+8.5+2zm0-2C3.8+0+0+3.8+0+8.5S3.8+17+8.5+17+17+13.2+17+8.5+13.2+0+8.5+0zM15+16a1+1+0+1+1+2+0+1+1+0+1+1-2+0%27+fill%3D%27white%27%3E%3C%2Fpath%3E%0D%0A%3C%2Fsvg%3E%0D%0A") center / contain no-repeat;
    }
    p{
        font-size: 16px;
        color: #f5f5f5;
    }
}