/* style.css - Dark Glassmorphism Theme */

:root {
    --primary-glow: #00e5ff;
    --secondary-glow: #3b82f6;
    --text-white: #ffffff;
    --text-light: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --bg-dark-blue: #040914;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.4) transparent;
}

/* Custom Transparent Scrollbar (Glassmorphism) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.6);
}

body {
    background-color: var(--bg-dark-blue);
    color: var(--text-white);
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden; /* Dashboard feel */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background overlay to ensure text readability over bright image regions */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay: dark blue to darker blue */
    background: radial-gradient(circle at 10% 50%, rgba(4, 9, 20, 0.75) 0%, rgba(4, 9, 20, 0.95) 100%);
    z-index: 0;
}

.app-container {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 1500px;
    height: 95vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 55px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .title {
    font-size: 1.15rem;
    font-weight: 500;
}

.logo-text .subtitle {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 300;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-glow);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-glow);
    box-shadow: 0 0 8px var(--primary-glow);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-white);
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-toggle:hover {
    color: var(--primary-glow);
}


.btn-smart-search {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-smart-search i {
    color: var(--primary-glow);
}

.btn-smart-search:hover {
    border-color: var(--primary-glow);
    background: rgba(0, 229, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 50px;
    padding-top: 20px;
}

.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hero Texts */
.hero-text-area {
    flex: 1.3;
}

.main-headline {
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
}

.sub-headline {
    font-size: 4rem;
    font-weight: 600;
    background: linear-gradient(90deg, #3b82f6 0%, #00e5ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 300;
}

.btn-primary {
    background: linear-gradient(90deg, #3b82f6 0%, #00e5ff 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
}

/* Hero Widgets */
.hero-widgets {
    flex: 0.7;
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: flex-end;
}

.glass-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--glass-shadow);
}

.widget-news {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.widget-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

.ai-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.news-list {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 300;
    line-height: 1.6;
}

.news-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
}

.news-list li::before {
    content: "•";
    color: var(--text-white);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.widget-queue h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.progress-container {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #00e5ff 100%);
    border-radius: 10px;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Feature Cards */
.feature-cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.glass-card {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    cursor: pointer;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-glow);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.15), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.glass-card .icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--primary-glow);
    font-size: 2.2rem;
    color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(0,229,255,0.2), inset 0 0 10px rgba(0,229,255,0.2);
}

.glass-card p {
    font-size: 1rem;
    font-weight: 400;
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-left span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    color: var(--text-white);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-socials a:hover {
    color: var(--primary-glow);
}

/* Chatbot */
.chatbot-wrapper {
    position: fixed;
    bottom: 35px;
    right: 35px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-tooltip {
    background: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
}

/* Tooltip triangle */
.chatbot-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.tooltip-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.tooltip-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.chatbot-icon {
    width: 65px;
    height: 65px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #3b82f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255,255,255,0.5);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s;
}

.chatbot-icon:hover {
    transform: scale(1.08);
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: 0px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark-blue);
}

/* AI Search Panel in Chatbot */
.ai-search-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    transform-origin: bottom right;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.ai-search-header {
    background: rgba(0, 229, 255, 0.15);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 500;
}

.ai-search-body {
    padding: 15px;
}

/* Responsive adjustments */
@media (max-width: 1300px) {
    .main-headline { font-size: 3.2rem; }
    .sub-headline { font-size: 3.2rem; }
    .btn-primary { padding: 12px 30px; font-size: 1.1rem; }
}

@media (max-width: 1024px) {
    body { height: auto; overflow: auto; }
    .app-container { height: auto; min-height: 100vh; padding: 20px 0; }
    .hero-section { flex-direction: column; gap: 40px; text-align: center; }
    .hero-widgets { align-items: center; width: 100%; }
    .feature-cards { flex-wrap: wrap; }
    .glass-card { min-width: 250px; }
    
    .mobile-toggle { display: block; }
    .btn-text { display: none; } /* Hide smart search text */
    .btn-smart-search { padding: 10px 15px; } /* Tighter button */
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 85px; /* right below navbar */
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid var(--glass-border);
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 15px 30px rgba(0,0,0,0.5);
        padding: 20px 0;
        gap: 20px;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 99;
    }
    
    .nav-links.mobile-active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .footer-left { justify-content: center; text-align: center; }
    .app-footer { flex-direction: column; gap: 20px; margin-top: 40px; }
    .chatbot-wrapper { bottom: 20px; right: 20px; }
}

body.home-page .chatbot-wrapper {
    bottom: 88px;
}

body:not(.home-page) .chatbot-wrapper,
body:not(.home-page) .chatbot-panel {
    display: none !important;
}

@media (max-width: 640px) {
    body.home-page .chatbot-wrapper {
        bottom: 78px;
        right: 14px;
    }
}

/* --- Chatbot Panel Enhanced --- */
.chatbot-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-glow), var(--primary-glow));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ade80;
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-chat:hover { color: #ff4b5c; }

.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: fadeInMsg 0.3s ease-out;
}

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

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(0, 229, 255, 0.4));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-right-radius: 2px;
}

.chatbot-input {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--glass-border);
}

.chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    outline: none;
}

.chatbot-input button {
    background: var(--secondary-glow);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    background: var(--primary-glow);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
