@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: normal; /* 400 */
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: bold; /* 700 */
    font-style: normal;
}

.hint {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    color: #ff4444;
    font-size: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.hint.show {
    opacity: 1;
}

.bread-moon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .bread-moon {
        width: 110px;
        height: 110px;
        top: 5px;
        right: 5px;
    }
}

.vertical-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(132, 75, 245, 0.4);
    border: 2px solid rgba(132, 75, 245, 0.2);
    border-radius: 10px;
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.menu-item {
    color: rgba(232, 229, 230, 0.8);
    font-size: 18px;
    font-family: Vazirmatn, sans-serif;
    padding: 10px 20px;
    margin: 5px 0;
    cursor: pointer;
    transition: background 0.3s;
    background: rgba(220, 220, 220, 0.2);
}

.menu-item:hover {
    background: rgba(232, 229, 230, 0.5);
    color: #fff;
}

.menu-title {
    color: rgba(232, 229, 230, 0.8);
    font-size: 22px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    margin-bottom: 15px;
}

.menu-input {
    width: 200px;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #DAA520;
    border-radius: 5px;
    font-family: Vazirmatn, sans-serif;
    font-size: 16px;
}

.signup-link {
    color: #black;
    font-size: 15px;
    font-family: Vazirmatn, sans-serif;
    margin: 10px 0;
    cursor: pointer;
    text-decoration: underline;
}

.signup-link:hover {
    color: blue;
}

.space-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}

.space-item {
    color: rgba(232, 229, 230, 0.8);
    font-size: 16px;
    font-family: Vazirmatn, sans-serif;
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.3s;
    direction: rtl; /* Right-to-left for Persian */
    text-align: right; /* Align text to right */
}

.space-item:hover {
    background: #844bf5e6;
    color: #fff;
}

.notepad-content {
    width: 300px;
    height: 150px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #DAA520;
    border-radius: 5px;
    padding: 10px;
    font-family: Vazirmatn, sans-serif;
    font-size: 16px;
    resize: none;
    margin-bottom: 15px;
}

.menu-back {
    background: #666;
    color: #fff;
}

.menu-back:hover {
    background: #555;
}

body {
    height: 100vh;
    margin: 0;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    touch-action: manipulation;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0e24 0%, #000000 100%);
    transition: filter 0.3s ease;
    z-index: 0;
}

.background.blur {
    filter: blur(2px);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.5s ease;
    opacity: 0.7;
}

.star.blur {
    filter: blur(2px);
}

@keyframes subtleShine {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes brightShine {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1.2; box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8); }
}

@keyframes cloudFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1px, -1px); }
    75% { transform: translate(1px, 1px); }
}

.cloud {
    position: absolute;
    cursor: move;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: filter 0.3s ease;
    z-index: 10;
    visibility: visible;
    opacity: 1;
}

.cloud.blur {
    filter: blur(2px);
}

.cloud.selected {
    filter: none !important;
    z-index: 2;
}

.cloud-content {
    animation: cloudFloat 3s ease-in-out infinite;
    position: relative;
}

.cloud svg {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
}

