body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #373636);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Pushes content higher */
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Score Display */
#score-display {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    z-index: 2000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Floating Stars Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.4);
    transition: transform 0.1s linear;
    opacity: 0.8;
}

/* Star sizes variation */
.star.small {
    width: 1px;
    height: 1px;
}

.star.medium {
    width: 2px;
    height: 2px;
}

.star.large {
    width: 3px;
    height: 3px;
}

/* Stars Toggle Styling */
.stars-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.stars-toggle-wrapper label {
    margin: 0;
    white-space: nowrap;
}

#stars-toggle {
    min-width: 60px;
}

/* Star Quotes Toggle Styling */
.star-quotes-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.star-quotes-toggle-wrapper label {
    margin: 0;
    white-space: nowrap;
}

#star-quotes-toggle {
    min-width: 60px;
}

/* Star Quote Bubble */
.star-quote-bubble {
    position: fixed;
    background: white;
    color: black;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    cursor: pointer;
    transform: translate(-50%, -100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: bubbleFadeIn 0.3s ease-out;
}

.star-quote-bubble.fade-out {
    animation: bubbleFadeOut 0.5s ease-out forwards;
}

/* Triangle pointer */
.star-quote-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -90%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -100%);
    }
}

@keyframes bubbleFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -100%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -110%);
    }
}

/* Explosion Particles */
.bubble-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
    animation: particleExplode 0.5s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

li {
    margin-bottom: 10px;
}

.popoverButton,
.addButton,
.deleteButton,
.editButton {
    margin-top: 7px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.popoverButton,
.addButton {
    background: #4CAF50;
    color: #fff;
}

.deleteButton {
    background: #ed0303;
    color: #fff;
}

.popoverButton:hover,
.addButton:hover {
    background: #45a049;
}

.deleteButton:hover {
    background: rgba(237, 3, 3, 0.7);
}

ul, ol {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.container > div:nth-child(1) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.container > div:nth-child(2) {
    margin-right: auto; /* Pushes the second div to stick to the left */
}

.container > div:nth-child(3) {
    display: flex;
    flex-direction: row;
}

#task-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    /*background: rgba(255, 255, 255, 0.1);*/
    border-radius: 12px;
    backdrop-filter: blur(4px);
    width: 530px;
}

#task-form input[type="time"] {
    /*width: 100%;*/
    padding: 10px;
    border-radius: 8px;
    border: none;
}

#task-form input[type="text"]{
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
}

#task-form button {
    width: 67%;
}


@media screen and (max-width: 400px) {
    #task-form {
        display: flex;
        flex-direction: column;
        width: 100%; /* Ensure it doesn't shrink too much */
    }
    #task-form input,
    #task-form button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .day-picker {
        width: 100%;
    }
    body {
        padding: 20px;
    }

    .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1px;
    }

    .container > div:nth-child(2) {
        margin-left: 10px;
    }

    .container > div:nth-child(3) {
        display: flex;
        flex-direction: row;
    }
}

#preset-select {
    padding: 10px;
    border-radius: 10px;
    border: none;
    margin-bottom: 20px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.editButton {
    background: #00b9fe;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 5px;
}

.editButton:hover {
    background-color: #006494;
}

.dropdown,
form#task-form input, #check-frequency {
    border-radius: 3px;
    border: none;
}

.day-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    font-size: 0.9rem;
}

.day-picker-label {
    font-weight: bold;
    margin-right: 4px;
}

.day-editor label,
.day-picker label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #4264929c;
    border-radius: 6px;
    padding: 2px 6px;
}

.task-days {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 2px;
}

.inactive-task {
    opacity: 0.5;
}

.day-editor {
    display: none;
    margin: 6px 0 10px 28px;
    gap: 6px;
    flex-wrap: wrap;
}

.day-editor.show {
    display: flex;
}

.info-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    background-color: #00b9fe;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    color: #fff;
    transition: background-color 0.3s ease;
}

.info-icon:hover {
    background-color: #006494;
}

