/* ==================================
   Creation Menu Styles (Fab Button & Modal)
   ================================== */

/* --- CSS Variables for Theming ---
   We define a default set (dark theme) and override for others.
*/
:root {
    --fab-bg-color: #36393f;
    --fab-icon-color: #b9bbbe;
    --fab-hover-bg-color: #4f545c;

    --creation-menu-bg: rgba(0, 0, 0, 0.85);
    --creation-menu-center-bg: #4f545c;
    --creation-menu-center-icon: #ffffff;
    --creation-menu-item-bg: #36393f;
    --creation-menu-item-icon: #b9bbbe;
    --creation-menu-item-line: rgba(255, 255, 255, 0.2);
    --creation-menu-item-text: #dcddde;
    --creation-menu-old-haze-color: rgba(138, 43, 226, 0.15);

    /* ADDED: Variables for the new smoky haze effect */
    --haze-color-1: #4B0082; /* Indigo */
    --haze-color-2: #8A2BE2; /* BlueViolet */
    --haze-color-3: #9370DB; /* MediumPurple */

    --spring-transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.light-theme {
    --fab-bg-color: #f2f3f5;
    --fab-icon-color: #5c6470;
    --fab-hover-bg-color: #e3e5e8;

    --creation-menu-bg: rgba(242, 243, 245, 0.85);
    --creation-menu-center-bg: #ffffff;
    --creation-menu-center-icon: #060607;
    --creation-menu-item-bg: #ffffff;
    --creation-menu-item-icon: #5c6470;
    --creation-menu-item-line: rgba(6, 6, 7, 0.16);
    --creation-menu-item-text: #4e5058;
    --creation-menu-old-haze-color: rgba(138, 43, 226, 0.1);
}

.aurora-theme {
    --fab-bg-color: rgba(30, 31, 34, 0.5);
    --fab-icon-color: #f2f3f5;
    --fab-hover-bg-color: rgba(45, 46, 51, 0.7);

    --creation-menu-bg: rgba(0, 0, 0, 0.5);
    --creation-menu-center-bg: rgb(45, 46, 51);
    --creation-menu-center-icon: #ffffff;
    --creation-menu-item-bg: rgba(30, 31, 34, 0.6);
    --creation-menu-item-icon: #f2f3f5;
    --creation-menu-item-line: rgba(255, 255, 255, 0.25);
    --creation-menu-item-text: #f2f3f5;
    --creation-menu-old-haze-color: rgba(138, 43, 226, 0.2);
}

/* --- Main Floating Action Button (FAB) --- */
#creation-fab {
    position: fixed;
    bottom: 105px; 
    left: 20px;   
    width: 56px;
    height: 56px;
    background-color: var(--fab-bg-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.2s ease, transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

#creation-fab:hover {
    background-color: var(--fab-hover-bg-color);
}

.aurora-theme #creation-fab {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 22px 4px rgba(138, 43, 226, 0.25);
}

#creation-fab svg {
    width: 24px;
    height: 24px;
    stroke: var(--fab-icon-color);
    transition: transform 0.3s ease;
}

/* --- Fullscreen Menu Overlay --- */
#creation-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--creation-menu-bg);
    z-index: 1999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}

.aurora-theme #creation-menu-overlay {
    backdrop-filter: blur(10px) saturate(180%);
}

#creation-menu-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#creation-menu-container {
    position: relative; 
    width: 0;
    height: 0;
}

#creation-menu-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    box-shadow: 0 0 250px 120px var(--creation-menu-old-haze-color);
    z-index: 0; 
    opacity: 0; 
    transform: scale(0.5);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#creation-menu-overlay.visible #creation-menu-container::before {
    opacity: 1;
    transform: scale(1);
}

#creation-menu-center-button {
    position: absolute;
    top: -32px;
    left: -32px;
    width: 64px;
    height: 64px;
    background-color: var(--creation-menu-center-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 10; 
}

#creation-menu-center-button svg {
    width: 28px;
    height: 28px;
    stroke: var(--creation-menu-center-icon);
    transition: transform 0.4s ease-in-out;
}

#creation-menu-overlay.visible #creation-menu-center-button svg {
    transform: rotate(225deg); 
}

.creation-menu-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 0; 
    background-color: var(--creation-menu-item-line);
    transform-origin: top center;
    z-index: 1; 
    transition: height 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0s;
}

.creation-menu-item-container {
    position: absolute;
    top: -28px;
    left: -28px;
    width: 56px; 
    height: 56px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform-origin: center center;
    z-index: 5; 
}

.creation-menu-item {
    width: 100%;
    height: 100%;
    background-color: var(--creation-menu-item-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: var(--spring-transition); 
}

.creation-menu-item:hover {
    transform: scale(1.1);
}

.creation-menu-item-icon {
    width: 28px;
    height: 28px;
    pointer-events: none; 
    background-color: var(--creation-menu-item-icon);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.creation-menu-item-text {
    position: absolute;
    bottom: -25px;
    font-size: 14px;
    font-weight: 500;
    color: var(--creation-menu-item-text);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
    pointer-events: none;
}

#creation-menu-overlay.visible .creation-menu-item-text {
    opacity: 1;
}

.dragging {
    transition: none !important; 
}

/* ==================================
   NEW: Smoky Haze Effect Styles (Aurora Theme Only)
   ================================== */

@keyframes smoke-1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(-40px, 20px) scale(1.3); opacity: 0.6; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
}

@keyframes smoke-2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(30px, -30px) scale(1.5); opacity: 0.3; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}

@keyframes smoke-3 {
  0% { transform: translate(0, 0) scale(1.2); opacity: 0.3; }
  50% { transform: translate(-10px, -40px) scale(1); opacity: 0.5; }
  100% { transform: translate(0, 0) scale(1.2); opacity: 0.3; }
}

/* MODIFIED: Hide haze by default */
#creation-menu-smoky-haze {
    display: none; 
    position: absolute;
    top: 0; 
    left: 0;
    width: 1px;
    height: 1px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* MODIFIED: Show and style haze ONLY within aurora-theme */
.aurora-theme #creation-menu-smoky-haze {
    display: block;
}

.aurora-theme #creation-menu-overlay.visible #creation-menu-smoky-haze {
    opacity: 1;
}

.aurora-theme #creation-menu-smoky-haze::before,
.aurora-theme #creation-menu-smoky-haze::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* Layer 1 */
.aurora-theme #creation-menu-smoky-haze {
    background: var(--haze-color-1);
    width: 250px;
    height: 250px;
    top: -125px;
    left: -125px;
    filter: blur(80px);
    animation: smoke-1 25s infinite linear;
}

/* Layer 2 */
.aurora-theme #creation-menu-smoky-haze::before {
    background: var(--haze-color-2);
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    filter: blur(90px);
    animation: smoke-2 30s infinite linear;
}

/* Layer 3 */
.aurora-theme #creation-menu-smoky-haze::after {
    background: var(--haze-color-3);
    width: 200px;
    height: 200px;
    top: -100px;
    left: -100px;
    filter: blur(70px);
    animation: smoke-3 35s infinite linear;
}
