
@font-face {
    font-family: 'IranSans';
    src: url("/static/fonts/IranSans.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #FF624A;
    --background: #ffffff;
    --brand: #FF624A;
    --brand-banner: #6c757d;
    --text: #0f172a;
    --icon: #0f172a;
    --text-area-background-color: #f3f4f6;
    --qr-border: #e5e7eb;
    --font-primary: 'Vazirmatn', 'IranSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-card: 1.5rem;
}

[data-theme="dark"] {
    --background: #020617;
    --brand: #e5e7eb;
    --brand-banner: #9ca3af;
    --text: #e5e7eb;
    --icon: #e5e7eb;
    --text-area-background-color: #020617;
    --qr-border: #475569;
}

/*.landing-image-1 {*/
/*  content: var(--landing-image-1);*/
/*}*/
/*.landing-image-2 {*/
/*  content: var(--landing-image-2);*/
/*}*/
.color {
    background-color: var(--background);
    color: var(--text);
}

body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--text);
    width: 100%;
    overflow-x: hidden;
    line-height: normal;
}

h1.lh-1, h2.lh-1, h3.lh-1, h4.lh-1, h5.lh-1 {
    line-height: 1.4 !important;
}


.bg-brand {
    color: var(--brand);
}

.bg-brand-banner {
    color: var(--brand-banner);
}

.text-1 {
    color: #f79533
}

.text-1::placeholder {
    color: #f79533;
    opacity: 0.5;
}

.text-2 {
    color: #f37055;
}

.text-2::placeholder {
    color: #f37055;
    opacity: 0.5;
}

.text-3 {
    color: #ef4e7b;
}

.text-3::placeholder {
    color: #ef4e7b;
    opacity: 0.5;
}

.text-4 {
    color: #a166ab;
}

.text-4::placeholder {
    color: #a166ab;
    opacity: 0.5;
}

.modal input[type=text] {
    background-color: var(--background);
    color: var(--text);
}

.link-text {
    margin-top: auto;
    margin-bottom: auto;
    color: var(--primary) !important;
    cursor: pointer;
}

.link-text:hover {
    /*color: var(--color) !important;*/
}

textarea {
    outline: none;
    border: 5px solid var(--text);
    border-radius: 15px;
    background-color: var(--text-area-background-color);
    color: var(--text);
    padding: 20px;
    border-image: linear-gradient(45deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82) 1;
    /* resize: vertical; */
}

textarea::placeholder {
    font-size: 1.1rem !important;
    color: var(--text);
    text-align: center;
    padding-top: 20px;
    opacity: 0.6;
}

.qtext-input {
    outline: none;
    border: 3px solid var(--text);
    border-radius: 20px;
    background-color: var(--text-area-background-color);
    color: var(--text);
    padding: 10px;
    max-width: 100px;
    border-image: linear-gradient(45deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82) 1;
    text-align: center;
    font-size: x-large;
    /* resize: vertical; */
}

.gradient-border {
    --borderWidth: 10px;
    background: inherit;
    position: relative;
    display: block;
}

.gradient-border:after {
    content: '';
    position: absolute;
    top: calc(-1 * var(--borderWidth));
    left: calc(-1 * var(--borderWidth));
    height: calc(100% + var(--borderWidth) * 2);
    width: calc(100% + var(--borderWidth) * 2);
    background: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
    z-index: -1;
    animation: animatedgradient 10s ease alternate infinite;
    background-size: 300% 300%;
}

.list-gradient {
    border-style: solid;
    border-width: 3px;
    border-image: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82) 1;
    animation: animatedgradient 10s ease alternate infinite;
    background-size: 300% 300%;
}