.tooltip {
    position: absolute;
    bottom: 40px;
    right: -10px;
    width: 260px;
    background-color: #1e3c72;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    text-align: center;
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip:after {
    content: "";
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 8px;
    border-style: solid;
    border-color: #1e3c72 transparent transparent transparent;
}

.tooltip a:link,
.tooltip a:visited,
.tooltip a:hover,
.tooltip a:active {
    text-decoration: none;
    color: rgba(11, 232, 18, 0.58);
}

.tooltip a:hover {
    color: rgba(11, 232, 18, 0.8);
}

.telegram-container {
    position: static;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.telegram-container.collapsed {
    overflow: hidden;
}

.telegram-container.collapsed .telegram-hide-handle {
    display: none;
}

.telegram-hide-handle {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 12px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.2s ease-in-out;
    margin: -20px -20px 10px -20px;
    width: calc(100% + 40px);
    border-radius: 8px;
}

.telegram-hide-handle:hover {
    height: 28px;
}

.handle-text {
    color: white;
    font-size: 11px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    /*text-transform: uppercase;*/
    letter-spacing: 1px;
}

.telegram-hide-handle:hover .handle-text {
    opacity: 1;
}

.telegram-show-button {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    background: linear-gradient(135deg, #00b9fe, #0088cc);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1001;
}

.telegram-show-button:hover {
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.show-text {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.telegram-show-button:hover .show-text {
    opacity: 1;
}

.inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buttons {
    display: flex;
    gap: 10px;
}
button {
    padding: 5px 10px;
}

.clear {
    margin-top: 7px;
    background-color: rgba(237, 3, 3, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    color: #fff;
    transition: background-color 0.3s ease;
}

.clear:hover {
    background-color: rgba(131, 0, 0, 0.7);
}

.custom-tooltip {
    position: relative;
    cursor: pointer;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

[popover] {
    border: 5px solid #00b9fe;
    background: linear-gradient(135deg, #5c8cd4, #7a7979);
    border-radius: 10px;
}

@media (max-width: 630px) {
    .telegram-container {
        margin-bottom: 50px;
    }

    .telegram-show-button {
        padding: 6px 18px;
        font-size: 12px;
    }
}

label {
    cursor: pointer;
}

label:hover {
    background-color: rgba(157, 169, 227, 0.04);
}

.noSelect {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.telegram-popover,
.settings-popover {
    position: relative;
    padding: 20px 60px;
    overflow: visible;
}

.telegram-popover {
    position: relative;
    padding: 20px 20px;
    overflow: visible;
}

.popover-label {
    position: absolute;
    top: -9px;
    left: 20px;
    background: #00b9fe;
    padding: 0 10px;
    font-weight: bold;
    font-size: 14px;
    z-index: 100;
    border-radius: 5px;
    line-height: 1;
}

.settings-button {
    display: flex;
}

.dropdown {
    margin-top: 10px;
}

#show-settings-button {
    position: relative;
}

.redCorner::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 15px solid #ed0303; /* height of the triangle */
    border-left: 15px solid transparent; /* width of the triangle */
    border-radius: 0 10px 0 0;
}

input[type="range"] {
    vertical-align: middle;
}

.volume {
    font-size: 0.8rem;
    min-width: 35px;
    text-align: right;
    display: inline-block;
}

.connection-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.status-indicator {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    top: 243px;
    left: 266px;
}

.status-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: red;
    transition: background-color 0.3s;
}

.status-text {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    color: #333;
    font-size: 0.9em;
    position: absolute;
    bottom: 30px;
    left: -40px;
}

.status-indicator:hover .status-text {
    opacity: 1;
    transform: translateX(0);
}

.chatName {
    display: none;
}

.page-tittle-settings-container input[type="radio"] {
    margin-right: 6px;
}

/*Terminal style*/

.status-dotTerminal {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: red;
    transition: background-color 0.3s;
}

.status-textTerminal {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    color: #333;
    font-size: 0.9em;
    position: absolute;
    bottom: 30px;
    left: -40px;
}

.status-indicatorTerminal {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    top: 288px;
    left: 293px;
}

.status-indicatorTerminal:hover .status-textTerminal {
    opacity: 1;
    transform: translateX(0);
}

.clock-icon {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clock-icon:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}