/* Grundlegende Stile für Mario-Shop */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.7s ease; /* Universeller Slow-Motion-Effekt */
}

body {
    background-color: #f8f9fa;
    animation: pageLoad 1.2s ease-out;
}

@keyframes pageLoad {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    transform: translateZ(0); /* Hardware-Beschleunigung */
    transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Header und Navigation */
header {
    background-color: #000000;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: headerShine 10s linear infinite;
}

@keyframes headerShine {
    from { transform: translateX(-100%) rotate(30deg); }
    to { transform: translateX(100%) rotate(30deg); }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    z-index: 1002; /* Über dem Menü */
}

.logo span {
    color: #fbfbfb; /* Blauer Akzent wie im Beispiel */
}

.logo:hover {
    transform: scale(1.1) rotate(2deg);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Desktop Navigation */
.desktop-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
}

.desktop-navigation a {
    color: #9370DB;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    margin: 0 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.desktop-navigation a:hover {
    color: #fff;
    background-color: rgba(147, 112, 219, 0.2);
}

.desktop-navigation a:last-child {
    margin-right: 0;
}

/* Aktive Navigation Link */
.desktop-navigation a.active {
    color: #fff;
    background-color: rgba(147, 112, 219, 0.4);
}

/* Mobile Menü */
.hamburger-button {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-content a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-content a:hover {
    transform: translateY(-3px);
    color: #9370DB;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .desktop-navigation {
        display: none;
    }
    
    .hamburger-button {
        display: block;
    }
}

/* Button Styles */
button {
    background-color: #000000;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #333333;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Wasserwellen-Effekt für Buttons */
button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 1.2s, opacity 1s;
}

button:active::after {
    transform: scale(0, 0);
    opacity: 0.5;
    transition: 0s;
}

.secondary-button {
    background-color: #555555;
}

.secondary-button:hover {
    background-color: #333333;
}

/* Hauptbereich */
.main {
    padding: 2rem 0;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p,
.footer-section a {
    color: #bbb;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.5s ease;
}

.footer-section a {
    position: relative;
    display: inline-block;
}

.footer-section a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform-origin: bottom right;
    transition: transform 0.5s ease;
}

.footer-section a:hover {
    color: white;
    transform: translateX(8px);
}

.footer-section a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #444;
    color: #bbb;
}

/* Animationen für Seitenübergänge */
.fade-out {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    pointer-events: none;
}

.fade-in {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInPage 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design für kleine Bildschirme */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .desktop-navigation {
        flex-direction: column;
    }
}

/* Kategorie-Karten */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.8s ease,
                background-color 0.8s ease;
    cursor: pointer;
    animation: float 6s ease-in-out infinite;
    animation-play-state: paused;
    opacity: 0;
    animation: fadeIn 1s forwards;
    animation-delay: calc(0.15s * var(--card-index, 0));
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.category-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    animation-play-state: running;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.category-image {
    height: 160px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-image img {
    max-width: 100%;
    max-height: 100%;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.category-card:hover .category-image img {
    transform: scale(1.15) rotate(2deg);
}

.category-info {
    padding: 1rem;
    text-align: center;
}

.category-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.category-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Warenkorb-Button (schwebend) */
.cart-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #000000;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
}

.cart-button:hover {
    background-color: #333333;
    transform: scale(1.2) rotate(15deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation-play-state: paused;
}

/* Authentifizierungstabs */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
    gap: 1rem;
}

.auth-tab {
    padding: 0.8rem 1.5rem;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background-color: #000000;
    color: white;
}

.auth-tab:hover:not(.active) {
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .auth-tabs {
        flex-direction: column;
        width: 90%;
        margin: 2rem auto;
    }
    
    .auth-tab {
        width: 100%;
    }
}

/* Anmelde- und Registrierungsformulare */
.auth-section {
    background-color: #f0f0f0;
    padding: 2rem 0;
    margin: 2rem 0;
    border-radius: 8px;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    animation: fadeIn 0.8s ease;
}

.auth-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #000000;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.8s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s forwards;
}

.auth-form::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    transition: all 1.5s ease;
}

.auth-form:hover::before {
    top: 100%;
    left: 100%;
}

.auth-form:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
    transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
                transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s forwards;
    animation-delay: calc(0.1s * var(--form-index, 0));
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    transition: all 0.5s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    outline: none;
    transform: scale(1.02);
}

/* Animation für Formularfelder beim Laden */
.auth-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.auth-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.auth-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.auth-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.auth-form .form-group:nth-child(5) { animation-delay: 0.5s; }
.auth-form .form-group:nth-child(6) { animation-delay: 0.6s; }
.auth-form .form-group:nth-child(7) { animation-delay: 0.7s; }
.auth-form .form-group:nth-child(8) { animation-delay: 0.8s; }
.auth-form .form-group:nth-child(9) { animation-delay: 0.9s; }
.auth-form button { 
    animation-delay: 1s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
    animation-delay: 1s;
}

/* Adressdetails */
.address-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.address-number,
.address-zip {
    flex: 1;
    min-width: 120px;
}

#map-container {
    margin-top: 0.5rem;
}

#map {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: #f5f5f5;
}