/* 输入区域 */
.input-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 32px;
    background: transparent;
    padding: 0 24px;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 30;
}

.compact-input-area {
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.stadium-input-wrapper {
    position: relative;
    width: min(900px, 94%);
    pointer-events: auto;
}

.stadium-shell {
    --stadium-radius: 24px;
    position: relative;
    width: 100%;
    min-height: calc(var(--stadium-radius) * 2.1);
    padding: 12px 18px;
    border-radius: var(--stadium-radius);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
    display: flex;
    gap: 12px;
    transition:
        padding 0.2s ease,
        min-height 0.2s ease,
        box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.stadium-shell.is-multiline {
    padding-top: 16px;
    padding-bottom: 16px;
    min-height: calc(var(--stadium-radius) * 2.7);
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.stadium-shell.is-focused,
.stadium-shell.has-text {
    border-color: rgba(218, 119, 86, 0.32);
    box-shadow:
        0 2px 22px rgba(218, 119, 86, 0.18),
        0 0 30px rgba(218, 119, 86, 0.16),
        0 22px 60px rgba(15, 23, 42, 0.22);
}

.stadium-shell.is-multiline.is-focused,
.stadium-shell.is-multiline.has-text {
    box-shadow:
        0 2px 28px rgba(218, 119, 86, 0.2),
        0 0 36px rgba(218, 119, 86, 0.2),
        0 32px 86px rgba(15, 23, 42, 0.28);
}

.input-stack {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 6px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.image-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 4px 0;
    font-size: 12px;
    color: var(--text-secondary, #7f8792);
    line-height: 1.4;
}

.image-name {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.image-remove-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary, #7f8792);
    cursor: pointer;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
}
.image-remove-btn:hover {
    color: #d14b4b;
    transform: scale(1.05);
}

.stadium-input {
    flex: 1 1 auto;
    width: 100%;
    border: none;
    resize: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    color: var(--claude-text);
    padding: 0;
    min-height: 20px;
    outline: none;
    overflow-y: auto;
    scrollbar-width: none;
    transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height;
}

.stadium-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stadium-input::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.stadium-btn {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--claude-text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, margin-top 0.2s ease;
}

.stadium-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stadium-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.add-btn {
    font-size: 22px;
}

.stadium-btn.send-btn {
    background: var(--claude-accent);
    color: #fffaf0;
    box-shadow: 0 10px 20px rgba(189, 93, 58, 0.28);
}

.stadium-btn.send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--claude-button-hover);
}

.stadium-btn.send-btn:disabled {
    opacity: 0.4;
    box-shadow: none;
}

.stadium-btn.send-btn span {
    position: relative;
    top: 0px;
}

.stadium-btn.send-btn .send-icon {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #fffaf0;
    margin-left: 5px;
}

.stadium-btn.send-btn .stop-icon {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background-color: #fffaf0;
    display: block;
}

.stadium-btn.send-btn:disabled .send-icon {
    border-left-color: rgba(255, 255, 255, 0.4);
}

.stadium-btn.send-btn:disabled .stop-icon {
    background-color: rgba(255, 255, 255, 0.4);
}

.stadium-shell.is-multiline .stadium-btn {
    align-self: flex-end;
    margin-top: 0;
}

.file-input-hidden {
    display: none;
}

.quick-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 14px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 230px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--claude-border);
    border-radius: 18px;
    box-shadow: var(--claude-shadow);
    z-index: 30;
    pointer-events: auto;
}

.menu-entry {
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    text-align: left;
    color: var(--claude-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 44px;
}

.menu-entry:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.menu-entry.active {
    background: rgba(118, 103, 84, 0.12);
    color: var(--claude-text);
    font-weight: 600;
}

.menu-entry:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.menu-entry.has-submenu .entry-arrow {
    margin-left: 10px;
    color: var(--claude-text-secondary);
}

.quick-submenu {
    position: absolute;
    top: 0;
    left: calc(100% + 12px);
    width: 230px;
    min-width: 0;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--claude-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--claude-shadow);
    z-index: 31;
}

