/* Inforama Knowledge Base Styles - Google-like Search Results */
.inforama-container {
    min-height: 100vh;
    background: #ffffff;
    font-family: arial, sans-serif;
    color: #202124;
}

/* Header */
.inforama-header {
    background: #ffffff;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dadce0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
    height: 40px;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.back-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.1s;
}

.back-link:hover {
    opacity: 0.8;
}

.main-logo {
    font-size: 24px;
    font-weight: bold;
    color: #1877f2;
    text-decoration: none;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: #202124;
    margin: 0;
    text-decoration: none;
    line-height: 1;
}

.subtitle {
    color: #5f6368;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-button:hover {
    background-color: #f1f3f4;
}

.user-button img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-button span {
    font-size: 14px;
    color: #1c1e21;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f3f4;
}

.logout-btn {
    color: #d93025;
}

/* Main Content */
.inforama-main {
    padding: 0;
    max-width: 652px;
    margin: 0 auto;
    padding-top: 1rem;
}

/* Search Section */
.search-section {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.search-container {
    background: transparent;
    padding: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 0;
    background: #fff;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
}

.search-icon {
    font-size: 1rem;
    color: #9aa0a6;
    padding: 0 1rem;
}

#search-input {
    flex: 1;
    padding: 0.75rem 0;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #202124;
}

#search-input::placeholder {
    color: #9aa0a6;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #3c4043;
    border: none;
    border-radius: 0 24px 24px 0;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.1s;
}

.search-btn:hover {
    background: #f1f3f4;
}

.search-filters {
    display: flex;
    gap: 1rem;
}

.search-filters select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    background: white;
}

/* Stats Section */
.stats-section {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.stats-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.stat-card {
    background: transparent;
    padding: 0;
    text-align: center;
}

.stat-number {
    font-size: 1rem;
    font-weight: 400;
    color: #1a73e8;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #5f6368;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Results Section */
.results-section {
    background: transparent;
    padding: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
    border-bottom: none;
}

.results-header h2 {
    margin: 0;
    color: #202124;
    font-size: 1rem;
    font-weight: 400;
}

.results-count {
    color: #5f6368;
    font-size: 0.875rem;
    font-weight: 400;
}

.results-container {
    min-height: 200px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.article-card {
    background: transparent;
    padding: 0;
    margin-bottom: 1.75rem;
    cursor: pointer;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: #1a0dab;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    text-decoration: none;
}

.article-title:hover {
    text-decoration: underline;
}

.article-preview {
    color: #4d5156;
    line-height: 1.58;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.article-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #5f6368;
}

.article-meta span {
    background: transparent;
    padding: 0;
    color: #5f6368;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #dadce0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #1a73e8;
    transition: all 0.1s;
}

.pagination button:hover:not(:disabled) {
    border-color: #1a73e8;
    background: #f8f9fa;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #5f6368;
}

#page-info {
    color: #5f6368;
    font-weight: 400;
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-meta span {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: #666;
}

.article-content {
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
}

.article-footer {
    text-align: right;
}

.external-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.external-link:hover {
    color: #764ba2;
}

/* Responsive */
@media (max-width: 768px) {
    .inforama-header {
        padding: 8px 12px;
        height: 56px;
    }
    
    .header-center {
        flex: 1;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .main-logo {
        font-size: 20px;
    }
    
    .inforama-main {
        padding: 0 0.5rem;
        max-width: 100%;
    }
    
    .search-section,
    .stats-section,
    .results-header {
        padding: 0 0.5rem;
    }
    
    .search-box {
        border-radius: 20px;
    }
    
    .stats-grid {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: left;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}
