* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        radial-gradient(ellipse at top left, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(127, 29, 29, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%, 100% 100%;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    animation: backgroundShift 20s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0, 100% 100%, 0 0;
    }
    50% {
        background-position: 50px 50px, 50px 50px, 100% 100%, 0 0, 100% 100%;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 0;
    box-shadow: 0 0 100px rgba(220, 38, 38, 0.3),
                inset 0 0 100px rgba(220, 38, 38, 0.05);
    overflow: hidden;
    border: 3px solid #dc2626;
}

.banner-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-banner {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

header {
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 5px solid #dc2626;
    position: relative;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.5));
}

header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(220, 38, 38, 0.8),
        0 0 20px rgba(220, 38, 38, 0.6),
        0 0 30px rgba(220, 38, 38, 0.4),
        3px 3px 6px rgba(0, 0, 0, 0.9);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fca5a5;
    text-transform: uppercase;
}

.search-section {
    padding: 30px;
    border-bottom: 3px solid #dc2626;
    background: #0a0a0a;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#searchInput {
    flex: 1;
    padding: 18px 24px;
    border: 3px solid #7f1d1d;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 600;
    background: #1a1a1a;
    color: #ffffff;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

#searchInput::placeholder {
    color: #6b7280;
}

#searchBtn {
    padding: 18px 50px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: 3px solid #7f1d1d;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

#searchBtn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.8);
    transform: scale(1.05);
}

#searchBtn:active {
    transform: scale(0.98);
}

.search-options {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.search-options input[type="checkbox"] {
    cursor: pointer;
}

.stats {
    padding: 15px 30px;
    background: #7f1d1d;
    border-bottom: 3px solid #dc2626;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results {
    padding: 30px;
    min-height: 400px;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message h2 {
    color: #dc2626;
    margin-bottom: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.welcome-message p {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.note {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border: 3px solid #7f1d1d;
    border-radius: 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #0a0a0a;
}

.note strong {
    color: #0a0a0a;
    font-weight: 800;
}

.result-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.result-meta {
    font-size: 0.9rem;
    color: #718096;
}

.result-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}

.result-excerpt mark {
    background: #fef08a;
    padding: 2px 4px;
    border-radius: 3px;
}

.result-footer {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #718096;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

.no-results p {
    color: #718096;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

footer {
    background: #0a0a0a;
    color: #fca5a5;
    padding: 30px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 5px solid #dc2626;
}

footer p {
    margin: 8px 0;
}

.disclaimer {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
}

/* Crypto Footer Section */
.crypto-footer {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    border-top: 3px solid #dc2626;
    border-radius: 0;
}

.crypto-branding {
    text-align: center;
}

.crypto-branding h3 {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 
        0 0 10px rgba(220, 38, 38, 0.8),
        0 0 20px rgba(220, 38, 38, 0.6);
}

.crypto-ticker {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fca5a5;
    letter-spacing: 3px;
    margin: 10px 0;
}

.crypto-ca {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 5px;
}

.ca-address {
    color: #dc2626;
    font-family: monospace;
    font-size: 0.85rem;
    background: rgba(220, 38, 38, 0.1);
    padding: 5px 15px;
    border-radius: 0;
    border: 1px solid #7f1d1d;
    display: inline-block;
    margin-left: 5px;
}

/* Chat Widget - Floating Bubble Design */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-widget.collapsed {
    width: 70px;
    height: 70px;
}

.chat-widget.collapsed .chat-header {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6);
}

.chat-widget.collapsed .chat-header::before {
    content: '?';
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
}

.chat-widget.collapsed .chat-title {
    display: none;
}

.chat-widget.collapsed .chat-toggle {
    display: none;
}

.chat-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    border: 3px solid #7f1d1d;
    transition: all 0.3s;
}

.chat-widget:not(.collapsed) {
    width: 380px;
    max-height: 600px;
    background: #1a1a1a;
    border: 3px solid #dc2626;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
}

.chat-toggle {
    transition: transform 0.3s;
}

.chat-widget:not(.collapsed) .chat-toggle {
    transform: rotate(180deg);
}

.chat-body {
    display: none;
    flex-direction: column;
    height: 500px;
}

.chat-widget:not(.collapsed) .chat-body {
    display: flex;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #0a0a0a;
}

.chat-message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 85%;
}

.chat-message.user {
    background: #7f1d1d;
    margin-left: auto;
    color: #ffffff;
}

.chat-message.ai {
    background: #1a1a1a;
    border: 2px solid #dc2626;
    color: #ffffff;
}

.chat-message.error {
    background: #450a0a;
    border: 2px solid #991b1b;
    color: #fca5a5;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #1a1a1a;
    border-top: 2px solid #dc2626;
}

#chatInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #7f1d1d;
    background: #0a0a0a;
    color: #ffffff;
    font-size: 0.95rem;
}

#chatInput:focus {
    outline: none;
    border-color: #dc2626;
}

#chatSend {
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

#chatSend:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
}

/* Document Library */
.document-library {
    padding: 20px 30px;
    background: #0a0a0a;
    border-bottom: 3px solid #dc2626;
}

.library-toggle {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    color: #ffffff;
    border: 3px solid #dc2626;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.library-toggle:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.library-panel {
    max-height: 500px;
    overflow-y: auto;
    margin-top: 20px;
    padding: 20px;
    background: #1a1a1a;
    border: 3px solid #7f1d1d;
    transition: all 0.3s;
}

.library-panel.collapsed {
    display: none;
}

.library-panel h3 {
    color: #dc2626;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 10px;
}

.document-list {
    display: grid;
    gap: 10px;
}

.doc-list-item {
    padding: 12px 15px;
    background: #0a0a0a;
    border-left: 4px solid #dc2626;
    color: #ffffff;
    font-size: 0.9rem;
}

.doc-list-item strong {
    color: #fca5a5;
    font-weight: 800;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-width: 2px;
    }
    
    .banner-container {
        height: 150px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    .subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
    
    .header-logo {
        max-width: 100px;
        margin-bottom: 10px;
    }
    
    .search-section {
        padding: 20px 15px;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    #searchInput {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    #searchBtn {
        padding: 14px 30px;
        width: 100%;
        font-size: 1rem;
    }
    
    .search-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .results {
        padding: 20px 15px;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .welcome-message p {
        font-size: 0.95rem;
    }
    
    .note {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .document-library {
        padding: 15px;
    }
    
    .library-toggle {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    footer {
        padding: 20px 15px;
        font-size: 0.8rem;
    }
    
    .crypto-footer {
        padding: 15px;
    }
    
    .crypto-branding h3 {
        font-size: 1.3rem;
    }
    
    .crypto-ticker {
        font-size: 1rem;
    }
    
    .ca-address {
        font-size: 0.7rem;
    }
    
    /* Mobile Chat Widget */
    .chat-widget.collapsed {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .chat-widget.collapsed .chat-header {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .chat-widget:not(.collapsed) {
        width: calc(100vw - 30px);
        max-width: 380px;
        right: 15px;
        bottom: 15px;
    }
    
    .chat-body {
        height: 400px;
    }
    
    .chat-input-container {
        padding: 10px;
    }
    
    #chatInput {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    #chatSend {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    .welcome-message h2 {
        font-size: 1.2rem;
    }
}