@keyframes animatedgradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.app-name-gradient {
    background: linear-gradient(to right, #f79533 10%, #f37055 20%, #ef4e7b 30%, #a166ab 40%, #5073b8 50%, #1098ad 60%, #07b39b 70%, #6fba82 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: app-name-gradient 10s linear infinite;
}

@keyframes app-name-gradient {
    to {
        background-position: 200% center;
    }
}

.qrcode {
    border: 4px solid var(--qr-border);
    border-radius: 5px;
    padding: 1px;
    cursor: pointer;
}

/* themming */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.theme-switch-wrapper em {
    font-size: 1rem;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.logout {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 90px;
}

.logout a {
    fill: var(--text);
}

input:checked + .slider {
    background-color: var(--background);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider svg {
    /*color: var(--color);*/
    position: absolute;
    transition: opacity 0.2s ease 0s, transform 0.35s ease 0s;
    pointer-events: none;
}

.feather-moon {
    opacity: 0;
    /* left: 9px; */
    bottom: 9px;
    transform: translateX(4px);
}

.feather-sun {
    opacity: 1;
    /* right: 10px; */
    bottom: 9px;
    transform: translateX(0px);
}

input:checked + .slider .feather-moon {
    opacity: 1;
    transform: translateX(0);
}

input:checked + .slider .feather-sun {
    opacity: 0;
    transform: translateX(-4px);
}

.online {
    display: block;
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.7);
    border-radius: 50%;
    background-color: green;
    cursor: pointer;
    -webkit-animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
    -moz-animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
    -ms-animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
    animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@-webkit-keyframes pulse {
    to {
        box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
    }
}

@-moz-keyframes pulse {
    to {
        box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
    }
}

@-ms-keyframes pulse {
    to {
        box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
    }
}

@keyframes pulse {
    to {
        box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
    }
}

/* scroll */
::selection {
    background-color: #ff624a6e;
    color: var(--text);
}

::-webkit-scrollbar-track {
    background-color: white;
    cursor: pointer !important;
}

::-webkit-scrollbar {
    width: 5px !important;
    height: 5px !important;
    background-color: black;
    cursor: pointer !important;
}

::-webkit-scrollbar-thumb {
    cursor: pointer !important;
    background-color: #FF624A;
    border-radius: 20px !important;
}

/* recently shared items */
.recently-list {
    display: flex;
    padding: 10px;
    overflow-x: auto;
    list-style: none;
    max-height: 120px;
}

.recently-item {
    width: 100px;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex !important;
    flex-direction: column;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.sharing-content {
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.sharing-block {
    font-size: 20pt;
    line-height: 0.6;
}

.sharing-code {
    font-weight: 900;
}

.btn-outline-primary {
    color: #FF624A;
    border-color: #FF624A;
}

.btn-outline-primary:hover {
    background-color: #FF624A;
    border-color: #FF624A;
}

.text-muted {
    color: var(--text) !important;
}

/* --- Modern layout & components ---------------------------------------- */

.app-body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #f9fafb 0, #e5e7eb 40%, #d1d5db 100%);
}

[data-theme="dark"] .app-body {
    background-color: #020617;
}

[data-theme="dark"] .app-main {
    background: #000000;
}

.app-main {
    display: flex;
    align-items: stretch;
}

.app-page {
    max-width: 960px;
}

/* Navbar */

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #fb7185, #6366f1);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}


[data-theme="dark"] .app-navbar {
    background: rgba(2, 6, 23, 0.96);
    border-bottom-color: rgba(51, 65, 85, 0.9);
}

.app-navbar .navbar-brand {
    color: var(--text);
}

/* Logo */



.brand-mark-main {
    font-size: 1rem;
}

.brand-mark-sub {
    font-size: 0.9rem;
    margin-inline-start: 0.1rem;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Cards */

.app-card {
    background-color: var(--background);
    border-radius: var(--radius-card);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    padding: 1.75rem 1.75rem 1.5rem;
}

[data-theme="dark"] .app-card {
    background-color: #020617;
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}

/* Footer */

.app-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.9);
}

[data-theme="dark"] .app-footer {
    background: #020617;
    border-top-color: rgba(51, 65, 85, 0.9);
}

/* Hero section */

.hero-heading {
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 0.98rem;
    opacity: 0.85;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background-color: rgba(148, 163, 184, 0.16);
    font-size: 0.8rem;
}

.dot-live {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.35);
}

/* Feature chips */

.feature-chip {
    background-color: rgba(148, 163, 184, 0.16);
    color: var(--text);
    border-radius: 999px;
    font-size: 0.75rem;
}

/* Buttons & inputs unified radius */

.btn,
.btn-sm,
.btn-lg {
    border-radius: var(--radius-card);
}

.form-control {
    border-radius: var(--radius-card);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: rgba(249, 250, 251, 0.9);
    color: var(--text);
}

[data-theme="dark"] .form-control {
    background-color: #020617;
    border-color: rgba(51, 65, 85, 0.95);
    color: var(--text);
}

/* Primary buttons */

.btn-primary {
    background: linear-gradient(135deg, #f97316, #fb7185, #6366f1);
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline-primary {
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.9);
}

.btn-outline-primary:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

/* Share code input */

.qtext-input {
    width: 100%;
    max-width: none;
    border-radius: var(--radius-card);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: var(--text-area-background-color);
    color: var(--text);
    padding: 0.8rem 1.2rem;
    text-align: center;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    border-image: none;
}

[data-theme="dark"] .qtext-input {
    background-color: #020617;
}

/* Editor textarea specifically for share page */

textarea#id_content,
.share-textarea {
    border-radius: var(--radius-card);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: var(--text-area-background-color);
    padding: 1.25rem 1.5rem;
    font-size: 0.98rem;
    line-height: 1.8;
    min-height: 260px;
    width: 100%;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.25);
    border-image: none;
}

[data-theme="dark"]  .form-text {
    color: #9ca3af !important;
}

[data-theme="dark"] textarea#id_content,
[data-theme="dark"] .share-textarea {
    color: var(--text);
}

[data-theme="dark"] .share-textarea::placeholder {
    background-color: #020617;
    border-color: rgba(51, 65, 85, 0.95);
    color: var(--text);
}

/* Hero preview fake editor */

.hero-preview .fake-editor {
    background-color: rgba(248, 250, 252, 0.9);
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.7);
}

[data-theme="dark"] .hero-preview .fake-editor {
    background-color: #020617;
    border-color: rgba(51, 65, 85, 0.9);
}

/* Share header badge */

.share-header-badge {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    background-color: rgba(148, 163, 184, 0.18);
}

/* Small text muted override for dark */
[data-theme="dark"] .text-muted {
    color: #9ca3af !important;
}
