
html, body {
    overflow-y: auto !important; /* اسکرول عمودی را فعال می‌کند و جایگزین hidden قبلی می‌شود */
    overflow-x: hidden; /* جلوگیری از اسکرول افقی ناخواسته */
}


.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.action-btn {
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.4) 100%);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg); cursor: pointer;
  transition: all 0.4s; backdrop-filter: var(--blur-heavy); 
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); gap: 15px;
}
    .action-btn-icon {
      width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.05); 
      border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
      font-size: 22px; color: #fff; box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
    }
    .action-btn span { font-weight: 500; font-size: 14px; color: #fff; text-align: center; letter-spacing: 0.5px;}
    .action-btn:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.3); box-shadow: 0 15px 30px rgba(0,0,0,0.5); background: linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(20, 20, 20, 0.7) 100%); }
    
    .recent-title { font-size: 18px; font-weight: 500; color: var(--text-muted); margin-top: 20px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
    .recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .recent-card {
      background: transparent; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 10px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.3s;
    }
    .recent-card img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #333; }
    .recent-info { display: flex; flex-direction: column; gap: 5px; }
    .r-name { font-size: 14px; font-weight: 600; color: var(--text-main); }
    .r-cat { font-size: 12px; color: var(--text-muted); }
    .recent-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }

    /* ===== TEXTAREAS ===== */
    textarea {
      width: 100%; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--glass-border); padding: 1px;
      color: var(--text-main); font-size: 15px; font-family: var(--font-main); resize: vertical; backdrop-filter: var(--blur-light); transition: all 0.3s ease; line-height: 1.6;
      text-align: left; /* حالت پیشفرض */
    }
    textarea:focus { outline: none; border-color: var(--glass-border-hover); background: rgba(10, 10, 10, 0.8); box-shadow: 0 0 20px rgba(255,255,255,0.03); }

    .final-result-box { width: 100%; max-width: 750px; display: flex; flex-direction: column; gap: 20px; transition: 0.4s; }
    .final-result-box.hidden { display: none; }
    .final-actions { display: flex; justify-content: center; gap: 15px; }
    #final-idea-text { min-height: 230px; } 

    /* ===== CHAT & TOOLBAR ===== */
    .chat-container {
        position: fixed; bottom: 0; left: 0; right: 0; padding: 15px 0 25px 0;
        background: rgba(0, 0, 0, 0.616); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border); z-index: 100; opacity: 0; transform: translateY(100%); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
      }
    .chat-container.show { opacity: 1; transform: translateY(0); }
    
    .chat-input-wrapper {
      display: flex; align-items: center; gap: 12px; padding: 10px 15px;
      background: rgba(20, 20, 20, 0.6); border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    }
    


    /* --- حالت افقی (اسکرول به چپ و راست) --- */
    #ideas-container:not(.vertical):not(.masonry) {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start; /* شروع از سمت چپ */
        padding: 20px; 
    }

    #ideas-container:not(.vertical):not(.masonry) .idea-card {
        min-width: 200px;
        max-width: 300px;
        flex-shrink: 0; 
        margin: 0;
    }

    /* --- حالت عمودی --- */
    #ideas-container.vertical {
        flex-direction: column;
        align-items: stretch;
        /* فلکس استارت جلوی بریده شدن و گیر کردن ایده‌های بالایی را می‌گیرد */
        justify-content: flex-start !important; 
        padding: 20px 0;
    }

    #ideas-container.vertical .idea-card {
        width: 80%;
        max-width: 700px;
        margin: 0 auto; /* وسط‌چین کردن کارت‌ها */
    }

    /* --- حالت Keep: از چپ به راست، ارتفاع به‌اندازه متن --- */
    #ideas-container.masonry {
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 20px;
    }

    #ideas-container.masonry .idea-card:not(.idea-card-focused):not(.idea-card-focusing) {
        width: auto;
        max-width: none;
        min-width: 0;
        height: auto;
        margin: 0;
        box-sizing: border-box;
    }

    #ideas-container.masonry .idea-text-content {
        white-space: pre-wrap;
        overflow: visible;
        height: auto;
    }

    #ideas-container.masonry::after {
        content: '';
        display: block;
        height: var(--masonry-height, 0px);
        pointer-events: none;
    }

