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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 20px;
}

header h1 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
}

.sync-info {
    font-size: 12px;
    color: #888;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
}

.tab {
    padding: 8px 16px;
    background: #2a2a2a;
    color: #aaa;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

.tab:hover {
    background: #3a3a3a;
    color: #fff;
}

.tab.active {
    background: #3ea6ff;
    color: #000;
}

/* Sort controls */
.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 0;
}

.controls label {
    font-size: 13px;
    color: #888;
}

.controls select {
    padding: 6px 12px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.controls select:hover {
    border-color: #666;
}

.controls select:focus {
    outline: none;
    border-color: #3ea6ff;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-item {
    background: #2a2a2a;
    padding: 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.video-item:hover {
    background: #333;
}

.video-title {
    margin-bottom: 8px;
}

.video-title a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
}

.video-title a:hover {
    color: #3ea6ff;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.channel {
    color: #aaa;
}

.duration {
    background: #444;
    padding: 2px 6px;
    border-radius: 3px;
}

.categories {
    color: #3ea6ff;
}

.video-description {
    margin-top: 10px;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    cursor: pointer;
}

.video-description:hover {
    color: #bbb;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    max-width: 700px;
    max-height: 80vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #444;
    border: none;
    color: #fff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1;
}

.modal-close:hover {
    background: #555;
}

.modal-header {
    padding: 20px 24px;
    padding-right: 56px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.modal-title-link {
    color: #3ea6ff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.modal-title-link:hover {
    text-decoration: underline;
}

.modal-body {
    padding: 24px;
    padding-top: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    .tabs {
        gap: 6px;
    }

    .tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Priority lens bar */
.priority-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;
}

.priority-label {
    font-size: 13px;
    color: #888;
    margin-right: 4px;
}

.priority-btn {
    padding: 6px 14px;
    background: #2a2a2a;
    color: #aaa;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.priority-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

.priority-btn.active {
    background: #3ea6ff;
    color: #000;
    border-color: #3ea6ff;
}

.priority-btn.settings-btn {
    padding: 6px 10px;
    font-size: 14px;
}

.priority-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 0;
    font-size: 13px;
    color: #888;
}

.priority-info strong {
    color: #3ea6ff;
}

.rescore-btn {
    padding: 4px 10px;
    background: #2a2a2a;
    color: #aaa;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.rescore-btn:hover:not(:disabled) {
    background: #3a3a3a;
    color: #fff;
    border-color: #666;
}

.rescore-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.priority-score {
    background: #3ea6ff;
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .priority-bar {
        gap: 6px;
    }
    
    .priority-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}
