/* Main Container */
#personamotion {
    position: fixed;
    z-index: 10000;
    font-family: sans-serif;
    height: 50vh;
    width: 50vh;
    bottom: 10px;
    right: 10px;
    background-color: transparent !important;
    overflow: hidden;
    resize: none;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    min-height: 200px;
    max-width: 90vw;
    max-height: 90vh;
}

/* Content Area */
#personamotion-content {
    position: relative;
    flex: 1;
    overflow-y: auto;
}

/* Response Container - Behind everything */
#personamotion-responseContainer {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Canvas - Full background */
#personamotion-window {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    /*border: 5px solid #ff0000;*/
}

/* Resize Handle */
#personamotion-resizeHandle {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #4285f4;
    left: 0;
    top: 0;
    cursor: nwse-resize;
    z-index: 30;
    display: none;
}

#personamotion-resizeHandle:hover {
    background-color: #0d47a1;
}

/* Minimize Handle */
#personamotion-minimizeHandle {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #f55a42;
    right: 0;
    top: 0;
    cursor: sw-resize;
    z-index: 30;
    display: none;
}

#personamotion-minimizeHandle:hover {
    background-color: #5e1f16;
}

/* UI Container */
#personamotion-radialUI {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none;
}

/* Buttons */
.personamotion-radialButton {
    position: absolute;
    background: rgba(255, 255, 255, 1);
    border: 2px solid #888;
    border-radius: 50%;
    text-align: center;
    color: #000;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.personamotion-radialButton:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.personamotion-radialIcon {
    font-size: calc(var(--button-size) * 0.5);
    line-height: 1.2;
}

.personamotion-radialLabel {
    display: block;
    font-size: calc(var(--button-size) * 0.25);
    margin-top: -4px;
    white-space: nowrap;
}

/* Prompt Box */
#personamotion-promptBox {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    min-width: 150px;
    height: 2.5em;
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #aaa;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
    display: none;
    z-index: 20;
    bottom: 20px;
}

.personamotion-radialButton.sway-cw {
    animation: radialSwayCW 2s ease-in-out infinite;
}

.personamotion-radialButton.sway-ccw {
    animation: radialSwayCCW 2s ease-in-out infinite;
}

#personamotion-promptBox.swaying {
    animation: sway 3s ease-in-out infinite;
    transform-origin: center bottom;
}

#personamotion-wipBanner {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Perfect circle */
    background-color: #ffa500;
    color: black;
    font-size: 11px;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0.9;
    border: 1.5px dashed #000;
    animation: gentle-bounce 2s infinite ease-in-out;
}

#personamotion-clickMeSign {
    position: absolute;
    top: 40%;
    left: 65%;
    transform: translateY(-50%) rotate(-3deg);
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #ff4757;
    border-radius: 3px;
    font-family: "Arial Narrow", sans-serif;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 0 8px rgba(255, 71, 87, 0.8),
        inset 0 0 4px rgba(255, 71, 87, 0.5);
    z-index: 1000;
    cursor: pointer;
    border: 1px solid rgba(255, 71, 87, 0.3);
    animation:
        sway 4s ease-in-out infinite,
        neon-pulse 1.5s infinite alternate;
}

/* Animations (keep existing) */
@keyframes sway {
    0%,
    100% {
        transform: translateX(-50%) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) rotate(3deg);
    }
}

@keyframes radialSwayCW {
    0%,
    100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(6deg);
    }
}

@keyframes radialSwayCCW {
    0%,
    100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-6deg);
    }
}

@keyframes gentle-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes neon-pulse {
    from {
        box-shadow:
            0 0 6px rgba(255, 71, 87, 0.6),
            inset 0 0 3px rgba(255, 71, 87, 0.4);
    }
    to {
        box-shadow:
            0 0 10px rgba(255, 71, 87, 1),
            inset 0 0 5px rgba(255, 71, 87, 0.7);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.personamotion-responseItem {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: "Arial", sans-serif;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    margin: 2em auto;
    border: 2px solid #3498db;
    transition:
        transform 0.2s ease-in-out,
        background-color 0.2s ease-in-out;
    animation: fadeOut 10s ease-out forwards;
}