/* ظاهر کارت‌ها */
.idea-card {
  /* استفاده از rgba برای شفافیت (عدد آخر میزان شفافیت از 0 تا 1 است) */
  background: rgba(32, 32, 34, 0.6); 
  
  /* ایجاد افکت تاری پشت کارت برای حالت شیشه‌ای */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* برای پشتیبانی در مرورگر Safari */
  
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 30px 25px; 
  border-radius: var(--radius-lg);
  transition: all 0.3s ease-in-out; 
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.idea-card:hover { 
    /* در حالت هاور کمی شفافیت کمتر می‌شود تا حس تعامل القا شود */
    background: rgba(42, 42, 45, 0.8); 
    border-color: rgba(255, 255, 255, 0.2); 
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4); 
}

    /* استایل اسکرول‌بار برای هماهنگی با کل صفحه */
    #ideas-container::-webkit-scrollbar {
        width: 8px; /* عرض اسکرول عمودی */
        height: 12px; /* ارتفاع اسکرول افقی (کمی ضخیم‌تر تا راحت‌تر دیده شود) */
    }
    #ideas-container::-webkit-scrollbar-track {
        background: transparent;
    }
    #ideas-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
    }
    #ideas-container::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.4);
    }

    /* انیمیشن لودینگ هوش مصنوعی */
    .ai-loading {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 30px;
        gap: 8px;
        width: 100%;
        margin-top: auto;
    }
    .ai-loading span {
        width: 10px;
        height: 10px;
        background-color: #888;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }
    .ai-loading span:nth-child(1) { animation-delay: -0.32s; }
    .ai-loading span:nth-child(2) { animation-delay: -0.16s; }
    @keyframes bounce {
        0%, 80%, 100% { transform: scale(0); }
        40% { transform: scale(1); }
    }



/* استایل‌های انیمیشن برای لودینگ ۳ نقطه */
.typing-indicator {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 60px;
}
.typing-indicator span {
    width: 10px;
    height: 10px;
    background-color: #888;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* افکت محو شدن کارت‌ها */
.idea-card {
    transition: opacity 0.3s ease, border 0.3s ease;
}
.fade-out {
    opacity: 0 !important;
    pointer-events: none;
}

/* انیمیشن ورود کارت جدید از پایین */
.slide-up-card {
    animation: slideUpFade 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.idea-card-enter {
    opacity: 0;
    animation: ideaCardEnter 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ideaCardEnter {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.s1-make-idea {
    position: fixed;
    top: 85px;
    right: 0;
    bottom: 160px;
    left: var(--studio-rail-width, 76px);
    z-index: 21;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 32px;
    border: 0;
    background: none;
    pointer-events: none;
    font-family: var(--font-main);
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1.3;
    color: #a1a1a6;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.s1-make-idea.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.idea-card.idea-card-focusing {
    z-index: 1000;
    margin: 0 !important;
}

.idea-card.idea-card-focused {
    position: fixed !important;
    z-index: 1000;
    margin: 0 !important;
    top: 50%;
    left: calc(var(--studio-rail-width, 76px) + (100vw - var(--studio-rail-width, 76px) - var(--agent-panel-width, 0px)) / 2);
    width: min(700px, calc((100vw - var(--studio-rail-width, 76px) - var(--agent-panel-width, 0px) - 48px) * 0.8)) !important;
    max-width: min(700px, calc(100vw - var(--studio-rail-width, 76px) - var(--agent-panel-width, 0px) - 48px)) !important;
    max-height: min(80vh, calc(100vh - 180px));
    transform: translate(-50%, -50%) !important;
    overflow: visible;
}

.idea-card.idea-card-focused:hover {
    transform: translate(-50%, -50%) !important;
}

body.studio-app.studio-agent-open.studio-agent-available:not(.ai-generate-mode) .idea-card.idea-card-focused,
body.studio-app.studio-agent-entering:not(.ai-generate-mode) .idea-card.idea-card-focused {
    top: calc(128px + (100vh - 144px) / 2);
    max-height: calc(100vh - 160px);
}




/* افکت‌های شیشه‌ای و پنل‌ها */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-button {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.4); /* Accent Purple */
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
    transform: translateY(-4px);
}

/* کلاس‌های کنترل انیمیشن ظهور */
.reveal-item {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* مخفی کردن اسکرول‌بار برای بخش پروژه‌ها */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }


/* استایل‌های تعاملی داشبورد */
.engine-btn {
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: color 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.28s ease;
}
.engine-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.engine-btn svg {
    transition: filter 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.seq-engine-row {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
    justify-content: center;
}

.seq-btn-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    animation: seqPopBtn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
/* ناحیه نامرئی بزرگ‌تر تا hover از فاصلهٔ دورتر فعال شود */
.seq-btn-wrap::before {
    content: '';
    position: absolute;
    inset: -34px -32px;
    z-index: 0;
}
.seq-btn-wrap .engine-btn {
    position: relative;
    z-index: 1;
}
.seq-btn-wrap:hover .engine-btn,
.seq-btn-wrap:focus-within .engine-btn {
    color: #ffffff;
    transform: translateY(-5px);
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
}
.seq-btn-wrap:hover .engine-btn svg,
.seq-btn-wrap:focus-within .engine-btn svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.65));
    transform: scale(1.08);
}
.seq-engine-row .seq-btn-wrap:nth-child(1) { animation-delay: 0.72s; }
.seq-engine-row .seq-btn-wrap:nth-child(2) { animation-delay: 0.82s; }
.seq-engine-row .seq-btn-wrap:nth-child(3) { animation-delay: 0.92s; }
.seq-engine-row .seq-btn-wrap:nth-child(4) { animation-delay: 1.02s; }
.seq-engine-row .seq-btn-wrap:nth-child(5) { animation-delay: 1.12s; }

.prompt-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    cursor: text;
    border-radius: 28px;
    padding: 8px 8px 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(18, 18, 18, 0.72);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 40px rgba(0, 0, 0, 0.35);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: visible;
    z-index: 5;
}
.prompt-box:has(.prompt-mode-wrap.open) {
    z-index: 20;
}
.prompt-box::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 1.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.55);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    animation: promptOpenLine 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}
.prompt-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
    background-size: 220% 100%;
    background-position: 120% 0;
    opacity: 0;
    animation: promptOpenSweep 1.15s ease-out 0.42s forwards;
}
.prompt-box:focus-within {
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 14px 44px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(255, 255, 255, 0.05);
}

