/* Vani AI Branding & Styling */

:root {
    --vani-gradient: linear-gradient(135deg, #fa1922 0%, #ff6b6b 100%);
    --vani-bg: rgba(255, 255, 255, 0.65);
    --vani-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --ai-accent: #6c5ce7;
}

.search-container-box {
    background: var(--vani-bg);
    border-radius: 15px;
    box-shadow: var(--vani-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    padding: 15px;
    height: 100%;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.search-header h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: #333;
    letter-spacing: 1px;
}

.search-badge {
    background: var(--vani-gradient);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02), 0 2px 10px rgba(0,0,0,0.02);
    border-radius: 12px;
    padding: 5px 12px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.search-input-group:focus-within {
    border-color: #fa1922;
    box-shadow: 0 0 0 3px rgba(250, 25, 34, 0.05);
}

.search-icon-left {
    position: static;
    color: #adb5bd;
    margin-right: 12px;
    font-size: 14px;
    flex-shrink: 0;
}

#ai-search-input {
    border: none !important;
    background: transparent !important;
    flex: 1;
    padding: 8px 5px !important;
    font-size: 14px;
    outline: none;
    color: #333;
    font-weight: 500;
}

#ai-search-input::placeholder {
    color: #adb5bd;
    opacity: 0.7;
    font-weight: 400;
}

.icon-btn {
    background: none;
    border: none;
    color: #fa1922;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 5px;
}

.icon-btn:hover {
    background: rgba(250, 25, 34, 0.05);
    transform: scale(1.1);
}

/* AI Sparkle Animation */
.ai-sparkle {
    font-size: 40px;
    color: #fa1922;
    margin-bottom: 15px;
    animation: pulse-sparkle 2s infinite;
}

@keyframes pulse-sparkle {
    0% { transform: scale(1); opacity: 0.8; text-shadow: 0 0 0px rgba(250, 25, 34, 0); }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 15px rgba(250, 25, 34, 0.4); }
    100% { transform: scale(1); opacity: 0.8; text-shadow: 0 0 0px rgba(250, 25, 34, 0); }
}

.search-results-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.search-results-area::-webkit-scrollbar {
    width: 4px;
}

.search-results-area::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 5px;
}

.empty-state span {
    font-size: 11px;
    opacity: 0.6;
}

/* AI Result Cards */
.ai-result-card {
    display: flex;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
}

.ai-result-card:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ai-card-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 8px;
    margin-right: 12px;
}

.ai-card-info {
    flex: 1;
}

.ai-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-card-spec {
    font-size: 11px;
    color: #666;
}

.ai-card-part {
    font-weight: 900;
    color: #fa1922;
    font-size: 10px;
    margin-right: 5px;
}

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

/* Voice Listening State */
.listening-now {
    animation: mic-pulse 1.5s infinite;
    color: #fa1922 !important;
}

@keyframes mic-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 25, 34, 0.4); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(250, 25, 34, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 25, 34, 0); }
}

/* AI QA Answer Card */
.ai-answer-card {
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    border: 2px solid #fa1922;
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(250, 25, 34, 0.1);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.ai-answer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--vani-gradient);
}

.qa-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.qa-badge {
    background: #fa1922;
    color: white;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 900;
}

.qa-main-text {
    font-size: 16px;
    font-weight: 800;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
}

.qa-main-text span {
    color: #fa1922;
    font-size: 22px;
    display: inline-block;
    margin: 0 4px;
}

.qa-breakdown {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    padding: 10px;
}

.qa-breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.qa-breakdown-item:last-child {
    border-bottom: none;
}

.qa-breakdown-item b {
    color: #333;
}

.vani-thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #666;
    font-size: 13px;
}

.thinking-dots span {
    animation: thinking-dots 1s infinite alternate;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-dots {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

/* 3D VIEWER MODAL */
.three-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Roboto', sans-serif;
}

.three-modal-content {
    width: 90%;
    height: 90%;
    background: #f8f8f8;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#three-header {
    height: 60px;
    background: #fff;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
}

#three-title {
    font-weight: 900;
    font-size: 18px;
    color: #d10000;
    letter-spacing: 1px;
}

#close-three-btn {
    background: #fdf2f2;
    border: 1px solid #fee2e2;
    color: #d10000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

#close-three-btn:hover {
    background: #d10000;
    color: #fff;
    transform: rotate(90deg);
}

#three-container {
    flex: 1;
    width: 100%;
    cursor: grab;
    background: radial-gradient(circle, #ffffff 0%, #f0f0f0 100%);
}

#three-container:active {
    cursor: grabbing;
}

#three-hint {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.three-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(209, 0, 0, 0.1);
    border-top: 4px solid #d10000;
    border-radius: 50%;
    animation: rotate-three 1s linear infinite;
}

@keyframes rotate-three {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.three-spinner span {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
