:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-color: #3b82f6;
    /* Electric Blue */
    --accent-hover: #2563eb;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* Navbar */
.navbar {
    background-color: rgba(30, 30, 30, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10000 !important;
}

.navbar-brand {
    color: var(--text-primary) !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    transition: color 0.2s;
    font-weight: 500;
    position: relative !important;
    padding-bottom: 5px;
    display: inline-block !important;
    /* Force inline-block */
    overflow: visible !important;
    /* Ensure nothing is clipped */
}

/* Left half of the line */
.navbar-nav .nav-link::before {
    content: '' !important;
    position: absolute !important;
    width: 50.1% !important;
    /* Slight overlap to avoid gap */
    height: 3px !important;
    bottom: 0 !important;
    left: 0 !important;
    background: var(--gradient-primary) !important;
    background-size: 200% 100% !important;
    /* Double width so we see half */
    background-position: 0% 0% !important;
    /* Left half of gradient */
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 9999 !important;
    display: block !important;
    border-radius: 2px 0 0 2px;
}

/* Right half of the line */
.navbar-nav .nav-link::after {
    content: '' !important;
    position: absolute !important;
    width: 50.1% !important;
    /* Slight overlap */
    height: 3px !important;
    bottom: 0 !important;
    right: 0 !important;
    background: var(--gradient-primary) !important;
    background-size: 200% 100% !important;
    /* Double width so we see half */
    background-position: 100% 0% !important;
    /* Right half of gradient */
    transform: scaleX(0) !important;
    transform-origin: right !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 9999 !important;
    display: block !important;
    border-radius: 0 2px 2px 0;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
}

/* Animate both inwards */
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link:hover::after {
    transform: scaleX(1) !important;
}

/* Hero Section */
.hero-title {
    font-size: 3rem;
    font-weight: 200;
    /* Made thinner */
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    /* 0.2s delay */
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Wrapper */
.search-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.search-container {
    max-width: 600px;
    position: relative;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 16px 50px 16px 20px;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

#searchInput:focus {
    background-color: #333;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* Icons */
.icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    z-index: 10;
}

.icon:hover {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.search-icon {
    right: 20px;
}

.camera-icon {
    right: 60px;
}

.sidebar-toggle-btn {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.sidebar-toggle-btn:hover {
    color: var(--text-primary);
}

/* Results Container */
/* Results Container */
#results-container {
    background-color: transparent;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
}

/* Specific content styling */
.result-content {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.chat-bubble {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px 20px 0 20px;
    padding: 15px 25px;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    font-weight: 500;
    /* Restore alignment */
    align-self: flex-end;
    display: inline-block;
    max-width: 80%;
    margin-left: auto;
}

/* Sidebar */
#sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100%;
    width: 300px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1050;
    background-color: #181818 !important;
    /* Slightly distinct from bg */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

#sidebar h5 {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

#sidebar ul li a {
    color: var(--text-secondary);
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

#sidebar ul li a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

#sidebarClose {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

#sidebarClose:hover {
    color: white;
}

/* Result Cards/Typography within content */
.result-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Tooltip */
.camera-tooltip {
    position: absolute;
    top: -110px;
    right: 26px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    max-width: 220px;
    text-align: center;
    z-index: 10000;
    background: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.camera-tooltip .tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 80%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent-color);
}

.tooltip-close {
    position: absolute;
    top: 4px;
    right: 6px;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.8;
}

.tooltip-close:hover {
    opacity: 1;
}

/* Action Buttons (Vote, Copy, Share) */
.vote-btn,
.copy-btn,
.speaker-btn,
.share-btn {
    color: var(--accent-color);
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 1.2rem;
}

.vote-btn:hover,
.copy-btn:hover,
.speaker-btn:hover,
.share-btn:hover {
    color: var(--accent-hover);
}

.vote-btn-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 25px;
    margin-top: 10px;
}

/* Vote Popup */
.vote-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1a1a1a;
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-popup label {
    font-size: 1.1rem;
    font-weight: 500;
}

.vote-popup select,
.vote-popup textarea {
    background-color: #2a2a2a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    font-size: 1rem;
}

.vote-popup select:focus,
.vote-popup textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.vote-popup button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.vote-popup button:hover {
    background: var(--accent-hover);
}

.vote-popup .close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.vote-popup .close-popup:hover {
    color: white;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .container {
        padding-left: 20px !important;
        /* Increased padding to squeeze content */
        padding-right: 20px !important;
    }

    body {
        overflow-x: hidden;
    }
}