.prompt-box-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    opacity: 0;
    animation: seqFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.prompt-box-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.prompt-box-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.prompt-plus-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #8e8e93 !important;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: none !important;
    transition: color 0.2s ease, background 0.2s ease !important;
}
.prompt-plus-btn svg {
    width: 16px;
    height: 16px;
}
.prompt-plus-btn:hover {
    color: #f5f5f7 !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.prompt-attach-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 6px 4px;
}
.prompt-attach-row[hidden] {
    display: none !important;
}
.prompt-attach-thumb {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06) center / cover no-repeat;
}
.prompt-attach-thumb button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    cursor: pointer;
}
.prompt-attach-file {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    height: 32px;
    padding: 0 8px 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #d2d2d7;
    font-size: 11px;
}
.prompt-attach-file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prompt-attach-file button {
    border: 0;
    background: transparent;
    color: #8e8e93;
    cursor: pointer;
}

.prompt-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px 6px;
    color: #9ad0ff;
    font-size: 12px;
    font-weight: 500;
}
.prompt-box.is-busy .prompt-status {
    display: flex;
}
.prompt-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7dd3fc;
    animation: promptStatusPulse 1s ease-in-out infinite;
}
@keyframes promptStatusPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}
.prompt-cancel-btn {
    margin-left: 4px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: transparent;
    color: #d2d2d7;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}
.prompt-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.prompt-box.is-multiline {
    padding: 10px 10px 8px 14px;
    border-radius: 22px;
}
.prompt-box.is-multiline .prompt-box-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "input input input"
        "tools . actions";
    align-items: center;
    column-gap: 4px;
    row-gap: 2px;
}
.prompt-box.is-multiline .main-textarea {
    grid-area: input;
    width: 100%;
    max-height: 140px;
    padding: 8px 8px 10px 4px !important;
}
.prompt-box.is-multiline .prompt-box-tools {
    grid-area: tools;
}
.prompt-box.is-multiline .prompt-box-actions {
    grid-area: actions;
}
.prompt-box.is-busy .prompt-send-btn {
    opacity: 0.35;
    pointer-events: none;
}

.prompt-box.is-drop-target {
    border-color: rgba(255, 255, 255, 0.38);
}

.prompt-mode-wrap {
    position: relative;
    flex-shrink: 0;
    z-index: 6;
}
.prompt-mode-wrap.open {
    z-index: 20;
}

