.hidden-model-container {
    /* Initially hidden, will be shown by JS */
    display: none;
    margin-left: 10px; /* Spacing from the "模式：" label */
    perspective: 1000px; /* For 3D flip animation */
    border-radius: var(--radius-lg); /* unified curvature */
    background: rgba(30, 30, 30, 0.25);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    box-shadow:
        inset 0px 2px 8px rgba(255, 255, 255, 0.07),
        inset -1px -2px 4px rgba(255, 255, 255, 0.04),
        0 40px 80px -20px rgba(0, 0, 0, 0.35);
    transform-style: preserve-3d;
    transition: all 0.6s var(--apple-ease);
    z-index: 100;
    vertical-align: middle; /* Added for better inline alignment if needed, though flex parent handles it */
}

.hidden-model-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 65%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.6s var(--apple-ease), transform 0.6s var(--apple-ease);
}

.hidden-model-container.visible {
    /* display: inline-block !important; */ /* Original */
    display: inline-flex !important; /* Changed to inline-flex */
    align-items: center; /* Vertically center the input field within this container */
    justify-content: center; /* Horizontally center if needed */
    transform: scale(1.05) rotateX(8deg) rotateY(-10deg) translateY(2px); /* Added translateY(2px) for visual alignment */
    box-shadow:
        inset 0px 4px 15px rgba(255, 255, 255, 0.1),
        inset -2px -4px 8px rgba(255, 255, 255, 0.05),
        0 60px 100px -20px rgba(0, 0, 0, 0.4);
    animation: appear 0.5s var(--liquid-motion-curve) forwards;
}

.hidden-model-container.visible::before {
    opacity: 1;
    transform: scale(1.05) translate(-5px, -5px);
}

#hidden-model-input {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    background-color: var(--unified-button); /* 统一背景 */
    color: var(--unified-text);
    width: 200px;
    transition: all 0.4s var(--apple-ease);
    transform-style: preserve-3d;
    opacity: 0;
    transform: rotateY(-90deg) translateZ(20px);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.2);
    outline: none;
}

.hidden-model-container.visible #hidden-model-input {
    opacity: 1;
    transform: rotateY(0deg) translateZ(20px);
}

#hidden-model-input:focus {
    border-color: var(--accent);
    background-color: var(--unified-button);
    opacity: 0.9;
    box-shadow:
        0 0 0 2px rgba(0, 123, 255, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

#hidden-model-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Style for the clickable label */
#mode-label-clickable {
    cursor: pointer; /* Indicate it's clickable */
    position: relative;
    transition: all 0.3s var(--apple-ease);
}

#mode-label-clickable:hover {
    color: rgba(80, 80, 80, 1) !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

#mode-label-clickable:active {
    transform: scale(0.95);
}

@keyframes appear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateX(15deg) rotateY(-20deg) translateY(20px); /* Entry animation */
    }
    100% {
        opacity: 1;
        transform: scale(1.05) rotateX(8deg) rotateY(-10deg) translateY(2px); /* Adjusted final state */
    }
}

/* 成功消息提示样式 */
#model-success-message {
    position: fixed;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: rgba(76, 175, 80, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--liquid-motion-curve);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

#model-success-message::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
}

#model-success-message.visible {
    opacity: 1;
    transform: translateY(0);
    animation: success-pulse 2s infinite ease-in-out;
}

@keyframes success-pulse {
    0% {
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.15),
            inset 0 1px 1px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 12px 24px rgba(0, 0, 0, 0.25),
            0 0 0 2px rgba(255, 255, 255, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.15),
            inset 0 1px 1px rgba(255, 255, 255, 0.2);
    }
}
