/* ── Kellian 3D Viewer Frontend Styles ── */
.kellian-3d-viewer-container {
    position: relative;
    background: radial-gradient(circle at center, rgba(16, 18, 38, 0.6) 0%, rgba(5, 6, 15, 0.85) 100%);
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    margin: 25px 0;
    display: flex;
    flex-direction: column;
}

.kellian-3d-viewer-container:hover {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 15px 35px rgba(34, 211, 238, 0.15), 0 0 25px rgba(192, 132, 252, 0.1);
    transform: translateY(-2px);
}

.kellian-3d-viewer-container model-viewer {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: block;
    outline: none;
}

/* Loading Overlay inside model-viewer (slot="poster") */
.kellian-3d-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0d0f22 0%, #05060f 100%);
    z-index: 99;
    color: #f1f0fb;
    font-family: 'Quicksand', 'Outfit', sans-serif;
}

.kellian-3d-loader .loader-spinner {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: loader-levitate 3s ease-in-out infinite;
}

@keyframes loader-levitate {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(8deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.kellian-3d-loader span {
    font-size: 1rem;
    letter-spacing: 0.1em;
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #c084fc, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

/* Custom error message */
.kellian-3d-error {
    background: rgba(255, 74, 139, 0.1);
    color: #ff4a8b;
    border: 1px solid rgba(255, 74, 139, 0.25);
    border-radius: 12px;
    padding: 15px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    margin: 15px 0;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(255, 74, 139, 0.1);
}

/* ── Animation Controls Tray (Below Viewbox) ── */
.kellian-3d-animation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(10, 11, 26, 0.95);
    border-top: 1px solid rgba(192, 132, 252, 0.25);
    padding: 12px 20px;
    z-index: 10;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.kellian-3d-animation-controls:hover {
    border-top-color: rgba(34, 211, 238, 0.45);
    background: rgba(13, 15, 34, 0.98);
}

/* Control buttons inside tray */
.kellian-animation-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Outfit', 'Quicksand', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-transform: capitalize;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.kellian-animation-btn .btn-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.kellian-animation-btn:hover {
    background: rgba(192, 132, 252, 0.18);
    border-color: rgba(192, 132, 252, 0.5);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
}

.kellian-animation-btn:hover .btn-icon {
    transform: scale(1.2) translateY(-1px);
}

/* Active Button state (Playing) */
.kellian-animation-btn.active {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.35) 0%, rgba(34, 211, 238, 0.35) 100%);
    border-color: rgba(34, 211, 238, 0.85);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Stop Button customized state */
.kellian-animation-btn.kellian-btn-stop {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.kellian-animation-btn.kellian-btn-stop:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: rgba(239, 68, 68, 0.6);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.kellian-animation-btn.kellian-btn-stop.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(225, 29, 72, 0.4) 100%);
    border-color: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
}

/* Mobile Responsiveness for animation buttons */
@media (max-width: 600px) {
    .kellian-3d-animation-controls {
        padding: 8px 12px;
        gap: 6px;
    }
    
    .kellian-animation-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .kellian-animation-btn .btn-icon {
        font-size: 0.95rem;
    }
}

