/* Operational panel sections */

#turn_sequence_panel {
    position: fixed;
    width: 140px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
    perspective: 800px;
    z-index: 10;
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    /* Position will be set dynamically by JavaScript */
}

/* New column-based layout */
.turn_panel_columns_container {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    position: relative;
    gap: 0;
}

.turn_panel_main_column {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: var(--row-spacing, 12px);
}

.turn_panel_main_column.left {
    /* Left column - no offset */
    top: 0;
}

.turn_panel_main_column.right {
    /* Right column - offset down to create zig-zag effect */
    top: var(--zigzag-offset, 25px);
}

/* Legacy styles for backward compatibility */
.turn_panel_row {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    margin-bottom: var(--row-spacing, 12px);
    height: auto;
    gap: 0px;
}

.turn_panel_row:last-child {
    /* Ensure consistent spacing for the bottom row */
    margin-bottom: var(--row-spacing, 12px);
}

.turn_panel_column {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.turn_panel_column:first-child {
    /* Left column - no offset */
    top: 0;
}

.turn_panel_column:last-child {
    /* Right column - offset down to create zig-zag based on object size */
    top: var(--zigzag-offset, 25px);
}

/* Control panel - positioned next to lower panel */
#control_panel {
    position: absolute;
    bottom: 0;
    left: 65.6vw;
    width: 13vw;
    height: 12vh;
    display: flex;
    flex-direction: column;
    border-radius: 0 15px 0 0;
    background-color: rgb(237, 243, 235);
    /* border: 3px solid rgba(0, 0, 0, 0.2); */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 10;
}

#control_panel_upper {
    width: 100%;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    box-sizing: border-box;
}

#control_panel_lower {
    width: 100%;
    height: 40%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px;
    box-sizing: border-box;
    padding: 0 20%;
}

/* End turn button */
#end_turn_button {
    width: 80%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid black;
    border-radius: 8px;
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.4);
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.1s ease;
    background-color: seashell;
    cursor: pointer;
    text-align: center;
}

#end_turn_button:hover {
    box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.6);
    font-size: 1em;
    background-color: rgba(255, 248, 220, 0.9);
}

/* Pause controller */
#pause_controller {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2px;
    width: 20%;
}

/* Question div */
#question_div {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
    /* width: 50%; */
}

#question_div:hover {
    width: 28px;
    height: 28px;
    font-size: 1.4em;
    background-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

/* Play/pause buttons */
.play_pause_button {
    width: auto;
    height: 20px;
    transition: all 0.1s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.play_pause_button:hover {
    height: 22px;
    filter: brightness(1.1);
}

#who_set_pause_left {
    border-radius: 50%;
    height: 8px;
    width: 8px;
    background-color: rgba(0, 50, 255, 0.4);
    flex-shrink: 0;
}

#who_set_pause_right {
    border-radius: 50%;
    height: 8px;
    width: 8px;
    background-color: rgba(255, 0, 50, 0.4);
    flex-shrink: 0;
}

/* Turn panel object styles */
.turn_panel_object_place {
    transition: transform 0.3s ease, background-color 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    background-color: transparent !important;
    flex-shrink: 0;
    transform-origin: center center;
    transform: scale(1.0); /* Base scale for all objects */

    background-color: transparent;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.9;
}

.turn_panel_object_place:hover:not(.current-turn) {
    transform: scale(1.15);
    z-index: 3;
}

.turn_panel_object {
    width: 90%;
    height: 90%;
    position: relative;
    overflow: hidden;
    z-index: 2;
    border-radius: 30px;
    text-align: center;
}

.turn_panel_object::after {
    border-radius: 30px;
}

/* Highlight current turn */
.current-turn {
    border-radius: 50%;
    z-index: 4;
    animation: glow 2s infinite;
}

/* Glow animation - scales on top of base transform */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 223, 0, 0.6), 0 0 40px rgba(255, 223, 0, 0.3);
        transform: scale(1.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 223, 0, 0.8), 0 0 60px rgba(255, 223, 0, 0.4);
        transform: scale(1.35);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 223, 0, 0.6), 0 0 40px rgba(255, 223, 0, 0.3);
        transform: scale(1.3);
    }
}

/* Particle effect */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle-container::before,
.particle-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 223, 0, 0.9);
    border-radius: 50%;
    animation: particle-rise 1.5s infinite;
}

.particle-container::after {
    left: 30%;
    animation-delay: 0.75s;
}

/* Particle animation */
@keyframes particle-rise {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-80px) scale(0);
        opacity: 0;
    }
}