/* controls.css - Top Right Controls (X button, Theme Toggle) */

.top-right-controls {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 250;
    pointer-events: auto;
}

/* Return to Lobby Button (X) */
.top-right-controls .constant-return-lobby,
.constant-return-lobby {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(180deg,
        rgba(40, 40, 50, 0.95) 0%,
        rgba(25, 25, 35, 0.98) 100%);
    border: 2px solid rgba(255, 100, 100, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    color: #ff6b6b;

    box-shadow:
        0 0 15px rgba(255, 100, 100, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.constant-return-lobby svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    filter: drop-shadow(0 0 3px rgba(255, 100, 100, 0.5));
}

.constant-return-lobby:hover {
    background: linear-gradient(180deg,
        rgba(80, 30, 30, 0.95) 0%,
        rgba(60, 20, 20, 0.98) 100%);
    border-color: rgba(255, 100, 100, 0.6);
    box-shadow:
        0 0 25px rgba(255, 100, 100, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.game-active .constant-return-lobby,
.game-active .top-right-controls .constant-return-lobby {
    opacity: 1;
    pointer-events: auto;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: calc(1.5rem + 54px);
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(180deg,
        rgba(40, 40, 50, 0.95) 0%,
        rgba(25, 25, 35, 0.98) 100%);
    border: 2px solid rgba(255, 200, 100, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.2s ease;
    color: #ffd700;

    box-shadow:
        0 0 15px rgba(255, 200, 100, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    border-color: rgba(255, 200, 100, 0.6);
    box-shadow:
        0 0 25px rgba(255, 200, 100, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    filter: drop-shadow(0 0 3px rgba(255, 200, 100, 0.5));
}

/* When controls are inside top-right-controls container */
.top-right-controls .constant-return-lobby,
.top-right-controls .theme-toggle {
    position: static;
    width: 40px;
    height: 40px;
}

.top-right-controls .constant-return-lobby svg,
.top-right-controls .theme-toggle svg {
    width: 20px;
    height: 20px;
}
