/* 1. LAYOUT & MODERN MESH BACKGROUND */
body {
    margin: 0; padding: 0;
    display: flex; justify-content: center; align-items: center;
    height: 100vh;
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    background-color: #0a0a2e;
    background-image:
        radial-gradient(at 46% 21%, rgba(28, 21, 229, 0.7) 0px, transparent 50%),
        radial-gradient(at 93% 53%, rgba(95, 12, 154, 0.7) 0px, transparent 50%),
        radial-gradient(at 6% 76%, rgba(186, 73, 212, 0.7) 0px, transparent 50%),
        radial-gradient(at 63% 17%, rgba(200, 20, 110, 0.7) 0px, transparent 50%),
        radial-gradient(at 6% 94%, rgba(255, 72, 237, 0.7) 0px, transparent 50%),
        radial-gradient(at 13% 75%, rgba(50, 230, 218, 0.7) 0px, transparent 50%),
        radial-gradient(at 93% 50%, rgba(41, 181, 250, 0.7) 0px, transparent 50%);
    background-size: 150% 150%;
    animation: gradient-flow 18s ease infinite alternate;
    overflow: hidden;
    color: white;
}

/* 2. TYPOGRAFIE */
h1, #detailTitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 3.2rem;
    margin: 0 0 10px 0;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

p, .bottom-centered { 
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 1rem; 
    margin-bottom: 40px; 
    letter-spacing: 4px;
    opacity: 0.6; 
    text-transform: uppercase;
}

#detailDesc {
    font-family: 'Satoshi', sans-serif;
    text-transform: none;
    opacity: 0.8;
    line-height: 1.6;
    letter-spacing: 0;
}

/* 3. SCENE & CARDS */
.scene {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.card, .detail-card {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 330px;
    overflow: hidden;
    transition: all 0.5s ease;
}

.card { animation: float 6s ease-in-out infinite; }

.card::before {
    content: "";
    position: absolute;
    top: -50%; left: -150%;
    width: 100%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: card-shine 8s infinite;
}

.detail-card {
    position: absolute;
    display: none;
    opacity: 0;
    transform: scale(0.8);
    z-index: 110;
    max-width: 500px;
}

.detail-card.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* 4. SUB-KACHELN */
.sub-card {
    position: absolute;
    z-index: 50;
    width: 155px;
    height: 130px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translate(0, 0) scale(0.2);
    cursor: pointer;
    color: white;
}

.sub-card.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(calc(cos(var(--angle)) * 42vmin), calc(sin(var(--angle)) * 42vmin)) scale(1);
}

.sub-card span { 
    font-family: 'Satoshi', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 0 10px;
}

.sub-card i { 
    font-size: 2rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.sub-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    transform: translate(calc(cos(var(--angle)) * 42vmin), calc(sin(var(--angle)) * 42vmin)) scale(1.05);
}

/* 5. GLOW & ANIMATIONS */
.celebrate-active {
    animation: jelly 0.6s both !important;
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6), 
        0 0 60px rgba(255, 255, 255, 0.3), 
        0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

.connection-path {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    z-index: 80;
    transform-origin: left center;
    width: 0; opacity: 0;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
}

/* 6. BUTTONS */
.btn, .back-btn {
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
}

.btn {
    position: relative; overflow: hidden;
    border: 2px solid white; padding: 16px 45px; border-radius: 50px;
    background: transparent; color: white; transition: 0.3s;
}

.btn:hover { background: rgba(255, 255, 255, 0.1); }

.back-btn { margin-top: 20px; border: none; background: none; color: white; opacity: 0.6; }
.back-btn:hover { opacity: 1; }

/* 7. KEYFRAMES */
@keyframes gradient-flow { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes card-shine { 0% { left: -150%; } 20% { left: 150%; } 100% { left: 150%; } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
@keyframes jelly {
    0% { transform: scale(1, 1); }
    30% { transform: scale(1.08, 0.92); }
    40% { transform: scale(0.92, 1.08); }
    50% { transform: scale(1.05, 0.95); }
    65% { transform: scale(0.98, 1.02); }
    100% { transform: scale(1, 1); }
}

.bottom-centered {
    position: fixed; bottom: 20%; left: 50%;
    transform: translateX(-50%); padding: 10px 20px;
}

/* 8. RESPONSIVE DESIGN (FIXED 330px & DETAIL-CENTER) */
@media (max-width: 850px), (max-height: 700px) {
    .scene {
        display: flex; flex-direction: column;
        justify-content: center; align-items: center;
        padding: 20px; gap: 20px; min-height: 100vh;
    }

    .card, .detail-card { 
        padding: 2rem; width: 330px; min-width: 330px; 
        max-width: 95vw; box-sizing: border-box; 
    }

    .detail-card.active {
        display: block; position: fixed;
        top: 50%; left: 50%; transform: translate(-50%, -50%);
    }

    .sub-card {
        display: none; position: relative !important;
        left: auto !important; top: auto !important;
        transform: none !important; width: 155px; height: 110px;
    }

    .sub-card.show { display: flex; opacity: 1; }

    .scene:has(.sub-card.show) {
        display: grid; grid-template-columns: repeat(2, 155px); 
        grid-gap: 20px; justify-content: center;
    }

    .scene:has(.detail-card.active) .sub-card { display: none !important; }
    
    .card { grid-column: span 2; position: relative; }
    h1 { font-size: 1.8rem; }

    .bottom-centered {
    position: fixed; bottom: 0%; left: 50%;
    transform: translateX(-50%); padding: 0px 0px;
}
}