/*
 * Page: AI Search
 * Version: 1.0.0
 */

/* --- 1. VARIABLES --- */
:root {
    --vidnok-glass: rgba(255, 255, 255, 0.05); 
    --vidnok-border: rgba(255, 255, 255, 0.15); 
    --vidnok-primary: #a855f7;
    --vidnok-secondary: #ec4899;
    --vidnok-text-main: #ffffff; 
    --vidnok-text-muted: #cbd5e1;
    --bg-dark: #0f172a;
}

/* --- 2. RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--vidnok-text-main);
    line-height: 1.6;
    margin: 0; padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex; flex-direction: column;
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
.wp-site-blocks > footer, .site-footer, #colophon { display: none !important; }

.vidnok-hidden { display: none !important; }
.hidden { display: none !important; }

/* --- 3. BACKGROUND --- */
.vidnok-fixed-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 50% 50%, #2e1065 0%, #0f172a 100%);
    z-index: -999; pointer-events: none;
}
.vidnok-fixed-bg::before { content: ''; position: absolute; width: 60vw; height: 60vh; background: #a855f7; top: -10%; left: -10%; border-radius: 50%; filter: blur(100px); opacity: 0.5; z-index: -1; animation: vidnokPulse 8s infinite alternate; }
.vidnok-fixed-bg::after { content: ''; position: absolute; width: 60vw; height: 60vh; background: #ec4899; bottom: -10%; right: -10%; border-radius: 50%; filter: blur(100px); opacity: 0.5; z-index: -1; animation: vidnokPulse 8s infinite alternate; }
@keyframes vidnokPulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.1); opacity: 0.7; } }

