@font-face {
    font-family: shabnam;
    src: url(/static/main_app/fonts/Shabnam.ttf) format('truetype');
}

@font-face {
    font-family: shabnam-thin;
    src: url(/static/main_app/fonts/Shabnam-Thin.ttf) format('truetype');
}

@font-face {
    font-family: shabnam-light;
    src: url(/static/main_app/fonts/Shabnam-Light.ttf) format('truetype');
}

@font-face {
    font-family: shabnam-bold;
    src: url(/static/main_app/fonts/Shabnam-Bold.ttf) format('truetype');
}

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
    line-height: 1.65; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
}
    
/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers.
 */

body {
    margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */

main {
    display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
    box-sizing: content-box; /* 1 */
    height: 0; /* 1 */
    overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
    background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
    border-bottom: none; /* 1 */
    text-decoration: underline; /* 2 */
    text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
    font-family: 'shabnam-bold';
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */

small {
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */

img {
    border-style: none;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */

button,
input,
optgroup,
select,
textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 1 */
    line-height: 1.15; /* 1 */
    margin: 0; /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

button,
input { /* 1 */
    overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

button,
select { /* 1 */
    text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    border: none;
    background: none;
    cursor: pointer;
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */

fieldset {
    padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
    box-sizing: border-box; /* 1 */
    color: inherit; /* 2 */
    display: table; /* 1 */
    max-width: 100%; /* 1 */
    padding: 0; /* 3 */
    white-space: normal; /* 1 */
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
    vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */

textarea {
    overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
    -webkit-appearance: button; /* 1 */
    font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */

details {
    display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
    display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */

template {
    display: none;
}

/**
 * Add the correct display in IE 10.
 */

[hidden] {
    display: none;
}
  
/******************************************************** Start ********************************************************/

/* ----- light mode */
:root {
    --text-color: #1E2A38;
    --slide-text-color: #000;
    --bg-color: #B9CBD9;
    --box-shadow:
        inset 0 0px 0 rgba(255,255,255,0.2),
        0 0 8px rgba(0,0,0,0.3),
        0 8px 8px rgba(0,0,0,0.3),
        inset -0px 0 0px #b9f3fe;
    --border: 1px solid #1e2a3899;
}

/* ----- dark mode */
body.dark {
    --text-color: #d1d5db;
    --slide-text-color: #d1d5db;
    --bg-color: #1e2a38;
    --box-shadow:
        inset 0 0px 0 rgba(255,255,255,0.2),
        0 0 8px rgba(0,0,0,0.3),
        0 8px 8px rgba(0,0,0,0.3),
        inset -0px 0 0px #b9f3fe;
    --border: 1px solid #d1d5db63;
}
  
html {
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    height: 100vh;
}
  
*,
*::after,
*::before {
    box-sizing: inherit;
    -webkit-tap-highlight-color: transparent;
}
  
body {
    font-family: "shabnam-light";
    margin: 0;
    padding: 0;
    background: #424242;
    background: #c2cefd;
    background: #a2b1ef;
    background: #333;
    background: #d0d1d596;
    /* background: linear-gradient(160deg, #1c1f2b, #2c2f3a); */
    background: #d0d1d5;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.8s;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

p, h1, h2, h3, h4, h5, h6 {
    cursor: context-menu;
}

#site-name {
    font-family: 'shabnam';
    background-color: #0F172A;
    width: 168px;
    height: 1.2rem;
    padding: 1px 0;
    border-radius: 1rem;
    color: #EAB308;
    font-size: 1.1rem;
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.custom_hr {
    width: 100%;
    height: 1px;
    background: #000;
}

/* ------------------------------------------------ preview: */
.preview-text {
    margin-top: 5rem;
    text-align: center;
}

/* ------------------------------------------------ profile:

/* ----- my-profile */

.edit-pannel-btn {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(250, 250, 252, 0.5);
    box-shadow: 0 6px 18px rgba(12,18,28,0.06);
    padding: 0 0.5rem;
    margin-top: 0.2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #000;
}

.profile-card {
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    border-radius: 8px;
    text-align: center;
}

.profile-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-image-icon {
    width: 120px;
}

.profile-card h1 {
    margin-top: 0;
}

.profile-name-id-container {
    display: flex;
}

.profile-item {
    margin: 0.5em 0;
    font-size: 1.1em;
}

.edit-btn {
    margin-top: 1.5em;
    padding: 0.6em 2em;
    font-size: 1em;
    cursor: pointer;
    background: #1e2a38;
    color: #d1d1d1;
    border: none;
    border-radius: 2rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
    box-shadow: var(--box-shadow);
}

body.dark .edit-btn {
    border: var(--border);
}

.edit-btn:active {
    transform: scale(0.9);
}

/* Full-page overlay for the edit form */
.edit-profile-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay effect */
    z-index: 1000;
}

.hidden {
    display: none;
}

/* ----- Edit profile form */

.edit-profile-modal {
    background: var(--bg-color);
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#profile-form {
    margin-top: 10rem;
}

.cancel-edit-profile-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1e2a38;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.save-profile-edit-btn {
    margin-top: 1em;
    padding: 0.6em 2em;
    font-size: 1em;
    cursor: pointer;
    background: #1e2a38;
    color: #d1d1d1;
    border: none;
    border-radius: 2rem;
    border: var(--border);
}

/* ----- other user profile */

.profile-chat-link {
    background: #1e2a38;
    padding: 0.5rem 3rem;
    border-radius: 2rem;
    text-decoration: none;
    color: #d1d5db;
    border: var(--border);
}

body.dark .profile-chat-link {
    background: none;
    box-shadow: var(--box-shadow);
}

body.dark .save-profile-edit-btn {
    background: none;
    box-shadow: var(--box-shadow);
}

/************************************************** Index Page ************************************/

.header-image {
    width: 100%;
    height: 78vh;
    object-fit: cover;
    border-bottom-left-radius: 3rem;
    border-bottom-right-radius: 3rem;
}

.welcome-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.welcome-section h1 {
    font-family: 'shabnam-bold';
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.welcome-section h2 {
    font-weight: normal;
    font-size: 1rem;
    margin: 0;
}

.part-1 {
    position: relative;
margin: 0 auto;
margin-top: 6rem;
display: flex;
justify-content: space-between;
align-items: center;
gap: 2rem;
background: white;
border-radius: 1rem;
padding: 0.5rem 0.5rem;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
transition: transform 0.3s ease;
max-width: 600px;
width: 90%;
}

.part-1 p {
font-family: 'shabnam-bold';
}

.part-1 img {
    width: 42%;
    border-radius: 1rem;
}

.crazies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem;
    height: fit-content;
    margin: 0 auto;
    margin-top: 3rem;
    width: 92%;
}

.crazy {
    border-radius: 1rem;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.value-section {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 8rem auto;
    padding: 0 1.5rem;
    gap: 12rem;
    text-align: center;
}

.value-item-img {
    width: 15rem;
    box-shadow: var(--box-shadow);
    border: var(--border);
}

.value-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    transition: transform 0.3s ease;
    position: relative;
}

.value-img-container {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
margin-top: 1rem;
}

.value-img {
    width: 100%;
    max-width: 14rem;
    border-radius: 1rem;
    border: 1px solid #85a5bd;
}

.value-svg {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.2rem;
    animation: floatUp 1.5s ease forwards;
}

.index-love-svg {
    color: #c000ff;
}

.value-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 0.7rem;
}

.value-description {
    font-size: 1.1rem;
    line-height: 1.8rem;
    max-width: 600px;
}

.index-topics-container {
    display: flex;
    gap: 5rem;
    overflow-x: auto;   /* allow horizontal scroll */
    padding: 2rem;
    white-space: nowrap; /* optional for text-only content */
}

.index-topic-card {
    flex: 0 0 auto;      /* prevent shrinking, keep width */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 192px;         /* fixed width */
    text-decoration: none;
    color: #1e2a38;
}

.index-topic-image {
    width: 100%;
    border: 1px solid #1e2a38;
    border-radius: 1rem;
}

/* Join CTA */
.join {
    text-align: center;
    background: #1e2a38;
    border: var(--border);
    box-shadow: var(--box-shadow);
    color: #d1d5db;
    padding: 4rem 2rem;
    border-radius: 3rem 3rem 0 0;
    margin-top: 6rem;
}

.join h2 {
    font-size: 2rem;
    margin-bottom: 4rem;
}

.cta-buttons-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.first-cta-buttons-container .cta-button {
    background: #1e2a38;
    color: #d1d1d1;
    border: var(--border);
    text-align: center;
}

.first-cta-buttons-container .cta-button:active {
    transform: scale(0.9);
}

.cta-button {
    padding: 0.8rem 2rem;
    font-weight: bold;
    font-size: 1rem;
    background-color: #B9CBD9;
    color: #1e2a38;
    border-radius: 2rem;
    text-decoration: none;
    border: 1.5px solid #B9CBD9;
    display: inline-block;
    width: 150px;
}

.cta-button:active {
    transform: scale(0.9);
}

.phone-number {
    text-decoration: none;
    color: #d1d5db;
    opacity: 0.8;
}

.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.contact-icon {
    width: 3rem;
}

.footer-logo-name {
    display: inline-block;
    color: #d1d5db;
    opacity: 0.4;
}

/* ------------------------------------------------ topic content -------------------------------- */

.index-topic-content-title {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 3rem;
}

.index-topic-content {
    display: flex;
    align-items: flex-start;
    width: 90%;
    max-width: 750px;
    margin: 5rem auto;
    gap: 2rem;
}

.index-topic-content.opposite-side {
    direction: ltr;
}

.index-topic-content-img {
    width: 38vw;
    max-width: 15rem;
    border: 1px solid #1e2a38;
    border-radius: 1rem;
    margin: 0;
}

.index-topic-content-text {
    margin: 0;
    text-align: justify;
    direction: rtl;
}

/* ----------------------------------------------- toggle light ----------------------------------- */
.switch input {
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
    filter: alpha(opacity=0);
    -moz-opacity: 0;
    opacity: 0;
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.switch {
    width: 180px;
    height: 55px;
    position: relative;
    margin: 100px auto;
}

.switch label {
    display: block;
    width: 80%;
    height: 100%;
    position: relative;
    background: #1F2736; /*#121823*/
    background: linear-gradient(#121823, #161d2b);
    border-radius: 30px 30px 30px 30px;
    box-shadow:
        inset 0 3px 8px 1px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(0,0,0,0.5),
        0 1px 0 rgba(255,255,255,0.2);
        -webkit-transition: all .5s ease;
    transition: all .5s ease;
}
  
.switch input ~ label i {
    display: block;
    height: 51px;
    width: 51px;
    position: absolute;
    left: 2px;
    top: 2px;
    z-index: 0;
    border-radius: inherit;
    background: #283446; /* Fallback */
    background: linear-gradient(#36455b, #283446);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 0 8px rgba(0,0,0,0.3),
        0 12px 12px rgba(0,0,0,0.4);
    -webkit-transition: all .5s ease;
    transition: all .5s ease;
}
  
.switch input:checked ~ label i {
    left: auto;
    left: 63%;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 0 8px rgba(0,0,0,0.3),
        0 8px 8px rgba(0,0,0,0.3),
        inset -1px 0 1px #b9f3fe;
    -webkit-transition: all .5s ease;
    transition: all .5s ease;
}
   
/* ---------------------------------------------------- settings ----------------------------------------------------- */

.settings {
    position: absolute;
    left: 0.5rem;
    top: 1rem;
    z-index: 3;
}

.settings-svg {
    width: 2rem;
    cursor: pointer;
}

/* Active classes */
.settings.active .settings-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.settings.active ~ .overlay {
    opacity: 1;
    z-index: 2;
}

.settings-menu {
    position: absolute;
    top: 100%;
    left: 1rem;
    width: 15rem;
    border-radius: 1rem;
    padding: 10px;
    opacity: 0;
    transform: translateY(-10px); /* Moves menu slightly up before appearing */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none; /* Prevents interactions when invisible */
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-menu a {
    padding: 8px 12px;
    border-radius: 2rem;
    text-decoration: none;
    color: #d1d5db;
    box-shadow: var(--box-shadow);
    border: 1px solid #ffffff2e;
    text-align: center;
}

.settings-menu a:active {
    transform: scale(0.9);
}

/****************************************************** Footer Menu **************************************************/

.footer-body{
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: 30px;
    --duration: .3s;
    z-index: 1000;
    max-width: 650px;
    margin: 0 auto;
}

.menu{
    --bgColorMenu : #1d1d27;
    --bgColorMenu: #0F172A;
    margin: 0;
    display: flex;
    width: 100%;
    font-size: 1.5em;
    padding: 0 0em;
    position: relative;
    align-items: center;
    justify-content: center;
    background: var(--bgColorMenu);
    background: rgb(30 42 56 / 81%);
    background: none;
    backdrop-filter: blur(40px);
    border-radius: 2rem;
    border: var(--border);
}

.menu{
    box-shadow:
    inset 0 0px 0 rgba(255,255,255,0.2),
    0 0 8px rgba(0,0,0,0.3),
    0 8px 8px rgba(0,0,0,0.3),
    inset -0px 0 70px #1e2a38;
}

body.dark .menu {
    box-shadow: var(--box-shadow);
}

.menu__item{
    all: unset;
    flex-grow: 1;
    z-index: 100;
    display: flex;
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    align-items: center;
    will-change: transform;
    justify-content: space-around;
    padding: 0.35em 0 0.35em;
    transition: transform var(--timeOut , var(--duration));
    --bgColorItem: #B9CBD9;
  
}

.menu__item::before{
    content: "";
    z-index: -1;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    position: absolute;
    transform: scale(0);
    transition: background-color var(--duration), transform var(--duration);
}


.menu__item.active {
    transform: translate3d(0, -.8em , 0);
}

.menu__item.active::before{
    transform: scale(1);
    box-shadow: var(--box-shadow);
      background: rgba(30, 42, 56, 0.7); /* Semi-transparent background */
    backdrop-filter: blur(5px);
    border: var(--border);
}

.icon{
    width: 1.3em;
    height: 1.3em;
    stroke: #d1d1d1;
    fill: transparent;
    stroke-width: 1pt;
    stroke-miterlimit: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
}

.menu__item.active .icon {
    animation: strok 1.5s reverse;
}

.footer-ufo {
    fill: #d1d1d1;
}

.menu__item.active .footer-ufo  {
    fill: ;
}

@keyframes strok {

    100% {

        stroke-dashoffset: 400;

    }

}

.menu__border{
    left: 0;
    bottom: 99%;
    width: 10.9em;
    height: 2.3em;
    position: absolute;
    clip-path: url(#menu);
    will-change: transform;
    background-color: var(--bgColorMenu);
    transition: transform var(--timeOut , var(--duration));
      background: rgba(30, 42, 56, 0.7); /* Semi-transparent background */
    backdrop-filter: blur(5px);
}

.svg-container {
    width: 0;
    height: 0;
}

/************************************************ Login *****************************************/

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

.login-form {
    border-radius: 12px;
    padding: 20px 28px;
    width: 400px;
}

.login-logo {
    display: block;
    width: 8rem;
    margin: 0 auto;
    border-radius: 5rem;
    display: none;
}

.login-fieldset {
    border: none;
}

.login-form-inputs {
    outline: none;
    width: 100%;
    border: 1px solid #89888b;
    padding: 16px;
    border-radius: 27px;
    color: var(--text-color);
    background: none;
    display: block;
    transition: 180ms ease-in border-color;
    resize:none;
    text-align: center;
}

body.dark .login-form-inputs {
    background: none;
}

.login-form-inputs:focus {
    border-color: #89888b;
}

.login-form-button {
    border: none;
    background: #1e2a38;
    color: #d1d1d1;
    padding: 12px;
    border-radius: 20px;
    display: block;
    cursor: pointer;
    width: 100%;
}

.login-form-button, .login-form-signup, .login-form-reset {
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: var(--box-shadow);
    border: var(--border);
}

.login-form-button:active, .login-form-signup:active, .login-form-reset:active {
    transform: scale(0.9);
}

.login-error {
    margin-top: 0.7rem;
    min-height: 1.15rem;
    color: #1e2a28;
}

.errorlist {
    margin: 0;
    padding-right: 14px;
    color: var(--text-color);
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-form-signup-guest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.login-form-signup, .login-form-reset {
    text-decoration: none;
    text-align: center;
    border: none;
    padding: 8px;
    border-radius: 25px;
    cursor: pointer;
    width: 48%;
    color: #d1d1d1;
    background-color: #1e2a38;
    border: var(--border);
}

.login-form-signup:active, .login-form-reset:active {
    transform: scale(0.9);
}

/************************************************ Custom Admin UI: *****************************************/

/* Custom Admin UI Breadcrumb Styles */
.breadcrumb {
    padding: 0.75rem 1rem;
    margin: 0;
}

.breadcrumb-item {
    text-decoration: none;
    color: #007bff;
}

.breadcrumb-item:last-child {
    font-weight: bold;
    color: #000;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
    color: #6c757d;
}

.included-breadcrumb {
    direction: ltr;
}

/* Custom Admin UI lists */

.custom-admin-ui-main {
    padding: 2rem;
    max-width: 600px;
    margin: auto;
    /* background-color: rgb(172 172 172); */
    border-radius: 25px;
}

.custom-admin-ui-part-name {
    color: #007bff;
    text-align: center;
    margin-bottom: 1.5rem;
}

.custom-admim-ui-delete-edit-posts-btn {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.8em;
    margin-top: -2.8em;
}

.custom-admin-ui-edit-btn {
    display: inline-block;
    color: #c77700;
    text-decoration: none;
    background-color: black;
    width: 62px;
    height: 14.7px;
    border-radius: 25px;
    text-align: center;
}

.main_app-delete-btn {
    display: inline-block;
    color: #dc3545;
    text-decoration: none;
    width: 62px;
    height: 14.7px;
    background-color: black;
    border-radius: 25px;
    text-align: center;
}

.custom-admin-ui-posts-btn {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    width: 62px;
    background-color: black;
    border-radius: 25px;
    text-align: center;
}

.book-object-btns {
    display: flex;
    flex-direction: column;
    margin: 0;
    gap: 1em;
}

.custom-admin-ui-add-btn {
    position: fixed;;
    top: 0;
    border: none;
    text-align: center;
    margin-top: 3rem;
    margin-right: 0.5em;
    width: 7em;
    background-color: black;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 25px;
    cursor: pointer;
}

.custom-admin-ui-add-btn:active {
    transform: scale(0.985);
}

/* Custom Admin UI Add styles */
.add-book-main{
    margin: 3rem auto 8rem auto;
}

.add-slide-question-input {
    max-height: 3rem;
}

/* Custom Admin UI Delete styles */
.custom-admin-ui-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.custom-admin-ui-delete-btn, .custom-admin-ui-cancel-btn, .custom-admin-ui-save-btn {
    text-decoration: none;
    text-align: center;
    border: none;
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    width: 30%;
}

.custom-admin-ui-delete-btn {
    background-color: rgb(179, 27, 0);
    color: white;
}

.custom-admin-ui-delete-btn:hover {
    background-color: rgb(160, 24, 0);
}

.custom-admin-ui-cancel-btn {
    background-color: #3b5998;
    color: white;
}

.custom-admin-ui-cancel-btn:hover {
    background-color: #334d84;
}

/* Custom Admin UI Edit styles */
.custom-admin-ui-edit {
    margin-top: 3rem;
}

.custom-admin-ui-save-btn {
    background-color: green;
    color: white;
}

.custom-admin-ui-save-btn:hover {
    background-color: #006d00;
}

.admin-add-slide-btn {
    margin-left: 0.5rem;
}

.admin-slide-container {
    direction: rtl;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    width: 75%;
    margin: 0 auto;
    line-height: 1.8rem;
}

.admin-slide-inputs-container {
    background-color: rgb(172 172 172);
    border-radius: 25px;
    padding: 0 0.6em 0 0.6em;
    margin-bottom: 5em;
    width: 100%;
}

.admin-slide-btns {
    direction: ltr;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.admin-slide-btn {
    display: inline-block;
    color: #c77700;
    text-decoration: none;
    background-color: black;
    width: 62px;
    height: 24.7px;
    border-radius: 25px;
    text-align: center;
}

.slide-number {
    margin: 0;
}

.confirm-level-delete {
    direction: ltr;
    display: none;
    position: absolute;
    background: var(--bg-color);
    border-radius: 1rem;
    box-shadow: var(--box-shadow);
    padding: 1rem;
    border: var(--border);
}

.confirm-level-delete #cancel-delete, #confirm-delete {
    background: #1e2a38;
    color: #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: var(--box-shadow);
    border: var(--border);
}

/* --------------------------------------------------------- Book: ------------------------------------------------ */

.slide-container {
    direction: rtl;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 100vh;
    margin: 0 auto;
}

.answer-tracker-container {
    position: relative;
    max-width: 650px;
    width: 85%;
    margin: 0 auto;
}

.moving-dot {
    width: 10px;
    height: 10px;
    background-color: #0078D4;  /* Or another color of your choice */
    border-radius: 50%;
    position: absolute; /* Positioned relative to .answer-tracker-container */
    left: 0;            /* The JS will update this position via a transform */
    transition: transform 0.3s ease;
}

.answer-tracker {
    position: absolute;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 15px;
    background: rgb(39, 39, 39);
    background: #7bbb9b;
    /* background: #3d2aa55c; */
    border-radius: 25px;
    width: 100%;
    height: 41.19px;
    padding: 0.8px 0;
}

body.dark .answer-tracker {
    background: none;
    box-shadow: var(--box-shadow);
}

.answer-tracker .answer {
    font-size: 24px;
    text-align: center;
    border-radius: 25px;
}

.correct {
    width: 2rem;
    stroke: #009d00;
}

body.dark .correct {

}

.incorrect {
    color: red;
}

.error-message {
    position: absolute;
    width: 100%;
    text-align: center;
    color: red;
    text-align: center;
    margin-top: 3.7rem;
}

.slide-text-container {
    /* background-color: #C0C0C0;
    background-color: #B6B6B6;
    background-color: #B0B0B0;
    background-color: rgb(172 172 172); */
    border-radius: 25px;
    max-width: 650px;
    text-align: justify;
    /* padding: 1rem; */
}

.slide-text {
    font-family: 'shabnam';
    line-height: 1.65rem;
    font-size: 1.03rem;
    margin: 0;
    margin-bottom: 3rem;
    color: var(--slide-text-color);
}

.slide-image {
    height: 80%;
    border-radius: 1rem;
}

.slide-video {
    height: 21rem;
    border-radius: 1rem;
    margin-bottom: 6rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.choices {
    display: flex;
    flex-direction: column;
    max-width: 425.23px;
    gap: 1rem;
}

.slide-choice {
    padding: 0.85rem;
    border-radius: 3rem;
    width: 100%;
    background: var(--bg-color);
    transition: background-color 0.25s ease;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    border: var(--border);
}

.slide-choice-radio {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.slide-choice:active {
    transform: scale(0.9);
    transition: transform 0.018s ease;
}

.slide-inputs-container {
    position: fixed;
    bottom: 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px;
    max-width: 650px;
    width: 90%;
    box-shadow: var(--box-shadow);
}

.slide-gap {
    cursor: pointer;
    width: 6.4rem;
    border-radius: 1rem;
    height: 29px;
}

.next-button {
    position: relative;
    background-color: #3d2aa5;
    background-color: #29975f;
    color: #fff;
    border: none;
    font-size: 1.6rem;
    border-radius: 25px;
    padding: 1px 10px;
    margin: 0.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
}

.next-button:active {
    transform: scale(0.8);
}

.slide-input-container-arrow-svg {
    width: 1.8rem;
}

.save-btn {
    display: flex;
    color: var(--text-color);
}

.save-svg {
    width: 1.5rem;
    stroke: var(--text-color);
}

.save-btn:active {
    transform: scale(0.9);
}

#level-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 998;
    display: none;
    overflow-y: auto;
}

.back-icon {
    position: absolute;
    left: 30px;
    color: rgb(0, 0, 0);
    box-shadow: var(--box-shadow);
    border-radius: 25px;
    padding: 0 1rem;
    margin-top: 15px;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.6rem;
    font-weight: bold;
    display: flex;
    border: var(--border);
}

.back-icon-svg {
    width: 1.5rem;
    stroke: var(--text-color);
}

.back-link {
    text-decoration: none;
    position: fixed;
    top: 43px;
    left: 25px;
    color: rgb(0, 0, 0);
    box-shadow: 0 0 4px rgba(0 0 0.5);
    border-radius: 25px;
    padding: 0 1rem;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: bold;
}

/* Confirmation overlay with blurred background */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    backdrop-filter: blur(5px); /* Blur effect */
    z-index: 1000; /* Ensure it is behind the confirmation box */
}

.congratulations {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.congrats-message-back {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.congrats-back-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 3px;
    border-radius: 3rem;
    padding: 0.1rem 1rem;
    background-color: #2e852e;
    cursor: pointer;
}

.chapter-levels {
    direction: ltr;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.level-link-delete-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    height: auto;
    opacity: 1;
    transition: height 0.3s ease, opacity 0.2s ease;
}

.level {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.7rem;
    height: 3.7rem;
    border-radius: 50%;
    background: #f9f9f9;
    background: #f9f9f9ab;
    position: relative;
}

.completed-level {
    background-color: #29975f;  /* background color for completed levels */
}

.smooth-transition {
    transition: background-color 4s ease-in-out;
}

.level p {
    font-family: 'shabnam';
    margin: 0;
    text-align: center;
    cursor: pointer;
    color: #1e2a38;
}

.delete-level {
    color: #333;
    border: none;
    /* padding: 0.3em 0.6em; */
    border-radius: 2rem;
    font-size: 0.8em;
    cursor: pointer;
}

.level button:hover {
    background-color: #c82333;
}

.level-link {
    text-decoration: none;
    color: inherit;
}

.add-level-btn {
    border: none;
    width: 100%;
    border-radius: 25px;
    cursor: pointer;
}

/*
#confirmation-box p {
    display: inline-block;
    margin: 0;
    margin-right: 2rem;
}

#confirmation-box button {
    border: none;
    border-radius: 25px;
    margin-right: 0.5em;
    font-size: 0.8rem;
    cursor: pointer;
    width: 7rem;
    background-color: #2e852e;
}
*/

.post-list {
    font-family: 'shabnam-bold';
    width: 75%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    margin-top: 6rem;
    padding-bottom: 9rem;
    gap: 4rem;
}

.user-book-list {
    gap: 8rem;
}

.post-link {
    display: block;
    text-decoration: none;
    color: black;
    width: 100%;
}

.post {
    font-family: 'shabnam-thin';
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #d1d1d1;
    background: #0a4d37;
    background: #1E2A38;
    width: 100%;
    height: 13rem;
    padding: 10px;
    border-radius: 3rem;
    /* box-shadow: 0px 0px 3.5px; */
    /* box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); */
    box-shadow: var(--box-shadow);
    border: var(--border);
    transition: 0.3s ease;
}

.post-title{
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 0;
    margin-right: 1.5rem;
}

.post-title-text, .post-title-author, .post-title-description {
    margin: 0;
}

.post-title-text {
    font-size: 1.5rem;
}

.post-image {
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 3rem;
}

/* ----- Progress bar: ----- */
.book-progress-container {
    position: relative;
    direction: ltr;
    width: 2rem;
    height: 0.5rem;
}

.progress-container {
    position: absolute;
    bottom: -3.3rem;
    right: 50%;
    transform: translateX(50%);
    direction: ltr;
    max-width: 380.75px;
    width: 50%;
    pointer-events: none;
}

.progress-bar-background {
    border-radius: 10px;
    overflow: hidden;
    height: 15px;
    color: #333333d1;
    border: var(--border);
}

.progress-bar {
    height: 100%;
    background: #f54888e0;
    /* background-color: #1e2a38; */
    width: 0%;
    transition: width 0.5s ease-in-out;
}

#book-progress-text,  .chapter-progress-text {
    font-weight: bold;
    color: var(--text-color);
}

.chapter-settings-svg {
    width: 1.65rem;
    cursor: pointer;
    position: absolute;
    bottom: -2.1rem;
    left: 12%;
    color: var(--text-color)
}

/* Locked chapter styles */
.locked-chapter {
    position: relative;
    opacity: 0.5;
    overflow: hidden;
    max-height: 150px; /* Show only half of the chapter */
    margin-top: 20px;
    padding: 10px;
    background: #1e2a38;
    transition: opacity 0.3s ease-in-out;
}

.locked-chapter:hover {
    opacity: 0.8;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1e2a3896;
    color: #d1d1d1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lock-icon {
    font-size: 1.8rem;
}

.lock-text {
    font-size: 1.2em;
    text-align: center;
}

.locked-chapter img {
    height: 100%;
    border-radius: 3rem;
}

/* ----------------------------------------------------- Book - Chapter menu ----------------------------------------------------- */

.chapter-settings-menu ~ .overlay.active {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
    z-index: 1;
    height: 120%;
}

.chapter-settings-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    left: 0;
    top: 0;
    z-index: 2;
    transform: translateY(-10px);
    opacity: 0; /* Start with hidden */
    pointer-events: none; /* Prevent interaction when hidden */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    background: none;
    width: fit-content;
}

.chapter-settings-menu.active {
    transform: translateY(0); /* Reset transform for smooth appearance */
    opacity: 1; /* Fully visible */
    pointer-events: all; /* Enable interaction */
}

.chapter-settings-menu a {
    width: 10rem;
    background: var(--bg-color);
    color: var(--text-color);
    box-shadow: var(--box-shadow);
    border: var(--border);
}

/* ----------------------------------------------------- new level structure ----------------------------------------------------- */

.progress-and-dot-container {
    position: relative;
    width: 90%;
    max-width: 650px;
    margin: 0 auto;
}

.progress-bar-container {
    direction: ltr;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 650px;
    height: 15px;
    overflow: hidden;
    box-shadow: 0 0 3px;
}

body.dark .progress-bar-container {
    box-shadow: 0 0 3px var(--text-color);
}

.progress-dot {
    bottom: -38px;
    transition: left 0.6s ease-in-out;
}

.feedback-message {
    color: red;
    position: absolute;
    bottom: -35px;
    width: 100%;
    text-align: center;
}

/* ---------------------------------------------- loading indicator */

.level.loading::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #ccc;
    border-top: 4px solid #1e2a38;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ---------------------------------------------------- Book Page: ------------------------------------------------- */

#book-page-details {
    position: fixed;
    bottom: 0rem;
    width: 100%;
    height: fit-content;
    background: #1e2a38bd;
    backdrop-filter: blur(70px);
    box-shadow: var(--box-shadow);
    border: var(--border);
    border-radius: 2rem 2rem 0 0;
    padding: 1rem;
    transition: bottom 1s ease;
}

.book-page-details-section-1 {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.book-page-image {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 2rem;
    object-fit: cover;
}

.book-page-title-author-container {
    top: 1rem;
    margin: 0;
    font-size: 1.08rem;
    color: #d1d5db;
    border-radius: 3rem;
}

.book-format-text {
    font-size: 0.8rem;
}

.book-price-text {
    font-size: 0.85rem;
}

.buy-book-link {
    display: inline-block;
    text-decoration: none;
    color: #b5a73e;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: var(--box-shadow);
    border: 1px solid #d1d5db63;
    border-radius: 3rem;
    padding: 0 1rem;
    margin-right: 1rem;
}

.early-access-container {
    margin-top: 1rem;
    font-size: 0.85rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.early-access-container a {
    color: #d1d5db
}

.early-access-container span {
    font-size: 0.8rem;
}

.book-page-details-section-2 {
    text-align: center;
}

.book-info-link {
    display: inline-block;
    text-decoration: none;
    box-shadow: var(--box-shadow);
    border: var(--border);
    color: #d1d5db;
    font-weight: normal;
    font-size: 0.85rem;
    color: #d1d5db;
    border-radius: 3rem;
    padding: 0 1rem;
}

.buy-book-link:active, .book-info-link:active {
    transform: scale(0.9);
}

.book-page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: var(--bg-color);
    padding: 0.3rem;
    color: #d1d1d1;
}

.page-comment-icon {
    /* padding: 0 1rem; */
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1e2a38;
    box-shadow: var(--box-shadow);
    width: 6.4rem;
    height: 29px;
    font-size: 1rem !important;
    border: var(--border);
}

.page-comment-icon-svg {
    width: 1.9rem;
}

#bookDescription {
    margin: 3rem auto;
    width: 90%;
    max-width: 650px;
}

.book-post-title {
    text-align: center;
    margin: auto 1rem;
    font-size: 0.9rem;
}

.book-page-posts-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 48rem;
    flex-wrap: wrap;
    margin: 0 auto;
    margin-top: 3.5rem;
    padding-bottom: 10rem;
    gap: 1rem;
}

.book-page-post-link {
    text-decoration: none;
}

.book-page-posts {
    display: flex;
    flex-direction: column;
    color: #d1d1d1;
    background: #1e2a38;
    box-shadow: 0 0 3px;
    border-radius: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 170px;
    height: 260px;
}

.book-post-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
}

/* ----------------------------------------------------- view book post ---------------------------------------------------- */

.save-post-btn  {
    position: absolute;
    padding: 0;
    width: 29px;
    height: 6.4rem;
    left: 1rem;
    bottom: 20%;
}
/* ---------------------------------------------------- Progress Chart: ---------------------------------------------------- */

.timeframe-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 10px;
	position: fixed;
	left: 0;
	z-index: 3;
}

.timeframe-buttons button {
    border: none;
    background: #1e2a38;
    color: #d1d5db;
    border-radius: 1rem;
    cursor: pointer;
}

body.dark .timeframe-buttons button {
    border: var(--border);
}

.timeframe-buttons button.active {
    background-color: #089981;
    color: #fff;
}

/* Make the chart container responsive */
#candlestick-chart {
    position: relative; /* Ensure proper positioning for child elements */
    overflow: hidden;   /* Hide overflowing content */
    direction: ltr;
    width: 100%;  /* Full width of the parent container */
    height: calc(100vh - 5px);  /* Adjust height to leave space for the footer */
}
  
/* Ensure the page takes the full viewport height */
.progress-chart-container {
    position: relative;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
      
/* Style for displaying minutes spent */
.daily-minutes {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
    padding: 5px 15px;
    border-radius: 3rem;
}
  
#reset-chart {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 6rem;
    z-index: 2;
    color: #d1d1d1;
    background: #1e2a38;
    border: none;
    border-radius: 3rem;
    padding: 0 15px;
    cursor: pointer;
}

body.dark #reset-chart {
    border: var(--border);
}

.chart-annotation {
position: absolute;
background-color: white;
border: 1px solid black;
padding: 2px 5px;
font-size: 12px;
font-family: Arial, sans-serif;
text-align: center;
transform: translate(-50%, -100%);
pointer-events: none;
}

#yAxisLabel {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    font-weight: bold;
    color: #d1d1d1;
    background-color: #1e2a38;
    border-radius: 10px;
    padding: 0 0.1rem;
    z-index: 1;
    pointer-events: none;
}

/* ------------------------------------------------ Like system: ---------------------------------------------------- */

#like-button {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 35.39;
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 3rem;
    cursor: pointer;
}

#like-button:active {
    transform: scale(0.9);
    transition: transform 0.018s ease;
}

#like-icon {
    padding-top: 3px;
}

/* ------------------------------------------------ comments system: ---------------------------------------------------- */

#comment-icon {
    cursor: pointer;
    font-size: 1.15rem;
}
/* Full-screen comment box styles */
#comments-box {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: 1000;
    overflow-y: auto;
    box-sizing: border-box;
    color: #1e2a38;
}

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 10rem;
    padding: 4rem 1rem;
    max-width: 1000px;
    max-height: 84%;
    overflow-y: auto;
    margin: 0 auto;
}

