/* News Lens - Clean Minimal Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text: #e8e8e8;
    --text-light: #a8a8a8;
    --bg: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --border: #2a2a2a;
    --primary: #4a9eff;
    --primary-hover: #357abd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin-bottom: 20px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo h1 span {
    color: var(--primary);
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
}

.logo-link:hover h1 {
    opacity: 0.8;
    transition: opacity 0.2s;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

/* Controls */
.controls {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.controls select,
.controls button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.controls select:hover,
.controls button:hover {
    border-color: var(--text-light);
}

.controls button.primary {
    background: var(--primary);
    color: #000000;
    border-color: var(--primary);
    font-weight: 500;
}

.controls button.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Articles */
.articles {
    margin-bottom: 40px;
}

.article {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.article:last-child {
    border-bottom: none;
}

.article-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.article-source {
    font-weight: 500;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.article-title:hover {
    color: var(--primary);
}

.article-summary {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.article-actions {
    display: flex;
    gap: 16px;
}

.article-actions button {
    padding: 4px 12px;
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.article-actions button:hover {
    color: var(--primary);
}

.article-actions button.saved {
    color: var(--primary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Article Modal */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 1000;
    overflow-y: auto;
}

.article-modal.show {
    display: block;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg);
}

.modal-close {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: var(--text-light);
}

.modal-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
}

.modal-body h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--text-light);
}

.summary-section {
    margin-bottom: 32px;
}

.summary-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.summary-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
}

.key-points {
    list-style: none;
    padding: 0;
}

.key-points li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.key-points li:last-child {
    border-bottom: none;
}

.key-points li:before {
    content: "→";
    margin-right: 8px;
    color: var(--primary);
}

.read-full-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: #000000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.read-full-btn:hover {
    background: var(--primary-hover);
}

/* Settings */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.source-list {
    display: grid;
    gap: 8px;
}

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

/* Content sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

/* Login Page */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text);
}

.auth-card p {
    color: var(--text-light);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: #000000;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
    display: block;
}

.auth-footer {
    margin-top: 24px;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* Multi-select dropdown */
.multi-select-container {
    position: relative;
    display: inline-block;
}

.multi-select-toggle {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: space-between;
}

.multi-select-toggle:hover {
    border-color: var(--text-light);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
    min-width: 200px;
    max-width: calc(100vw - 40px);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

/* Scrollbar styling for dropdown */
.multi-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.multi-select-dropdown::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.multi-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.multi-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

@media (max-width: 640px) {
    .multi-select-dropdown {
        position: fixed;
        left: 20px;
        right: 20px;
        width: auto;
        min-width: unset;
    }
}

.multi-select-dropdown.show {
    display: block;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 8px;
}

.dropdown-option:hover {
    background: var(--border);
}

.dropdown-option input[type="checkbox"] {
    cursor: pointer;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Tags */
.article-tags {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--border);
    color: var(--text-light);
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
}

.modal-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-large {
    display: inline-block;
    padding: 8px 16px;
    background: var(--border);
    color: var(--text);
    font-size: 14px;
    border-radius: 16px;
    font-weight: 500;
}

/* Opportunity */
.ai-fund-section {
    border-left: 3px solid var(--primary);
    padding-left: 20px;
}

.ai-fund-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    color: var(--text);
    border: 1px solid var(--primary);
}

/* Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.progress-overlay.show {
    display: flex;
}

.progress-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.progress-content h3 {
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--text);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.source-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.source-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.source-badge.active {
    background: var(--primary);
    color: #000;
}

.source-badge.completed {
    background: var(--bg);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.source-badge .status-icon {
    font-size: 10px;
}

.progress-cancel {
    margin-top: 20px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.progress-cancel:hover {
    border-color: var(--text);
    color: var(--text);
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .controls {
        gap: 8px;
    }
    
    .controls select,
    .controls button {
        font-size: 13px;
        padding: 6px 12px;
    }
}