/* --- 4. HEADER --- */
.vidnok-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px; z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--vidnok-border);
}
.vidnok-logo a { font-size: 1.4rem; font-weight: 800; color: white; text-transform: uppercase; }
.vidnok-nav { display: flex; gap: 25px; position: absolute; left: 50%; transform: translateX(-50%); }
.vidnok-nav a { color: var(--vidnok-text-muted); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.vidnok-nav a:hover, .vidnok-nav a.active { color: white; text-shadow: 0 0 15px var(--vidnok-primary); }
.v-cta-btn { background: rgba(255,255,255,0.1); border: 1px solid var(--vidnok-border); padding: 6px 15px; border-radius: 50px; color: white; font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; gap: 5px; }
.vidnok-mobile-trigger { display: none; }

@media (max-width: 900px) {
    .vidnok-nav, .v-cta-btn { display: none !important; }
    .vidnok-header { padding: 0 20px; justify-content: flex-start; }
    .vidnok-mobile-trigger { display: flex; align-items: center; z-index: 1002; }
    .vidnok-logo { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; z-index: 1001; }
}

/* --- 5. SIDEBAR --- */
.vidnok-sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s; }
.vidnok-sidebar-overlay.active { opacity: 1; visibility: visible; }
.vidnok-mobile-sidebar {
    position: fixed; top: 0; left: 0; height: 100%; width: 280px;
    background: radial-gradient(circle at 0% 0%, #4c1d95 0%, #0f172a 100%);
    border-right: 1px solid var(--vidnok-border);
    z-index: 2001; transform: translateX(-100%); transition: 0.3s;
    padding: 20px; display: flex; flex-direction: column; gap: 15px;
}
.vidnok-mobile-sidebar.active { transform: translateX(0); }
.vidnok-sidebar-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--vidnok-border); padding-bottom: 15px; }
.v-menu-title { font-weight: 800; color: white; letter-spacing: 1px; }
.v-close-btn { color: white; font-size: 1.5rem; cursor: pointer; }
.vidnok-sidebar-links a {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 10px;
    color: var(--vidnok-text-muted); font-weight: 600;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.vidnok-sidebar-links a:hover, .vidnok-sidebar-links a.active {
    background: rgba(168, 85, 247, 0.25); color: white; border-color: var(--vidnok-primary);
}

/* --- 6. SEARCH CONTENT --- */
.vidnok-container {
    max-width: 1400px; width: 100%; margin: 0 auto;
    padding: 90px 20px 20px; flex: 1; display: flex; flex-direction: column;
}

.vidnok-search-hero {
    text-align: center; margin: 40px auto; width: 100%; max-width: 800px;
    transition: 0.3s ease; position: relative; z-index: 900;
}
.vidnok-hero-content { margin-bottom: 30px; }
.vidnok-hero-content h1 { font-size: 3rem; font-weight: 800; color: white; margin-bottom: 10px; }
.vidnok-hero-content p { color: var(--vidnok-text-muted); font-size: 1.1rem; }

/* Compact Mode */
.vidnok-search-hero.compact { 
    margin: 0; max-width: 100%; padding: 10px 0; border-bottom: none;
    position: fixed; top: 70px; left: 0; width: 100%; 
    background: transparent; backdrop-filter: none; pointer-events: none;
}
.vidnok-search-hero.compact .vidnok-hero-content { display: none; }

.vidnok-search-hero.compact .vidnok-search-box { 
    margin: 0 auto; width: 100%; max-width: 1400px; height: 50px; 
    pointer-events: auto; background: rgba(15, 23, 42, 0.85); 
    backdrop-filter: blur(15px); border: 1px solid var(--vidnok-border); 
    border-radius: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    padding: 0 10px 0 20px;
}

/* Search Box */
.vidnok-search-box {
    position: relative; width: 100%; background: rgba(0,0,0,0.3); 
    border: 1px solid var(--vidnok-border); border-radius: 50px; padding: 0 5px 0 20px;
    display: flex; align-items: center; transition: 0.3s; height: 60px;
}
.vidnok-search-box:focus-within { border-color: var(--vidnok-primary); box-shadow: 0 0 20px rgba(168, 85, 247, 0.2); }
.vidnok-search-box input { flex: 1; background: transparent; border: none; outline: none; color: white; font-size: 1rem; height: 100%; }
.vidnok-search-box button { width: 40px; height: 40px; border-radius: 50%; background: var(--vidnok-primary); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-left: 10px; }

/* Loader */
.vidnok-loader { 
    position: absolute; bottom: 5px; 
    left: 20px; right: 60px; 
    display: none; pointer-events: none;
}
.vidnok-loader:not(.hidden) { display: block; }

.vidnok-loader-info { 
    display: flex; justify-content: space-between; 
    color: var(--vidnok-primary); font-weight: 700; font-size: 0.7rem; 
    margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px;
}

.vidnok-progress-track { height: 2px; background: rgba(255,255,255,0.1); width: 100%; }
.vidnok-progress-fill { 
    height: 100%; background: var(--vidnok-primary); 
    width: 0; transition: width 0.2s; box-shadow: 0 0 10px var(--vidnok-primary);
}

/* --- RESULTS GRID --- */
.vidnok-results-grid {
    display: none; 
    grid-template-columns: 1fr 3fr 1fr; 
    gap: 20px; margin-top: 60px; height: calc(100vh - 150px);
    opacity: 0; animation: fadeIn 0.5s forwards;
}
.vidnok-results-grid.active { display: grid; opacity: 1; }
@keyframes fadeIn { to { opacity: 1; } }

.vidnok-res-col { height: 100%; overflow: hidden; display: flex; flex-direction: column; }

/* Cards */
.vidnok-glass-card {
    background: var(--vidnok-glass); border: 1px solid var(--vidnok-border);
    border-radius: 16px; padding: 20px; height: 100%;
    display: flex; flex-direction: column; overflow: hidden;
    backdrop-filter: blur(15px);
}
.col-preview .vidnok-glass-card { padding: 0; border: none; background: transparent; }
.col-preview .v-card-header { display: none; } 

.v-card-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--vidnok-border); margin-bottom: 15px; }
.v-card-header h3 { font-size: 0.95rem; font-weight: 700; color: white; margin: 0; display: flex; align-items: center; gap: 8px; }
.v-card-body { flex: 1; overflow-y: auto; color: var(--vidnok-text-muted); font-size: 0.95rem; line-height: 1.6; }

.v-iframe-wrapper { flex: 1; background: white; border-radius: 16px; overflow: hidden; position: relative; height: 100%; margin: 0; }
iframe { width: 100%; height: 100%; border: none; }

.v-sources-list li { padding: 10px; margin-bottom: 5px; border-radius: 8px; background: rgba(255,255,255,0.03); cursor: pointer; transition: 0.3s; }
.v-sources-list li:hover { background: rgba(168, 85, 247, 0.2); }
.v-sources-list span { display: block; }
.v-sources-list span:first-child { font-weight: 600; color: white; font-size: 0.9rem; }
.v-sources-list span:last-child { font-size: 0.75rem; color: #64748b; }

@media (max-width: 1024px) {
    .vidnok-results-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; margin-top: 70px; }
    .col-preview { order: 1; height: 500px; }
    .col-answer { order: 2; height: auto; }
    .col-sources { order: 3; height: auto; }
}

.vidnok-custom-footer { text-align: center; padding: 30px; color: var(--vidnok-text-muted); border-top: 1px solid var(--vidnok-border); margin-top: auto; font-size: 0.9rem; background: rgba(15, 23, 42, 0.3); }