/* only targets the replies-container that is
   immediately after a .comment inside a top-level
   .comment-wrapper that lives directly under .comments-container */
.comments-container
> .comment-wrapper
> .comment
+ .replies-container {
    margin-right: 4rem;
}

/* Banner above each reply */
.parent-highlight {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    margin-bottom: 6px;
    margin-top: 25px;
    background-color: ;
    color: var(--text-color);
    border-right: 2px solid #4285f4;
    cursor: pointer;
    font-size: 0.9rem;
}

.parent-highlight svg {
    width: 1.1rem;
}
  
.flash-highlight {
    animation: flash 1.5s ease-in-out;
}

@keyframes flash {
    0%   { background-color: rgba(255, 255, 0, 0.5); }
    100% { background-color: transparent; }
}
  
.comment-wrapper {
    width: fit-content;
}

.comment {
    padding: 0.5rem;
    border-radius: 2rem;
    background: #1e2a38;
    border: 1px solid #4b738d;
    width: fit-content;
    color: #d1d5db;
    min-width: 10rem;
}

.comment-user a {
    text-decoration: none;
    color: #b5a73e;
    font-weight: bold;
}

.comment-content {
    position: relative;
    margin-left: 2rem;
}

.comment-content p, .reply p {
    margin: 0;
}

