/* AI Chat Section Styles */

.ai-chat-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 40px 20px;
    min-height: 700px;
    transition: all 0.5s ease;
}

/* Fullscreen Chat Mode */
.fullscreen-chat {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.fullscreen-chat .row {
    margin: 0;
    height: 100%;
}

.fullscreen-chat .col-11 {
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
}

.fullscreen-chat .ai-chat-wrapper {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow: auto;
}

.fullscreen-chat #aiChatView {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.fullscreen-chat .chat-intro {
    flex-shrink: 0;
}

.fullscreen-chat .chat-footer {
    flex-shrink: 0;
}

.fullscreen-chat .iframe-container {
    flex: 1;
    max-height: calc(100vh - 280px);
    margin: 20px 0;
    height: 100%;
}

.fullscreen-chat .ai-iframe {
    height: 100% !important;
    min-height: 100% !important;
}

/* Hide other sections when in immersive chat mode */
body.immersive-chat-mode #vertical,
body.immersive-chat-mode #horizontal,
body.immersive-chat-mode #hide,
body.immersive-chat-mode #go-top {
    display: none !important;
}

body.immersive-chat-mode main {
    padding-left: 0 !important;
}

body.immersive-chat-mode #about,
body.immersive-chat-mode #experience,
body.immersive-chat-mode #skills,
body.immersive-chat-mode #project,
body.immersive-chat-mode #education,
body.immersive-chat-mode #feedback,
body.immersive-chat-mode #contact,
body.immersive-chat-mode #top {
    display: none !important;
}

body.immersive-chat-mode {
    overflow: hidden;
}

/* Ensure chat section is visible even when other sections are hidden */
body.immersive-chat-mode #ai-chat {
    display: block !important;
}

.ai-chat-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Toggle Buttons */
.view-toggle-container {
    margin-bottom: 30px;
}

.toggle-description {
    margin-bottom: 20px;
}

.toggle-description p {
    font-size: 16px;
    color: #666;
}

.toggle-buttons {
    display: inline-flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-toggle {
    background: #f8f9fa;
    color: #666;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 0;
}

.btn-toggle:hover {
    background: #e9ecef;
    color: #333;
}

.btn-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-toggle i {
    font-size: 18px;
}

/* View Content */
.view-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.view-content.active {
    display: block;
}

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

/* AI Chat View */
.chat-intro {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.chat-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.chat-title i {
    color: #ffd700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.chat-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.95;
}

.chat-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.feature-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.feature-badge i {
    color: #4ade80;
}

/* Iframe Container */
.iframe-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: #f8f9fa;
    margin: 30px 0;
    position: relative;
    min-height: 600px;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.ai-iframe {
    display: block;
    border: none;
    min-height: 600px;
}

.chat-footer {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.chat-footer p {
    margin: 0;
    font-size: 14px;
}

.chat-footer i {
    color: #ffc107;
}

/* Static Portfolio View */
.static-intro {
    padding: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
}

.static-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.static-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.95;
}

/* Portfolio Sections Grid */
.portfolio-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.portfolio-section-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-section-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.portfolio-section-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.card-icon i {
    font-size: 36px;
    color: white;
}

.portfolio-section-card h5 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    position: relative;
    z-index: 1;
}

.portfolio-section-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-chat-wrapper {
        padding: 25px 15px;
    }

    .toggle-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-toggle {
        width: 100%;
        border-radius: 10px !important;
        margin-bottom: 10px;
    }

    .chat-title,
    .static-title {
        font-size: 22px;
    }

    .chat-description,
    .static-description {
        font-size: 14px;
    }

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

    .feature-badge {
        width: 100%;
    }

    .ai-iframe {
        min-height: 500px;
    }

    .portfolio-sections-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-icon i {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .ai-chat-container {
        padding: 20px 10px;
    }

    .btn-toggle {
        padding: 12px 20px;
        font-size: 14px;
    }

    .ai-iframe {
        min-height: 450px;
    }
}

/* Loading animation for iframe - removed to avoid conflict with HuggingFace's own loading */