.submenu-status,
.submenu-empty {
    font-size: 13px;
    color: var(--claude-text-secondary);
}

.submenu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Blank conversation hero */
.chat-container {
    position: relative;
}

.blank-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
    z-index: 1;
    gap: 10px;
    padding-bottom: 140px;
}

.blank-hero-text {
    font-size: 32px;
    color: #2f3a4a;
    font-weight: 600;
}

.blank-hero-overlay .icon-lg {
    width: 48px;
    height: 48px;
}

.composer-container {
    position: relative;
    transition: transform 0.3s ease;
    z-index: 2;
}

.composer-container.blank-hero-mode {
    transform: translateY(-38vh);
}

@media (max-width: 768px) {
    .blank-hero-text {
        font-size: 28px;
    }
    .blank-hero-overlay .icon-lg {
        width: 44px;
        height: 44px;
    }
    .composer-container.blank-hero-mode {
        transform: translateY(-32vh);
    }
    .blank-hero-overlay {
        padding-bottom: 120px;
    }
}

.quick-submenu.tool-submenu {
    top: auto;
    bottom: 0;
}

.menu-entry.submenu-entry {
    width: 100%;
    justify-content: space-between;
}

.menu-entry.submenu-entry .entry-arrow {
    color: var(--claude-text-secondary);
}

.menu-entry.disabled {
    opacity: 0.5;
}



.quick-menu-enter-active,
.quick-menu-leave-active {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.quick-menu-enter-from,
.quick-menu-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

.submenu-slide-enter-active,
.submenu-slide-leave-active {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.submenu-slide-enter-from,
.submenu-slide-leave-to {
    opacity: 0;
    transform: translateX(10px);
}

/* 适应折叠屏/矮屏幕，保证输入区完整可见 */
@media (max-height: 900px) {
    .input-area {
        bottom: 12px;
        padding: 0 12px;
    }
    .stadium-shell {
        width: min(900px, 98%);
    }
}

.settings-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--claude-border);
    border-radius: 12px;
    box-shadow: var(--claude-shadow);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
    z-index: 40;
}

.settings-menu::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.96) transparent transparent transparent;
    filter: drop-shadow(0 3px 4px rgba(61, 57, 41, 0.12));
}

.settings-menu.tool-menu {
    right: auto;
    left: 0;
    min-width: 520px;
    max-width: 580px;
    padding: 16px 20px;
}

.settings-menu.tool-menu::before {
    left: 32px;
    right: auto;
}

.tool-menu .tool-menu-status,
.tool-menu .tool-menu-empty {
    font-size: 13px;
    color: rgba(61, 57, 41, 0.78);
    text-align: left;
}

.tool-menu .tool-menu-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
}

.tool-menu .tool-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    border: 1px solid rgba(118, 103, 84, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    aspect-ratio: 1 / 1;
    min-height: 0;
    justify-content: space-between;
}

.tool-menu .tool-category-item.disabled {
    opacity: 0.55;
}

.tool-menu .tool-category-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--claude-text);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
}

.tool-category-icon {
    font-size: 20px;
}

.tool-menu .tool-category-toggle {
    width: 100% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    text-align: center;
    white-space: nowrap;
    margin-top: auto;
}

.menu-btn {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid rgba(118, 103, 84, 0.14);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    background: rgba(255, 255, 255, 0.78);
    color: var(--claude-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.menu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-btn.compress-entry {
    background: rgba(255, 255, 255, 0.78);
    color: var(--claude-success);
}

.menu-btn.compress-entry:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.95);
}

.menu-btn.clear-entry {
    background: rgba(255, 255, 255, 0.78);
    color: #bf422b;
}

.menu-btn.clear-entry:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.95);
}

.settings-menu-enter-active,
.settings-menu-leave-active {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.settings-menu-enter-from,
.settings-menu-leave-to {
    opacity: 0;
    transform: translateY(6px);
}