.comment-date {
    margin: 0;
    display: none;
}

.comment-username {
    text-decoration: none;
}

.comment-text {
    white-space: pre-wrap;
}

.comment-menu-icon {
    position: absolute;
    left: -30px;
    cursor: pointer;
}

.comment-menu-svg {
    width: 25px;
}

.menu-options {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    gap: 2rem;
    background: #1e2a38;
    /* padding: 1rem 0; */
    padding: 0 1rem;
    box-shadow: var(--box-shadow);
    border: var(--border);
    border-radius: 1rem;
}

.comment-menu-delete, .comment-menu-edit {
    display: flex;
    width: 1.3rem;
    cursor: pointer;
}

.edit-buttons {
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

.edit-buttons  button {
    color: #d1d5db;
    box-shadow: 0 0 3px;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.comment-edit-textarea {
    outline: none;
    resize: none;
    background: none;
    border-radius: 1rem;
    width: 50vw;
    max-width: 37rem;
    height: 8rem;
    color: #d1d5db;
    padding: 0.5rem;
    border: 1px solid #ffffff82;
}

.replies-container {

}

.nested-replies-container {
    /* margin-right: 3rem; */
}

.comments-container
> .comment-wrapper
> .replies-container
> .comment-wrapper> .comment {
    padding: 0.7rem;
    background: ;
    border-radius: 2rem;
    border: 1px solid #a98d4f;
    width: fit-content;
    margin-bottom: 1rem;
}

.comments-container
> .comment-wrapper
> .replies-container
> .comment-wrapper
> .replies-container
> .comment-wrapper> .comment {
    padding: 0.7rem;
    background: #c2aa76;
    border-radius: 2rem;
    border: 1px solid #a98d4f;
    width: fit-content;
    margin-bottom: 1rem;
}

.load-more-replies-btn {
    border: none;
    background: no-repeat;
    font-size: 14px;
    text-decoration: underline;
    margin-right: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.comment-form-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    border-radius: 25px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: end;
    background-color: gray;
    border-radius: 25px;
    height: 40px;
}

.comment-input, .reply-input {
    width: 100%;
    max-height: 35vh;
    height: 100%;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    background-color: #1e2a38;
    color: #d1d1d1;
    outline: none;
    border: none;
    resize: none;
    transition: height 0.3s ease;
}

.reply-input {
    background: #34404f;
    width: 70%
}

.comment-actions {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1rem;
    margin-top: 8px;
    color: #d1d5db;
}

.comment-actions button {
    background: inherit;
    border: none;
    padding: 0px 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    color: #d1d5db;
}

.send-comment-btn, .submit-reply-btn, #send {
    height: 100%;
    max-height: 40px;
    background: #1e2a38;
    color: #d1d1d1;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 3s ease;
    border: var(--border)
}

#close-comments-box {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.3rem;
    background-color: #1e2a38;
    color: #d1d1d1;
    display: flex;
    border-radius: 1rem;
    z-index: 1;
}

