* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #100F0F;
    }
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container.expanded {
    transform: scale(20) translateY(60px);
}

.logo-container.expanded .logo {
    opacity: 0;
    transition: opacity 0.3s ease 0.6s; /* Fade after 0.6s delay */
}

.logo {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    transition: filter 0.3s ease;
}

/* Invert logo colors in dark mode */
@media (prefers-color-scheme: dark) {
    .logo {
        filter: invert(1);
    }
}

/* Impressum content styling */
.impressum-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.impressum-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.impressum-text {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.impressum-logo {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    margin-bottom: 15px;
    filter: none; /* Ensure no inversion in light mode */
}

.impressum-text p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
    margin: 4px 0;
}

.impressum-text p strong {
    color: #100F0F;
    font-weight: 500;
}

/* Override Safari's automatic phone number link styling */
.impressum-text a[href^="tel:"] {
    color: inherit !important;
    text-decoration: none !important;
}

.impressum-text a[href^="tel:"]:hover {
    text-decoration: none !important;
}

/* Override Safari's automatic phone number detection */
.impressum-text {
    -webkit-text-size-adjust: 100%;
    -webkit-touch-callout: none;
}

.impressum-text p {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


.back-button {
    margin-top: 20px;
    padding: 8px 16px;
    background: #100F0F;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.back-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 15, 15, 0.3);
}

/* Dark mode for impressum content */
@media (prefers-color-scheme: dark) {
    .impressum-logo {
        filter: invert(1);
    }
    
    .impressum-text p {
        color: #cccccc;
    }
    
    .impressum-text p strong {
        color: #ffffff;
    }
    
    .impressum-text a[href^="tel:"] {
        color: inherit !important;
    }
    
    
    .back-button {
        background: #ffffff;
        color: #100F0F;
    }
    
    .back-button:hover {
        background: #f0f0f0;
    }
}

.impressum {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom) + 20px);
    right: max(20px, env(safe-area-inset-right));
    z-index: 5;
}

.impressum-link {
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    transition: color 0.3s ease;
}

.impressum-link:hover {
    color: #333333;
}

/* Dark mode text colors */
@media (prefers-color-scheme: dark) {
    .impressum-link {
        color: #999999;
    }
    
    .impressum-link:hover {
        color: #cccccc;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .logo {
        max-width: 300px;
        max-height: 300px;
    }
    
    .impressum {
        bottom: max(15px, env(safe-area-inset-bottom) + 40px);
        right: 15px;
    }
    
    .impressum-link {
        font-size: 12px;
    }
    
    
    /* Disable scrolling on mobile when impressum is open */
    body.impressum-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 250px;
        max-height: 250px;
    }
    
    .impressum {
        bottom: 10px;
        right: 10px;
    }
}