.prompt-mode-btn,
.prompt-mode-menu button {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    outline: none !important;
}

.prompt-mode-btn {
    padding: 4px 2px !important;
    min-width: 2.8em;
    color: #8e8e93 !important;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: capitalize;
    text-align: left;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease !important;
}
.prompt-mode-btn:hover,
.prompt-mode-wrap.open .prompt-mode-btn {
    color: #f5f5f7 !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.prompt-mode-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    bottom: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.prompt-mode-wrap.open .prompt-mode-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.prompt-mode-menu button {
    padding: 0 !important;
    color: #6e6e73 !important;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: capitalize;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: color 0.2s ease !important;
}
.prompt-mode-wrap.open .prompt-mode-menu button {
    animation: modeItemIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(1) { animation-delay: 0.02s; }
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(2) { animation-delay: 0.06s; }
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(3) { animation-delay: 0.10s; }
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(4) { animation-delay: 0.14s; }
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(5) { animation-delay: 0.18s; }
.prompt-mode-wrap.open .prompt-mode-menu button:nth-child(6) { animation-delay: 0.22s; }
.prompt-mode-menu button:hover {
    color: #ffffff !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}
.prompt-mode-menu button.is-active {
    color: #f5f5f7 !important;
}

.prompt-send-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: transparent !important;
    color: #6e6e73 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease !important;
}
.prompt-send-btn svg {
    width: 16px;
    height: 16px;
}
.prompt-send-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    transform: scale(1.06) !important;
    box-shadow: none !important;
}
.prompt-send-btn.is-ready {
    background: #f5f5f7 !important;
    color: #111 !important;
    border-color: #f5f5f7 !important;
}
.prompt-send-btn.is-ready:hover {
    background: #ffffff !important;
    color: #111 !important;
    transform: scale(1.08) !important;
}

/* حذف کامل استایل‌های مزاحم مرورگر برای Textarea */
.main-textarea {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.prompt-box .main-textarea {
    flex: 1;
    width: 100%;
    min-height: 24px;
    max-height: 140px;
    height: 24px;
    resize: none;
    font-size: 0.98rem;
    line-height: 1.45;
    padding: 6px 4px !important;
    margin: 0;
    color: #ececec;
    overflow-y: auto;
}
.main-textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ---------------- انیمیشن‌های توالی ورود ---------------- */
@keyframes seqFadeIn {
    to { opacity: 1; }
}

@keyframes seqFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes promptOpenLine {
    0% { width: 0; opacity: 1; }
    32% { width: calc(100% - 8px); opacity: 1; }
    70% { width: calc(100% - 8px); opacity: 0.35; }
    100% { width: calc(100% - 8px); opacity: 0; }
}

@keyframes promptOpenSweep {
    0% { opacity: 0; background-position: 120% 0; }
    25% { opacity: 1; }
    100% { opacity: 0; background-position: -40% 0; }
}

@keyframes modeItemIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes seqExpandBox {
    0% {
        opacity: 0;
        clip-path: inset(50% 46% 50% 46% round 28px);
        transform: scale(0.98);
        filter: brightness(2.1);
    }
    22% {
        opacity: 1;
        clip-path: inset(46% 0 46% 0 round 28px);
        transform: scale(1);
        filter: brightness(1.55);
    }
    62% {
        clip-path: inset(-4px round 28px);
        transform: scale(1.02);
        filter: brightness(1.08);
    }
    100% {
        opacity: 1;
        clip-path: none;
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes seqPopBtn {
    0% { opacity: 0; transform: translateY(16px) scale(0.92); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.seq-header {
    opacity: 0;
    animation: seqFadeIn 0.8s ease-in-out forwards;
}

.seq-box {
    opacity: 0;
    transform-origin: center center;
    animation: seqExpandBox 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.seq-bottom {
    opacity: 0;
    animation: seqFadeIn 0.8s ease-in-out forwards;
    animation-delay: 1.2s;
}

#s1-dynamic:has(> .s1-home-workspace) {
    justify-content: flex-end;
}

body.studio-app .chat-container {
    left: var(--studio-rail-width);
}

body.studio-app #ideas-container,
body.studio-app .s1-make-idea {
    left: var(--studio-rail-width);
    width: auto;
}

body.studio-app #ideas-container:has(.idea-card-focused),
body.studio-app #ideas-container:has(.idea-card-focusing) {
    overflow: visible;
}