/* ------------------------------------------------ Loading: ---------------------------------------------------- */
.loader {
    width: 48px;
    height: 48px;
    display: inline-block;
    position: relative;
}
.loader::after,
.loader::before {
    content: '';  
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FFF;
    position: absolute;
    left: 0;
    top: 0;
    animation: animloader 2s linear infinite;
}
.loader::after {
    animation-delay: 1s;
}
  
@keyframes animloader {
    0% {
      transform: scale(0);
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 0;
    }
}

/* ------------------------------------------------ Header: ---------------------------------------------------- */

.header {
    direction: ltr;
    position: fixed;
    display: flex;
    justify-content: space-around;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    padding: 0.5rem;
    z-index: 1;
}

.header p {
    margin: 0;
    text-align: center;
    box-shadow: var(--box-shadow);
    padding: 0 0.5rem;
    border-radius: 2rem;
    cursor: pointer;
}

body.dark .header p {
    border: var(--border);
}

.header p:active {
    transform: scale(0.9);
}

.header a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 100;
}

.user-coins {
    direction: ltr;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.user-coins svg {
    height: 1.5rem;
}

.set-daily-goal-link {
    position: relative;
    color: var(--text-color);
}

.goal-achieved-indicator {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    /*
    height: 8px;
    background: #29975f;
    border-radius: 50%;
    */
}

.goal-achieved-indicator svg {
    stroke: #29975f;
}

/* ---------------------------------------------------- set daily goal */

.set-daily-goal-body {
    padding: 1rem;
    margin: 0 auto;
    max-width: 650px;
}

#goalForm {
    text-align: center;
}

