:root {
    --bg-color: #4834d4; /* Flat deep blue/purple */
    --bg-light: #686de0; /* Lighter blue */
    --sidebar-bg: rgba(0, 0, 0, 0.2);
    --text-color: #ffffff;
    --bubble-border: rgba(255, 255, 255, 0.4);
    --bubble-bg: rgba(255, 255, 255, 0.1);
    --bubble-hover: rgba(255, 255, 255, 0.25);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Break mode styles */
body.break-mode {
    --bg-color: #0fb9b1; /* Relaxing Teal */
    --bg-light: #7ed6df; /* Lighter Teal */
    --bubble-border: rgba(255, 255, 255, 0.5);
    --bubble-bg: rgba(255, 255, 255, 0.15);
}

body.break-mode .btn-sidebar-action {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

body.break-mode .btn-sidebar-action:hover {
    background: white;
    color: var(--bg-color);
}

/* Bubble Container */
#bubble-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

#bubble-container:active {
    cursor: grabbing;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--bubble-border);
    background-color: var(--bubble-bg);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    user-select: none;
    backdrop-filter: blur(5px);
    transform: translate(-50%, -50%); /* Center anchor */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bubble:hover {
    background-color: var(--bubble-hover);
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 10;
    border-color: white;
}

.bubble.break {
    border-color: rgba(100, 255, 218, 0.6);
    background-color: rgba(100, 255, 218, 0.15);
}

.bubble.break:hover {
    background-color: rgba(100, 255, 218, 0.3);
    border-color: #64ffda;
}

.bubble span {
    pointer-events: none;
}

/* Action Bubble */
.action-bubble {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.6);
    font-size: 1rem !important;
    text-align: center;
    line-height: 1.2;
}

.action-bubble:hover {
    background-color: rgba(255, 255, 255, 0.35);
    border-style: solid;
    transform: translate(-50%, -50%) scale(1.15);
}

.action-text {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar-right {
    width: 250px;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    position: relative; /* Ensure it stays in flow */
    flex-shrink: 0; /* Prevent shrinking */
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.add-bubble-form {
    display: flex;
    gap: 10px;
}

.add-bubble-form input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    font-size: 1rem;
}

.add-bubble-form button {
    background: white;
    color: var(--bg-color);
    border: none;
    border-radius: 5px;
    width: 40px;
    cursor: pointer;
    transition: transform 0.2s;
}

.add-bubble-form button:hover {
    transform: scale(1.05);
}

.btn-sidebar-action {
    background: rgba(100, 255, 218, 0.15);
    border: 1px solid rgba(100, 255, 218, 0.4);
    color: #64ffda;
    padding: 12px;
    border-radius: 5px;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 10px;
}

.btn-sidebar-action:hover {
    background: rgba(100, 255, 218, 0.3);
    border-color: #64ffda;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.room-info {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.room-info:hover {
    background: rgba(0,0,0,0.3);
}

.user-info input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 0;
    width: 100%;
    font-size: 1rem;
}

.user-info input:focus {
    outline: none;
    border-bottom-color: white;
}

/* Active Timer Overlay */
#active-timer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(72, 52, 212, 0.95); /* Matches bg color but opaque */
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s;
}

#active-timer-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.timer-content {
    text-align: center;
}

#timer-display {
    font-size: 10rem;
    font-weight: 100;
    line-height: 1;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

#timer-status {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.btn-icon {
    background: transparent;
    border: 2px solid white;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-icon:hover {
    background: white;
    color: var(--bg-color);
    transform: scale(1.1);
}

.btn-text {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0 30px;
    height: 60px;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-text:hover {
    background: white;
    color: var(--bg-color);
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

