/* ============================================
   UNIQUE FEATURES STYLES
   ============================================ */

/* Before/After Comparison Section */
.before-after-section {
    background: var(--bg-light);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.comparison-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.comparison-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.comparison-slider {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.comparison-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.after-image {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.image-placeholder.before {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: white;
}

.image-placeholder.after {
    background: var(--gradient-2);
    color: white;
}

.image-placeholder i {
    font-size: 60px;
    opacity: 0.5;
}

.comparison-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-control {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    z-index: 10;
    cursor: ew-resize;
}

.slider-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 300px;
    background: white;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-control::-moz-range-thumb {
    width: 4px;
    height: 300px;
    background: white;
    cursor: ew-resize;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 5;
    transition: var(--transition);
}

.slider-button i {
    font-size: 20px;
    color: var(--primary-color);
}

.comparison-info {
    padding: 24px;
    text-align: center;
}

.comparison-info h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.comparison-info p {
    font-size: 14px;
    color: var(--text-light);
}

/* Virtual Smile Assessment */
.smile-assessment {
    background: white;
}

.assessment-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.assessment-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

.assessment-features {
    display: flex;
    gap: 24px;
}

.assessment-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 16px;
    flex: 1;
}

.assessment-feature i {
    font-size: 32px;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assessment-feature span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.assessment-tool {
    background: var(--bg-light);
    border-radius: 24px;
    padding: 48px;
    min-height: 500px;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 100%;
    border: 3px dashed #ddd;
    border-radius: 20px;
    padding: 60px 40px;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.upload-area i {
    font-size: 80px;
    color: var(--primary-color);
}

.upload-area h3 {
    font-size: 24px;
    color: var(--text-dark);
}

.upload-area p {
    font-size: 14px;
    color: var(--text-light);
}

.assessment-result {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-image {
    border-radius: 16px;
    overflow: hidden;
    max-height: 250px;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-analysis {
    background: white;
    padding: 24px;
    border-radius: 16px;
}

.analysis-item {
    margin-bottom: 24px;
}

.analysis-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.score-bar {
    width: 100%;
    height: 12px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.score-fill {
    height: 100%;
    background: var(--gradient-2);
    border-radius: 10px;
    transition: width 1s ease;
}

.score-value {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recommendations h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.recommendations ul {
    list-style: none;
    margin-bottom: 24px;
}

.recommendations li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-light);
}

.recommendations li i {
    color: var(--accent-color);
    font-size: 16px;
}

/* Health Tips Carousel */
.health-tips {
    background: var(--bg-light);
}

.tips-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 60px;
}

.tips-wrapper {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.tip-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.tip-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.tip-card.prev {
    opacity: 0;
    transform: translateX(-100px);
}

.tip-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transform: scale(1.04);
    transition: transform 0.6s ease;
}

.tip-icon i {
    font-size: 48px;
    color: white;
}

.tip-card:hover .tip-icon {
    transform: scale(1);
}

.tip-card h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.tip-card p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 24px;
}

.tip-number {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-light);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn i {
    font-size: 20px;
    color: var(--primary-color);
}

.carousel-btn:hover i {
    color: white;
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 10px;
}

/* AI Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100% - 32px);
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 999;
    transform: translateY(600px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-widget.active {
    transform: translateY(0);
}

.chatbot-header {
    background: var(--gradient-2);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar i {
    font-size: 24px;
}

.chatbot-title {
    flex: 1;
}

.chatbot-title h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.status-online {
    font-size: 12px;
    opacity: 0.9;
}

.status-online::before {
    content: '●';
    color: #00b894;
    margin-right: 4px;
}

.close-chat {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bot-message,
.user-message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar i {
    font-size: 18px;
    color: white;
}

.message-bubble {
    max-width: 70%;
    background: var(--bg-light);
    padding: 12px 16px;
    border-radius: 16px;
}

.user-message .message-bubble {
    background: var(--gradient-2);
    color: white;
}

.message-bubble p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-light);
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-reply {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.quick-reply:hover {
    background: var(--primary-color);
    color: white;
}

.chatbot-input {
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 12px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    background: var(--gradient-2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-input button:hover {
    transform: scale(1.1);
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 998;
}

.floating-actions .fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.floating-actions .fab:hover {
    transform: scale(1.1);
}

.floating-actions .fab i {
    font-size: 24px;
    color: white;
}

.fab-label {
    position: absolute;
    right: 75px;
    background: var(--text-dark);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.floating-actions .fab:hover .fab-label {
    opacity: 1;
    right: 70px;
}

.emergency-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 107, 107, 0.8);
    }
}

.chat-btn {
    background: var(--gradient-2);
}

.scroll-top {
    background: var(--text-dark);
    opacity: 0;
    pointer-events: none;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .assessment-content {
        grid-template-columns: 1fr;
    }

    .assessment-features {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .chatbot-widget {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .tips-carousel {
        padding: 0 50px;
    }

    .tip-card {
        padding: 32px 24px;
    }

    .tip-card h3 {
        font-size: 22px;
    }

    .floating-actions {
        right: 20px;
        bottom: 20px;
    }

    .floating-actions .fab {
        width: 50px;
        height: 50px;
    }

    .floating-actions .fab i {
        font-size: 20px;
    }

    .fab-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .comparison-slider {
        height: 240px;
    }

    .slider-control::-webkit-slider-thumb {
        height: 240px;
    }

    .slider-control::-moz-range-thumb {
        height: 240px;
    }

    .assessment-tool {
        padding: 28px;
        min-height: 420px;
    }

    .upload-area {
        padding: 40px 24px;
    }

    .upload-area i {
        font-size: 64px;
    }

    .upload-area h3 {
        font-size: 20px;
    }

    .assessment-features {
        gap: 16px;
    }

    .assessment-feature {
        padding: 16px;
    }

    .tips-carousel {
        padding: 0 36px;
    }

    .tips-wrapper {
        height: 340px;
    }

    .tip-card {
        padding: 28px 20px;
    }

    .tip-icon {
        width: 80px;
        height: 80px;
    }

    .tip-icon i {
        font-size: 36px;
    }

    .carousel-btn {
        width: 42px;
        height: 42px;
    }

    .carousel-btn i {
        font-size: 16px;
    }

    .chatbot-widget {
        height: 70vh;
        bottom: 90px;
    }
}
