body {
    background: url('<?php echo $bg_final; ?>') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Hauptcontainer für den oberen Bereich */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative; /* ensure main-content is a positioned ancestor for absolute children */
}

/* Container - zentriert, kein negativer Margin mehr */
.container-fluid {
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Row - zentriert ausrichten */
.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
    gap: 0;
}

/* Columns - zentriert */
.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Branding links - mit Schutz vor Textüberlauf */
.brand-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 30px 45px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* make box wider so title and logo can sit side by side */
    width: 600px;
    max-width: 90%; /* responsive cap */
    min-width: 280px;
    /* Minimale Breite für kleine Bildschirme */
    margin: 0;
    box-sizing: border-box;
    /* allow height to expand when text wraps */
    overflow: visible;
    /* previously overflow:hidden which truncated wrapped lines */
}

/* new header for brand with logo */
.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: nowrap; /* prevent logo and text from stacking */
}

.brand-logo {
    max-width: 130px;
    height: auto;
    display: block;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    line-height: 1.2;
    /* allow wrapping instead of truncating */
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-word;
}

.brand-slogan {
    font-size: 1.2rem;
    color: white;
    line-height: 1.4;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-word;
}

.brand-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-word;
}

/* Store Buttons Container */
.store-buttons-wrapper {
    margin-top: 15px;
    width: 480px;
    min-width: 280px;
    max-width: 480px;
    box-sizing: border-box;
}

/* Hidden class for elements we want to hide */
.hidden {
    display: none !important;
}

/* Store Buttons */
.store-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #97cda4 0%, #76b18e 100%);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
    width: auto;
    min-width: 160px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.store-button i {
    font-size: 24px;
}

.button-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.button-text span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.store-button:hover {
    background: linear-gradient(135deg, #76b18e 0%, #5b8d70 100%);
    border-color: #76b18e;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(173, 223, 158, 0.2);
}

.store-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Login Container */
.login-container {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    width: 380px;
    max-width: 380px;
    min-width: 280px;
    margin: 0;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    overflow: visible; /* allow the container to grow with its content */
}

.login-container h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

.login-container p {
    font-size: 0.95rem;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

/* Container für die linke Spalte */
.left-column-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Container für die rechte Spalte */
.right-column-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Desktop-spezifische Ausrichtung - ZENTRIERT */
@media (min-width: 992px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        display: flex;
        justify-content: center;
    }

    .left-column-container {
        align-items: center;
        justify-content: center;
        padding-right: 10px; /* Minimaler Abstand */
    }

    .right-column-container {
        align-items: center;
        justify-content: center;
        padding-left: 10px; /* Minimaler Abstand */
        margin-left: 0; /* Negativen Margin entfernt */
    }

    .desktop-gap {
        margin-right: 0 !important;
    }

    .row {
        gap: 0 !important;
        justify-content: center;
    }

    .g-lg-5 {
        --bs-gutter-x: 0 !important;
    }
}

/* Für sehr große Bildschirme - alles zentriert lassen */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1300px;
    }
    
    .left-column-container {
        padding-right: 20px;
    }
    
    .right-column-container {
        padding-left: 20px;
    }
}