#goalForm input {
    background: none;
    border: var(--border);
    border-radius: 2rem;
    text-align: center;
    color: var(--text-color);
    box-shadow: var(--box-shadow);
}

.set-daily-goal-head {
    text-align: center;
    margin: 1rem;
}

.set-daily-goal-btn {
    background: #1e2a38;
    color: #d1d5db;
    box-shadow: var(--box-shadow);
    padding: 0 1rem;
    border-radius: 1rem;
}

body.dark .set-daily-goal-btn {
    border: var(--border);
}

/* ------------------------------------------------ Book Posts List: ---------------------------------------------------- */

/* ----- filters */
.filter-container {
    padding: 0.2rem 2rem;
    margin-top: 0.5rem;
}

#filter-select {
    text-align: center;
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
    background: #1e2a38;
    color: #d1d1d1;
    padding: 0.1rem;
    border: none;
    border-radius: 1rem;
    outline: none;
    cursor: pointer;
    border: var(--border);
}

/* ----- layout */
.post-grid {
    max-width: 650px;
    margin: 0 auto 0 auto;
    padding: 2rem 2rem 8rem 2rem;
}

/* Each row: 2×2 grid */
.bookpost-row {
    display: grid;
    place-content: center;
    grid-template-columns: 44% 46%;
    grid-template-rows: auto auto;
    gap: 16px;
    margin-top: 1rem;
    /* margin-bottom: 8rem; */
}