.cloud-input {
    position: absolute;
    top: 50%;
    left: 46%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    text-align: center;
    font-size: 22px;
    width: 90%;
    color: black;
    text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white, 0 0 5px rgba(0, 0, 0, 0.2);
    outline: none;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

.cloud-menu, .stages-menu {
    display: none;
    position: fixed;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 10px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stages-menu {
    top: 50px;
    left: 10px;
    width: 150px;
}

.cloud-menu {
    top: 410px;
    left: 10px;
    width: 180px;
}

.cloud-menu.active, .stages-menu.active {
    display: block;
}

.color-options, .size-options {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 10px;
}
.size-options {
    justify-content: center; /* ADD THIS LINE */
}

.stages-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.color-option, .size-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.color-option:hover, .size-option:hover {
    transform: scale(1.1);
}

.size-option {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: black;
    border: 2px solid transparent;
}

.size-option.selected {
    border-color: black;
}

.stage-option {
    padding: 5px 10px;
    background: rgba(200, 200, 200, 0.5);
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.stage-option:hover {
    background: rgba(200, 200, 200, 0.8);
}

.floating-note {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    background: rgba(240, 240, 240, 1);
    border-radius: 10px;
    padding: 20px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.floating-note.active {
    display: flex;
}

.floating-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.floating-note-title {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.floating-note-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

.floating-note textarea {
    width: 100%;
    height: 300px;
    background: rgb(200, 200, 200);
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    color: #333;
    resize: none;
    overflow-y: auto;
    outline: none;
    flex-grow: 1;
    box-sizing: border-box;
}

.floating-note-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.floating-note-buttons button {
    font-family: 'Vazirmatn', sans-serif;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.floating-note-buttons .done-btn {
    background: #4CAF50;
    color: white;
}

.floating-note-buttons .done-btn:hover {
    background: #45a049;
}

.floating-note-buttons .consult-btn {
    background: #2196F3;
    color: white;
}

.floating-note-buttons .consult-btn:hover {
    background: #1e87db;
}

.connection-status {
    position: fixed;
    top: 160px;
    right: 20px;
    padding: 5px 10px;
    background: #ff4444;
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    font-family: Vazirmatn, sans-serif;
    z-index: 1001;
    display: none;
}

.connection-status.online {
    background: #4CAF50;
    display: block;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
        position: fixed;
        left: 0;
        right: 0;
    }


    .cloud {
        max-width: calc(100vw - 20px);
    }
    .stages-menu {
        top: 32%;
        left: 50%;
        transform: translateX(-50%);
        width: 130px;
        max-width: 260px;
    }
    div.rename-menu {
        position: fixed;
        top: 18%; /* Your preferred value, adjusted later for Issue 2 */
        left: 50%;
        transform: translateX(-50%);
        width: 160px;
        max-width: 260px;
        text-align: center;
        z-index: 100; /* Match stages-menu and cloud-menu */
        background: rgba(255, 255, 255, 0.95); /* Less transparent, matches other menus */
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        direction: ltr;
    }
    .cloud-menu {
        top: 2%;
        left: 50%;
        transform: translateX(-50%);
        width: 160px;
        max-width: 260px;
        text-align: center;
    }
    .cloud-menu .color-options {
        justify-content: center;
    }
    /*.cloud-menu .remove-btn {*/
    /*    display: block;*/
    /*    margin: 0 auto;*/
    /*}*/
    .cloud-menu button {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 30px; /* Ensure consistent height */
        line-height: normal; /* Prevent line-height issues */
    }
    .size-options {
        display: none;
    }
    .floating-note {
        width: 80%;
        height: 70%;
        max-height: 400px;
        padding: 10px;
        top: 60%;
        z-index: 1001;
    }
    .floating-note textarea {
        font-size: 14px;
        height: 200px;
        width: 100%;
        box-sizing: border-box;
    }
    .floating-note-buttons button {
        padding: 6px 12px;
        font-size: 12px;
    }
    .cloud-input {
        font-size: 19px;
        font-family: 'Vazirmatn', sans-serif;
        top: 50%;
        width: 90%;
        text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
    }
    .connection-status {
        top: 120px;
        right: 5px;
        font-size: 12px;
    }

    .menu-item {
    background: rgba(220, 220, 220, 0.4);

    }
    .vertical-menu {
    background: rgba(132, 75, 245, 0.6);;
    }
}

/*new update*/

.styled-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: 'Vazirmatn', Courier, monospace;
}

.warning-content {
    text-align: center;
}

.warning-content p {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}

.warning-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.warning-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.yes-btn {
    background: #ff4444;
    color: white;
}

.yes-btn:hover {
    background: #cc0000;
}

.no-btn {
    background: #ccc;
    color: #333;
}

.no-btn:hover {
    background: #999;
}

.space-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-space-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.delete-space-btn:hover {
    background: #cc0000;
}

.done-name-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    z-index: 10;
}

.done-name-btn:hover {
    background: #45a049;
}

.cloud-content {
    position: relative; /* Ensure button positions relative to this */
}

/*new 2*/

.rename-menu {
    font-family: 'Vazirmatn', sans-serif;
    position: fixed;
    top: 285px; /* Your adjusted value */
    left: 10px;
    width: 180px;
    background: rgba(255, 255, 255, 0.95); /* Match mobile and other menus */
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    z-index: 100; /* Match stages-menu and cloud-menu */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    direction: ltr;
}

.rename-menu.active {
    display: block;
}

.rename-menu input {
    width: 90%;;
    padding: 5px;
    margin: 0 auto 10px; /* Center with auto margins */
    display: block; /* Ensure block-level for centering */
    border: 1px solid #ccc;
    border-radius: 3px;
    direction: rtl; /* Right-to-left for Persian */
    text-align: right; /* Align text to right */
    box-sizing: border-box;
}

.rename-buttons {
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.rename-buttons button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.rename-buttons button:first-child {
    background: #4CAF50;
    color: white;
}

.rename-buttons button:last-child {
    background: rgba(255, 0, 0, 0.2);
    color: white;
}

.rename-buttons button:last-child:hover{
    background: rgba(255, 0, 0, 0.8);
}

.rename-buttons button:hover {
    opacity: 0.9;
}


/* New container for buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between buttons */
    margin-top: 10px;
}

.remove-btn {
    width: 60px; /* Same width as close-btn for text */
    height: 30px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 50px; /* Oval shape */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px; /* Readable text */
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 0.8);
}

.close-btn {
    width: 60px;
    height: 30px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.8);
}

.cloud-menu, .stages-menu {
    background: rgba(255, 255, 255, 0.95); /* Less transparent */
    z-index: 100; /* Above clouds */
    pointer-events: auto; /* Captures clicks */
}


/* In styles.css */
.verify-banner {
    background-color: #ffc107;
    color: #333;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    position: relative;
}

.close-banner-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    margin-left: 15px; /* In RTL, this will be margin-right */
}

.forgot-password-link {
    color: rgba(232, 229, 230, 0.8);
}

@media (max-width: 768px) {
    .signup-link, .forgot-password-link, .login-form a, .signup-form a {
        border-bottom: none; /* Keep the underline removed */
        text-decoration: none;
        color: rgba(232, 229, 230, 0.8);
        /* --- START: NEW LINES TO MAKE IT LOOK CLICKABLE --- */
        background-color: rgba(232, 229, 230, 0.2); /* A subtle dark background */
        padding: 3px 7px; /* Adds some space inside the tag */
        border-radius: 3px; /* Rounds the corners */
        display: inline-block; /* Ensures padding and background are applied correctly */
        margin-top: 5px; /* Adds some space above the link */
        /* --- END: NEW LINES --- */
    }


}

/* In static/css/styles.css */

/* --- PREVENT TEXT SELECTION ON BACKGROUND --- */
body, .background {
    -webkit-user-select: none; /* For Safari/Chrome */
    -moz-user-select: none;    /* For Firefox */
    -ms-user-select: none;     /* For Internet Explorer/Edge */
    user-select: none;         /* Standard */
}


#ios-overlay {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.4);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#ios-overlay.active { opacity: 1; }

.cloud .cloud-input {
  pointer-events: none;
}

.flash-error {
    color: rgba(232, 229, 230, 0.8);
}