/* Responsive Anpassungen - mit Textschutz */
@media (max-width: 991px) {
    .container-fluid {
        margin-left: 0;
    }

    .right-column-container {
        margin-left: 0;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }

    .col-md-6:last-child {
        margin-bottom: 0;
    }

    .left-column-container,
    .right-column-container {
        align-items: center;
        padding: 0;
        margin: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .brand-section,
    .store-buttons-wrapper,
    .login-container {
        margin-left: auto;
        margin-right: auto;
    }

    .store-buttons {
        justify-content: center;
    }

    /* Verhindere Textüberlauf auf Tablets */
    .brand-section {
        width: 90%;
        max-width: 480px;
        min-width: auto;
        padding: 25px 30px;
    }

    .brand-title {
        font-size: 2.2rem;
    }

    .brand-slogan {
        font-size: 1.1rem;
    }

    .brand-description {
        font-size: 0.95rem;
    }

    .store-buttons-wrapper {
        width: 90%;
        max-width: 480px;
        min-width: auto;
    }

    .login-container {
        width: 90%;
        max-width: 380px;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .container-fluid {
        margin-left: 0;
        padding: 0 10px;
    }

    .brand-section {
        width: 100%;
        max-width: 450px;
        padding: 20px 25px;
        margin: 0 auto;
    }

    .brand-title {
        font-size: 2rem;
        white-space: normal;
    }

    .brand-slogan {
        font-size: 1rem;
        white-space: normal;
    }

    .brand-description {
        font-size: 0.9rem;
        white-space: normal;
    }

    .store-buttons-wrapper {
        width: 100%;
        max-width: 450px;
        margin: 15px auto 0;
    }

    .store-button {
        min-width: 140px;
        padding: 8px 14px;
    }

    .login-container {
        width: 100%;
        max-width: 380px;
        padding: 20px;
        margin: 0 auto;
    }

    .login-container h2 {
        font-size: 1.6rem;
        white-space: normal;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        margin-left: 0;
        padding: 0 10px;
    }

    .brand-section {
        padding: 15px 20px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .brand-slogan {
        font-size: 0.95rem;
    }

    .brand-description {
        font-size: 0.85rem;
    }

    .store-button {
        min-width: 130px;
        padding: 8px 12px;
        gap: 6px;
    }

    .store-button i {
        font-size: 20px;
    }

    .button-text span {
        font-size: 12px;
    }

    .login-container {
        padding: 15px;
    }

    .login-container h2 {
        font-size: 1.5rem;
    }

    .login-container p {
        font-size: 0.9rem;
    }

    .store-buttons {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.6rem;
    }

    .brand-slogan {
        font-size: 0.9rem;
    }

    .brand-description {
        font-size: 0.8rem;
    }

    .store-button {
        min-width: 120px;
        padding: 6px 10px;
    }

    .store-button i {
        font-size: 18px;
    }

    .button-text span {
        font-size: 11px;
    }

    .login-container h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 380px) {
    .container-fluid {
        padding: 0 8px;
    }

    .brand-section {
        padding: 12px 15px;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .brand-slogan {
        font-size: 0.85rem;
    }

    .brand-description {
        font-size: 0.75rem;
    }

    .store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .store-button {
        width: 100%;
        max-width: 220px;
        justify-content: center;
        min-width: unset;
    }

    .login-container {
        padding: 12px;
    }

    .login-container h2 {
        font-size: 1.2rem;
    }

    .login-container p {
        font-size: 0.8rem;
    }

    .login-container input[type="email"],
    .login-container input[type="password"] {
        padding: 8px 10px;
        font-size: 14px;
    }

    .remember {
        font-size: 12px;
    }

    input[type="submit"] {
        padding: 8px;
        font-size: 14px;
    }
}

/* Screenshots Bereich */
.screenshots-wrapper {
    width: 100%;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.screenshots-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.screenshots-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.screenshots-info {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 350;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    padding: 0 15px;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.platform-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 30px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.platform-header i {
    font-size: 32px;
    color: white;
}

.platform-header h3 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: transparent;
    flex: 1;
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.screenshot-card {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: transparent;
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}

.slide-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.nav-dot.active {
    background: #97cda4;
    transform: scale(1.2);
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.privacy-box {
    background: white;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    border-radius: 12px;
    text-align: center;
    box-sizing: border-box;
}

.privacy-text {
    color: #000 !important;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    margin-bottom: 20px;
}

.privacy-buttons button {
    padding: 12px 20px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.accept-btn {
    background: #97cda4;
    color: white;
}

.reject-btn {
    background: #dc3545;
    color: white;
}

.privacy-box p {
    color: #000 !important;
}

.privacy-box h2 {
    color: #dc3545 !important;
}

/* Gemeinsames Design für Email-Input und Passwort-Gruppe */
.login-container input[type="email"],
.input-group {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.login-container input[type="email"]:focus,
.input-group:focus-within {
    border-color: #97cda4;
    background: #fff;
}

.login-container input {
    color: #333 !important;
    font-size: 16px;
    padding: 12px 15px;
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    align-items: center;
    padding: 0;
}

.input-group input {
    flex: 1;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: #444;
    padding: 0 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.remember {
    /* reset previous font-size/margin from responsive section above */
    text-align: left;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px; /* space between checkbox and text */
    color: #fff; /* label color stays white for contrast */
    position: relative;
    font-size: 14px;
}

/* hide native checkbox and build custom slider */
.remember .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.remember .form-check-label {
    position: relative;
    padding-left: 50px; /* space for the switch */
    cursor: pointer;
    user-select: none;
}

.remember .form-check-label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: background 0.3s;
}

.remember .form-check-label:after {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

/* checked state styling */
.remember .form-check-input:checked + .form-check-label:before {
    background: #97cda4;
}

.remember .form-check-input:checked + .form-check-label:after {
    transform: translate(24px, -50%);
}

/* override width rule from earlier small-screen section if present */
.remember input {
    width: auto !important;
    margin: 0; /* reset any default margins */
}

input[type="submit"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #97cda4; /* already green, keep */
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

input[type="submit"]:hover {
    background: #76b18e; /* slightly darker green */
    transform: translateY(-1px);
}

.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #ffcccc;
}

a {
    color: rgb(187, 190, 190);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.datenschutz-link {
    margin-top: 25px;
    font-size: 14px;
    opacity: 0.8;
    text-align: center;
}

/* additional adjustments for the login form now using bootstrap classes */
.login-container form {
    width: 100%;
}

.login-container .form-control {
    /* keep previous custom look but co‑exist with bootstrap */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 10px;
    padding: 12px 15px;
    color: #333;
    box-sizing: border-box;
}

.login-container .form-control:focus {
    box-shadow: none;
    border-color: #97cda4;
    background: #fff;
}

.login-container .form-check {
    margin-bottom: 15px;
}

/* move Datenschutz link a little closer to the form */
.login-container .datenschutz-link {
    margin-top: 15px;
}

/* reduce margin of the registration prompt when the form is tight */
.login-container p {
    margin-bottom: 15px;
}

/* Responsive Anpassungen für Screenshots */
@media (max-width: 1200px) {
    .slideshow-container {
        max-width: 260px;
    }
}

@media (max-width: 992px) {
    .platform-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .screenshots-wrapper {
        padding: 40px 20px;
    }

    .screenshots-title {
        font-size: 1.8rem;
    }

    .screenshots-info {
        font-size: 1.1rem;
    }

    .slideshow-container {
        max-width: 280px;
    }

    .platform-box {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .screenshots-wrapper {
        padding: 40px 15px;
    }

    .screenshots-title {
        font-size: 1.8rem;
    }

    .screenshots-info {
        font-size: 1rem;
    }

    .platform-header h3 {
        font-size: 1.5rem;
    }

    .slideshow-container {
        max-width: 260px;
    }
}