/* Tall post spans both rows */
.bookpost-item.tall {
    grid-column: 1;
    grid-row: 1 / span 2;
}

/* Container for the two small posts */
.small-container {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}

.small-container img {
    max-height: 14rem;
}

.bookpost-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 9px rgba(0, 0, 0, 0.5);
    box-shadow: var(--box-shadow);
    border-radius: 1rem;
    text-decoration: none;
    color: #D1D1D1;
    background: #1E2A38;
    border: var(--border);
}

.bookpost-item img {
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.bookpost-item.tall img {
    flex: 8;
}

.bookpost-item.tall .title {
    flex: 0;
    margin: 2rem 0 3rem 0;
}

.bookpost-item.tall .likes {
    flex: 3.5;
}

/* Swap columns on alternate rows */
.bookpost-row.alt {
   grid-template-columns: 44% 46%;
}
.bookpost-row.alt .bookpost-item.tall {
   grid-column: 2;
}
.bookpost-row.alt .small-container {
   grid-column: 1;
}

/* Title under image */
.bookpost-item .title {
   padding: 8px;
   text-align: center;
}

.post-book-title {
    font-size: 1rem;
    position: fixed;
    bottom: 8.5rem;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    color: black;
}

/* ----- Book page search: ----- */
.search-fake-input {
    display: block;
    width: 90%;
    max-width: 450px;
    border-radius: 8px;
    background: #1e2a38;
    color: #d1d1d1;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: var(--box-shadow);
    cursor: text;
    text-align: center;
    border: var(--border);
}

.search-toggle-container {
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.search-container {
    position: fixed;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
    top: 0.85rem;
    transition: top 0.3s ease;
    border-radius: 5px;
    z-index: 2;
    width: 90%;
    max-width: 450px;
    transition: top 1s ease;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 42, 56, 0.7); /* Semi-transparent background */
    backdrop-filter: blur(40px);
    z-index: -1;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.clear-input {
    color: var(--text-color);
}

#search-input {
    width: 100%;
    padding: 0.2rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
    background: #1e2a38;
    color: #d1d1d1;
    box-shadow: var(--box-shadow);
    border: var(--border);
    text-align: center;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 0 30px #1e2a38;
}

body.dark #search-input:focus {
    outline: none;
    box-shadow: 0 0 30px #b9f3fe;
}

#clear-input {
    position: absolute;
    right: -2rem;
    font-size: 1.3rem;
    cursor: pointer;
}

.search-results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    padding: 2rem 0;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
}

.search-results a {
    color: var(--text-color);
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-results li {
    padding: 5px 10px;
    box-shadow: var(--box-shadow);
    border: var(--border);
    width: 90%;
    border-radius: 2rem;
}

.search-results li a {
    text-decoration: none;
    color: var(--text-color);
}

.search-results li:hover {
    background: #85a5bd;
}

body.dark .search-results li:hover {
    background: #1e2a38d1;
}

/* ------------------------------------------------ chat */

.chat-body {
    margin: 0;
    /* background-color: #f4f4f9; */
    color: #1e2a38;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#chat-log {
    width: 90%;
    max-width: 690px;
    height: 75vh;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 21rem;
    z-index: 1;
}

#chat-log .message {
    margin: 1.5rem 0;
    padding: 8px;
    max-width: 90%;
    width: fit-content;
    word-wrap: break-word;
    background: linear-gradient(145deg, #f7fbff, #dee6f1);
}

#chat-log .sent {
    margin-left: auto;
    text-align: right;
    border-radius: 18px 18px 6px 18px;
}

#chat-log .received {
    margin-right: auto;
    text-align: left;
    border-radius: 18px 18px 18px 6px;
}

#chat-log .message b {
    color: #e17697;
    display: block;
    margin-bottom: 8px;
    font-weight: 100;
}

#chat-log .message small {
    display: block;
    font-size: 0.8em;
    color: #555;
    margin-top: 12px;
}

.chat-input-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 600px;
    background: #1e2a38;
    padding: 0.58rem;
    border-radius: 3rem;
    z-index: 1;
    direction: ltr;
}

#chat-input {
    direction: rtl;
    outline: none;
    width: 100%;
    max-width: 500px;
    height: 44px;
    border: none;
    border-radius: 2rem;
    font-size: 1em;
    margin-right: 10px;
    background: #34404f;
    color: #d1d1d1;
    padding: 0.8rem;
    resize: none;
    overflow: hidden;
    min-height: 44px;           /* default one-line height */
    line-height: 1.2;           /* consistent line height */
    transition: height 0.2s ease;
    text-align: center;
}

#send {
    transition: background-color 0.3s ease;
}

#send:active {
    transform: scale(0.9);
}

/* Scrollbar Styling */
#chat-log::-webkit-scrollbar {
    width: 8px;
}

#chat-log::-webkit-scrollbar-thumb {
    background: #1e2a38;
    border-radius: 4px;
}

#chat-log::-webkit-scrollbar-thumb:hover {
    background: #3a3a6c;
}

/* --------------------------------------------------- UFO --------------------------------------------------------- */

/* -----ufo pagination */
.ufo-pagination {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 2rem;
    width: 78%;
    max-width: 450px;
}

.ufo-pagination a, .ufo-pagination span {
    text-decoration: none;
    direction: ltr;
    display: flex;
    justify-content: center;
    color: #d1d5db;
    background: #1e2a38;
}

.galaxies-link {
    box-shadow: var(--box-shadow);
    border: 1px solid #d1d5db85;
    border-radius: 1rem;
    width: 10rem;
    text-align: center;
}

.ufo-pagination span {
    color: #d1d5db;
    margin: 0 1rem;
}

