/* Tube Link Fixer Extension - Results Page Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #10b981;
    --success-bg: #dcfce7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-50);
    width: 420px;
    min-height: 500px;
    max-height: 600px;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 600px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.back-btn,
.rescan-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
}

.back-btn:hover,
.rescan-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.back-btn svg,
.rescan-btn svg {
    width: 18px;
    height: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
}

/* Video Card */
.video-card {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.video-thumbnail {
    width: 80px;
    height: 45px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.video-meta {
    font-size: 11px;
    color: var(--gray-500);
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card.active {
    border-color: var(--primary);
    background: white;
}

.summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.summary-icon svg {
    width: 14px;
    height: 14px;
}

.summary-card.total .summary-icon {
    background: var(--gray-200);
    color: var(--gray-600);
}

.summary-card.valid .summary-icon {
    background: var(--success-bg);
    color: var(--success);
}

.summary-card.broken .summary-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.summary-card.warning .summary-icon {
    background: var(--warning-bg);
    color: var(--warning);
}

.summary-count {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.summary-card.total .summary-count {
    color: var(--gray-700);
}

.summary-card.valid .summary-count {
    color: var(--success);
}

.summary-card.broken .summary-count {
    color: var(--danger);
}

.summary-card.warning .summary-count {
    color: var(--warning);
}

.summary-label {
    font-size: 9px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
    overflow-x: auto;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-tab:hover {
    background: var(--gray-200);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

.tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tab-dot.valid {
    background: var(--success);
}

.tab-dot.broken {
    background: var(--danger);
}

.tab-dot.warning {
    background: var(--warning);
}

.filter-tab.active .tab-dot {
    background: white;
}

/* Results Container */
.results-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Result Item */
.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

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

.result-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-icon svg {
    width: 14px;
    height: 14px;
}

.result-icon.valid {
    background: var(--success-bg);
    color: var(--success);
}

.result-icon.broken {
    background: var(--danger-bg);
    color: var(--danger);
}

.result-icon.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-url {
    font-size: 12px;
    color: var(--gray-700);
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-domain {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 2px;
}

.result-status {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.result-status.valid {
    background: var(--success-bg);
    color: #166534;
}

.result-status.broken {
    background: var(--danger-bg);
    color: #991b1b;
}

.result-status.warning {
    background: var(--warning-bg);
    color: #92400e;
}

.result-action {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s;
    flex-shrink: 0;
}

.result-action:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.result-action svg {
    width: 14px;
    height: 14px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-400);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 13px;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.powered-by {
    font-size: 11px;
    color: var(--gray-400);
}

.view-dashboard {
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.view-dashboard:hover {
    text-decoration: underline;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
