@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 60px;
    padding-top: 20px;
}

.logo-container {
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-circle {
    display: inline-block;
    padding: 20px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -2px;
    color: #ffffff;
}

header h1 .highlight {
    background: linear-gradient(135deg, #ff4444 0%, #ff0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.6)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 68, 68, 0.9)); }
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
    color: #aaaaaa;
    font-weight: 400;
    margin-bottom: 25px;
}

.badge-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.badge {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
}

.search-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

#searchInput {
    flex: 1;
    padding: 18px 20px 18px 50px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#searchInput:focus {
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 
        0 0 0 4px rgba(220, 38, 38, 0.1),
        0 8px 24px rgba(220, 38, 38, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#searchInput::placeholder {
    color: #666;
}

button {
    padding: 18px 35px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.5);
}

button:active {
    transform: translateY(0);
}

.examples {
    color: #888;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.examples strong {
    color: #aaa;
    font-weight: 600;
}

.example-link {
    color: #ff6666;
    cursor: pointer;
    padding: 4px 12px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.example-link:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.4);
    color: #ff8888;
    transform: translateY(-1px);
}

.loading {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ff4444;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.5);
    border: 1px solid #b91c1c;
    font-weight: 500;
}

.results {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
}

.results.show {
    display: block;
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.room-header {
    border-bottom: 2px solid rgba(220, 38, 38, 0.3);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

.room-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.room-url {
    color: #ff6666;
    text-decoration: none;
    font-size: 1em;
    word-break: break-all;
    transition: all 0.2s;
    display: inline-block;
    padding: 6px 12px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.room-url:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #ff8888;
    transform: translateY(-1px);
}

.database-badge {
    display: inline-block;
    background: rgba(220, 38, 38, 0.15);
    color: #ff6666;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-top: 12px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-weight: 500;
}

.qa-container {
    margin-top: 20px;
}

.qa-item {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid #ff4444;
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.qa-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.2);
    background: rgba(255, 255, 255, 0.04);
    border-left-width: 4px;
}

.question {
    font-weight: 600;
    color: #ff6666;
    margin-bottom: 14px;
    font-size: 1.05em;
    line-height: 1.5;
}

.answer-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer {
    background: rgba(0, 255, 136, 0.05);
    padding: 14px 20px;
    border-radius: 12px;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    flex: 1;
    word-break: break-all;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
}

.answer:hover {
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}

.copy-btn {
    padding: 10px 22px;
    font-size: 13px;
    background: linear-gradient(135deg, #00aa55 0%, #008844 100%);
    min-width: 85px;
    border-radius: 12px;
    font-weight: 600;
}

.copy-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 170, 85, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
}

.raw-content {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.raw-content h3 {
    margin-bottom: 15px;
    color: #ff6666;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.raw-content pre {
    background: rgba(0, 0, 0, 0.3);
    color: #ccc;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.copy-all-btn {
    padding: 10px 25px;
    font-size: 14px;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(220, 38, 38, 0.15);
    color: #ff6666;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    .answer-container {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }

    .badge-container {
        flex-direction: column;
        align-items: center;
    }

    .examples {
        flex-direction: column;
        align-items: flex-start;
    }
}