.next-galaxy-svg, .previous-galaxy-svg {
    width: 1.5rem;
}

.disabled-link svg {
    opacity: 0.3;
}

.galaxies-link:active, .next-galaxy-svg:active, .previous-galaxy-svg:active {
    transform: scale(0.9);
}

/* ----- galaxies overvire */
.galaxies-links-container {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0rem 5rem 0rem;
}

.galaxy-link {
    width: 90%;
    max-width: 300px;
    height: 3rem;
    box-shadow: var(--box-shadow);
    border: var(--border);
    border-radius: 3rem;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Battery Indicator Container on the left */
#battery-indicator {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    text-align: center;
    z-index: 1000; /* Make sure it's on top */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1e2a38;
}

/* Battery container outline */
.battery {
    position: relative;
    width: 40px;
    height: 15rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #d1d5db85;
}

/* Battery fill default is defined below so its height is animated,
but no background is set inline */
.battery-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    transition: height 1.5s ease-in-out;
    z-index: 1;
    border-radius: 4px;
}

/* When fuel is below 10 minutes (low fuel) */
.battery-fill.low {
    background: linear-gradient(to top, #f44336, #e57373); /* Red gradient */
}

/* When fuel is between 10 and 30 minutes (medium fuel) */
.battery-fill.medium {
    background: #B9CBD9;
}

/* When fuel is at or above 30 minutes (full) */
.battery-fill.full {
    background: linear-gradient(to top, #4caf50, #81c784); /* Green gradient */
}

/* Overlay text showing the fuel available */
.battery-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 2;
    pointer-events: none;
    color: darkorange;
}

/* Battery tip representing the positive terminal */
.battery-tip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 10px;
    border-radius: 2px;
    z-index: 3;
    border: 1px solid #d1d5db85;
}

/* Launch button styling */
#launch-btn {
    font-size: 1rem;
    cursor: pointer;
    background: green;
    border: none;
    outline: none;
    border-radius: 7px;
    border: 1px solid #d1d5db85;
    box-shadow: var(--box-shadow);
}

#launch-btn:active {
    transform: scale(0.9);
}

#launch-btn svg {
    width: 1.6rem;
    margin-top: 5px;
}

#launch-btn:disabled {
    background: none;
    cursor: not-allowed;
}
  
/* Chart Container & Rocket Styles */
#chart-container {
    width: 100%;
    max-width: 1150px;
    margin: 20px auto;
    overflow-y: auto;
}

.streak {
    position: fixed;
    left: 1rem;
    top: 4rem;
    font-size: 1rem;
    z-index: 10;
}

.streak a {
    color: #d1d1d1;
    text-decoration: none;
}

.streak h3 {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.streak svg {
    width: 1.6rem;
}

#y-axis {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
}

.y-label {
    font-size: 14px;
    position: absolute;
    right: 5px;
}

.h-line {
    position: absolute;
    height: 1px;
    background: #d1d1d1;
    opacity: 0.6;
    transition: top 4s ease-in-out;
}

.h-line span {
    position: absolute;
    font-size: 14px;
    color: white;
    background: #000;
    padding: 2px 6px;
    border-radius: 5px;
    transform: translateY(-50%);
    right: 0;
}

#rocket, .planet {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#rocket {
    width: 9rem;
    transition: top 4s ease-in-out;
    z-index: 3;
}

.planet {
    width: 7rem;
    z-index: 2;
}

/* ------------------------------------------------ saved_items pages ---------------------------------------------------- */

.items-2-3-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

/* ------------------------------------------------ note ------------------------------------------------------------ */

/* ----- add */

.add-note-btn {
    display: flex;
}

.add-note-svg {
    width: 1.6rem;
    stroke: var(--text-color);
}

.note-indicator {
    width: 5px;
    height: 5px;
    background: #29975f;
    border-radius: 1rem;
}

.modal {
    display: none; /** hidden by default **/
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background: rgba(0, 0, 0, 0.5)
}

.modal-content {
    position: absolute;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 2rem;
}

.hidden {
    display: none;
}

.add-note-textarea {
    border: none;
    resize: none;
    outline: none;
    background: none;
    color: var(--slide-text-color);
    width: 100%;
    height: 10rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 20px;
}

.modal-actions button {
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 2rem;
    box-shadow: var(--box-shadow);
}

body.dark .modal-actions button {
    border: var(--border);
}

/* ----- notes */

.note-slide-text {
    opacity: 0.6;
}

.note-content {
    border-right: 2px solid;
    padding-right: 15px;
}

.save-date {
    opacity: 0.6;
    margin: 0;
}

.saved-note-actions {
    display: flex;
    gap: 1rem;
}

.delete-note-svg {
    width: 1.5rem;
    stroke: var(--text-color);
}

/* -------------------------------------------------- notification */

.notification-section {
    margin: 1rem 0;
}

.notification-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin: 1rem;
}

.notifications-container {
    max-width: 600px;
    margin: 0 auto;
    margin-top: 2rem;
    padding: 1rem;
}

.notification-item {
    position: relative;
}

.notification {
    margin-bottom: 12rem;
}

.notification-username {
    font-weight: bold;
    color: #007bff;
}

.notification-comment {
    display: block;
    color: #555;
    margin-bottom: 1rem;
    border-right: 1px solid;
    padding: 0 0.5rem;
}

body.dark .notification-comment {
    color: #858585;
}

.notification-reply {
    display: block;
    font-weight: bold;
    color: var(--text-color);
}

.notification-reply-btn {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
}

.notification-reply-form {
  direction: ltr;
  position: absolute;
  bottom: -8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 650px;
}

.notification-timestamp {
    display: block;
    font-size: 0.85em;
    color: #1e2a38;
    margin-top: 5px;
}

/* ------------------------------------------------------- communicate --------------------------------------------- */

.corner {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    position: fixed;
    left: -50px;
    top: -50px;
    box-shadow: 45px 33px 29px #57adbd;
}

.notification-link {
    display: inline-block;
    width: 2.5rem;
    position: fixed;
    top: 1rem;
    right: 1rem;
}

body.dark .notification-svg {
    stroke: var(--slide-text-color);
}

.notification-indicator {
    position: absolute;
    top: 3.1px;
    right: 3.1px;
    width: 10.45px;
    height: 10.45px;
    background: #e19d4c;
    border-radius: 50%;
}


.support-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    text-decoration: none;
    border-radius: 25px;
    padding: 0.15rem 1rem;
    background: #1e2a38;
    color: #d1d1d1;
    box-shadow: var(--box-shadow);
    border: var(--border);
    z-index: 1;
}

.sphere-chat-preview {
    max-width: 800px;
    width: 90%;
    margin: 7rem auto;
}
.chat-sphere {
    width: 100px; height: 100px;
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    align-items: center; justify-content: center;
    margin: 0 1rem;
    transition: transform 0.3s;
    box-shadow: -14px 10px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    background: #1e2a38;
    color: #d1d1d1;
    font-weight: bold;
    font-size: 1.2rem;
}

body.dark .chat-sphere {
    box-shadow: -14px 10px 40px rgba(209, 209, 209, 0.2);
}
.chat-sphere.small {
    transform: scale(0.8);
}
.chat-sphere.medium {
    transform: scale(1.0);
}
.chat-sphere.large {
    transform: scale(1.2);
}

.chats-container {
    max-width: 500px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10rem;
    margin: 0 auto;
}

.chat-item {
    position: relative;
    text-decoration: none;
    color: #d1d1d1;
    background: #1e2a38;
    box-shadow: var(--box-shadow);
    border: var(--border);
    padding: 1rem;
    border-radius: 18px;
    height: 15rem;
    max-width: 15rem;
    width: 100%;
}

.chat-item-image svg {
    width: 3rem;
}

.chat-item-image img {
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 50%;
}

.chat-item-image, .sarzamin-id {
    text-align: center;
}
.sarzamin-id b {
    color: gold;
    font-weight: 100;
}

.unread-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    color: white;
    font-size: 14px;
}

/* ------------------------------------------------- planet challengs ------------------------------------------------*/

.join-planet-challenge-btn {
    box-shadow: var(--box-shadow);
    background: #1e2a38;
    border-radius: 2rem;
    color: #d1d5db;
    padding: 1rem 5rem;
}

body.dark .join-planet-challenge-btn {
    border: var(--border);
}

.join-planet-challenge-btn:active {
    transform: scale(0.9);
    transition: transform 0.018s ease;
}

/* ------------------------------------------------ Audio Recorder ------------------------------------------------- */

.ar-root {
  --accent-1: #7b61ff;
  --accent-2: #5f4acb;
  --accent-3: #2fb6ff;
  --bg: #0f0f12;
  --muted: rgba(255,255,255,0.12);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  direction: rtl;
  background: #1a1a24;
  padding: 0.5rem;
  border-radius: 1rem;
}

/* Controls row */
.ar-controls {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: .5rem 0;
}
.ar-btn {
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: none;
  padding: .45rem .7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .95rem;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.ar-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.ar-btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

.ar-btn-record {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 8px 24px rgba(123,97,255,0.18);
}
.ar-btn-danger {
  background: transparent;
  color: #ff7373;
  border: 1px solid rgba(255,115,115,0.12);
}

/* Wave container */
.ar-wave-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.03);
}

/* canvas */
.ar-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(180deg, #0f0f12, #09090a);
}

/* Selection overlay + handles */
.ar-overlay {
  position: absolute;
  top: 6px;
  height: calc(100% - 12px);
  background: linear-gradient(90deg, rgba(123,97,255,0.14), rgba(47,182,255,0.08));
  border-radius: 6px;
  pointer-events: none;
  transition: left .06s linear, width .06s linear, opacity .12s;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.35);
}

.ar-handle {
  position: absolute;
  top: 6px;
  height: calc(100% - 12px);
  width: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 6px;
  transform: translateX(-50%);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 0 6px rgba(255,255,255,0.02);
  transition: left .05s linear, transform .12s;
  cursor: ew-resize;
}
.ar-left { background: linear-gradient(90deg, var(--accent-1), rgba(255,255,255,0.02)); }
.ar-right { background: linear-gradient(270deg, var(--accent-3), rgba(255,255,255,0.02)); }

/* Playhead */
.ar-playhead {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  width: 1px;
  background: linear-gradient(180deg, #ff7a7a, #ff4d4d);
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255,77,77,0.6);
  z-index: 3;
  transition: left .02s linear;
}

/* Hover vertical line */
.ar-hoverline {
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: rgba(255,255,255,0.06);
  transform: translateX(-50%);
  display: none;
  z-index: 2;
}

/* Info row */
.ar-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: .5rem;
  color: #ddd;
  font-size: .92rem;
}
.ar-duration { color: #bfbcff; }
.ar-selection { color: #a7f0ff; }
.ar-nowtime { margin-left: auto; color: #fff; font-weight: 600; }

/* hidden audio */
.ar-hidden-audio { display:none; }

/* fallback input hidden by default (native file input should be visible if you render {{ form.audio }}) */
.ar-fallback-input { display:none !important; }

/* toast */
.ar-toast {
  position: fixed;
  right: 1rem;
  bottom: 1.4rem;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: .6rem .9rem;
  border-radius: 10px;
  transform: translateY(14px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  z-index: 9999;
}
.ar-toast-show { transform: translateY(0); opacity: 1; }

/* responsive tweaks */
@media (max-width: 640px) {
  .ar-wave-wrap { height: 110px; }
  .ar-controls .ar-btn { font-size: .85rem; padding: .35rem .6rem; }
}

/* ------------------------------------------------ coins page ---------------------------------------------------- */

.total-points-coin-svg-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-weight: bold;
    font-size: 3rem;
}

/* ------------------------------------------------ Responsive: ---------------------------------------------------- */

/* Large devices (laptops/desktops, 1200px and down) */
@media screen and (max-width: 1200px) {

    #chat-log {
        max-width: 650px;
    }

}

/* Medium devices (tablets, 992px and down) */
@media screen and (max-width: 992px) {

    .post-list {
        width: 85%;
    }

    .post {
        height: 12rem;
    }

    .post-title-text {
        font-size: 1.3rem;
    }

    .back-icon {
        top: 65px;
        left: 15px;
    }

    #chat-log {
        max-width: 550px;
    }
}

/* Small devices (landscape tablets, 768px and down) */
@media screen and (max-width: 768px) {
    .post-list {
        width: 90%;
    }

    .post {
        height: 11rem;
        padding: 8px;
    }

    .post-title {
        gap: 2rem;
        margin-right: 1rem;
    }

    .post-title-text {
        font-size: 1.15rem
    }

    .post-title-author,
    .post-title-description {
        font-size: 0.95rem;
    }

    .login-form {
        width: 90%;
        max-width: 360px;
    }

    .book-page-image {
        width: 6rem;
        height: 6rem;
    }

    .header {
        left: 0;
        right: 0;
        gap: 10px;
    }

    #chat-log {
        margin-bottom: 21rem;
    }
}

/* Extra small devices (phones, 576px and down) */
@media screen and (max-width: 576px) {
    .post {
        height: 10rem;
    }

    .post-title {
        margin-right: 0;
        gap: 1rem;
    }

    .menu {
        font-size: 1.2em;
    }

    .custom-admin-ui-main {
        padding: 1rem;
    }

    .post-grid {
        padding: 2rem 0 8rem 0;
    }

    .answer-tracker-container {
        width: 95%;
    }

    .answer-tracker .answer {
        font-size: 21px;
    }

    .chapter-levels {
        gap: 2.6rem;
    }

    #chat-log {
        scrollbar-width: none;          /* Firefox */
        -ms-overflow-style: none;       /* IE & Edge */
        overflow-y: scroll;             /* Ensures scrolling still works */
    }
      
    #chat-log::-webkit-scrollbar {
        display: none;                  /* Chrome, Safari, and Opera */
    }

    #chat-log {
        margin-bottom: 20rem;
    }

    .filter-container {
        padding-right: 0.5rem;
    }

    .post-title-text {
        font-size: 1.1rem;
    }

}


/* ----- Just for the chat characters: ----- */
@media screen and (max-width: 430px) {

    #chat-log {
        margin-bottom: 16rem;
    }

    .filter-container {
        margin-top: 3rem;
    }

    .post-grid {
        padding-top: 1rem;
    }

    .crazies-container {
        width: 98%;
    }

}
/* ----- Just for the chat characters: ----- */


/* Very small devices (small phones, 400px and down) */
@media screen and (max-width: 400px) {

    .post {
        height: 8rem;
    }

    .post-title {
        gap: 0.5rem;
    }

    .post-title-text {
        font-size: 0.9rem;
    }
    
    .post-title-author, .post-title-description {
        font-size: 0.8rem;
    }

    .custom-admin-ui-buttons-container {
        flex-direction: column;
        align-items: center;
    }

    .custom-admin-ui-delete-btn,
    .custom-admin-ui-cancel-btn,
    .custom-admin-ui-save-btn {
        width: 80%;
    }

    .answer-tracker .answer {
        font-size: 18px;
    }

    .chapter-levels {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .header a {
        font-size: 0.8rem;
    }

    .user-coins svg {
        height: 1.3rem;
    }

    .crazy {
        width: 60px;
        height: 60px;
    }

    .index-topic-content {
        flex-wrap: wrap;
    }

}

@media screen and (max-width: 330px) {

    .header a {
        font-size: 0.6rem;
    }

    .user-coins svg {
        height: 1rem;
    }

    .post-title-text {
        font-size: 0.8rem;
    }

    .crazy {
        width: 51px;
        height: 51px;
    }

}

/* -------------------- Responsive height */

@media (min-height: 650px) {

    #chat-log {
        margin-bottom: 17rem;
    }

}

@media (min-height: 700px) {

    #chat-log {
        margin-bottom: 18.2rem;
    }

}

@media (min-height: 750px) {

    #chat-log {
        margin-bottom: 19.8rem;
    }

}

@media (min-height: 800px) {
    #draggableDetailsContainer {
        --initial-bottom: -74%;
        bottom: var(--initial-bottom);
    }

    #chat-log {
        margin-bottom: 21.2rem;
    }

}

@media (min-height: 850px) {

    #chat-log {
        margin-bottom: 23rem;
    }

}

@media (min-height: 900px) {

    #chat-log {
        width: 95%;
        margin-bottom: 25rem;
    }

}