:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.08);
    --accent: #407282;
    --accent-hover: #3755a8;
    --accent-light: #dbeafe;
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --hero-bg: #607D8B;
    --hero-accent: #ffffff;
    --hero-border: #4a5964;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.25);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #1e3a8a;
    --hero-bg: #455A64;
    --hero-accent: #3b82f6;
    --hero-border: #374151;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

#theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.2rem;
}

#theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow);
}

/* Hero Section */
.hero {
    background: var(--hero-bg);
    border-bottom: 1px solid var(--hero-border);
    color: #ffffff;
    padding: 2rem 1rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Badge */
.hero-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.badge-text {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    backdrop-filter: blur(10px);
}

/* Title */
.hero-title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #ffffff;
}

/* Subtitle */
.hero-subtitle {
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subtitle-line {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.subtitle-accent {
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    min-width: 160px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--accent);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(117 125 134 / 15%);
    border-radius: 6px;
    color: #ffffff;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-content {
    text-align: left;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        min-width: 200px;
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .repos-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .repos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 1.5rem;
    }

    .hero {
        padding: 3rem 1.5rem 2.5rem;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .hero {
    background: var(--hero-bg);
    border-bottom-color: var(--hero-border);
    color: #ffffff;
}

[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .badge-text {
    background: var(--accent-light);
}

[data-theme="dark"] .stat-icon {
    background: var(--accent-light);
}

[data-theme="dark"] .controls {
    background: var(--bg-secondary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: .8rem;
    transition: all 0.2s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sort-container select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: .8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-container select:hover {
    border-color: var(--accent);
}

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

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

/* Button variants */
.btn-primary {
    background: var(--accent);
    color: white;
}

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* Specific button styles are now handled by base classes */

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Repos Grid */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1200px) {
    .repos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.repo-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.repo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--accent);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.repo-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.repo-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.repo-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.repo-stars i {
    color: #fbbf24;
    font-size: 0.875rem;
}

.star-count {
    color: var(--text-secondary);
}

.repo-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    max-height:100px;
}

.stat-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label-small {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Repository Dates */
.repo-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.date-item {
    text-align: center;
}

.date-label {
    font-size: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.date-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.badge-container {
    text-align: center;
}

.badge-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.badge-title i {
    color: var(--accent);
}

.badge-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.badge-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.copy-btn {
    font-size: 0.875rem;
    margin-top: auto;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.toast {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 767px) {
    .hero {
        padding: 2rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .repos-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
    }

    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0.75rem;
    }

    .container {
        padding: 0.75rem;
    }

    .repo-card {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .stat-card {
        min-width: 180px;
        padding: 1rem 1.25rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .controls {
        padding: 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.repo-card {
    animation: fadeIn 0.5s ease forwards;
}

.repo-card:nth-child(1) { animation-delay: 0.1s; }
.repo-card:nth-child(2) { animation-delay: 0.2s; }
.repo-card:nth-child(3) { animation-delay: 0.3s; }
.repo-card:nth-child(4) { animation-delay: 0.4s; }
.repo-card:nth-child(5) { animation-delay: 0.5s; }
.repo-card:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced hover effects */
.repo-card:hover .repo-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.repo-card:hover .stat-number {
    color: var(--accent-hover);
    transition: color 0.3s ease;
}

/* Loading shimmer effect */
.loading-shimmer {
    background: linear-gradient(90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

/* Repository Management Styles */
.add-repo-section {
    margin-bottom: 2rem;
}

.add-repo-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.add-repo-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.owner-type-group {
    margin-top: 0.5rem;
}

.owner-type-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#owner-type-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

#owner-type-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tracked repos styling */
.tracked-repo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
}

.repo-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.repo-name {
    font-weight: 500;
    color: var(--text-primary);
}

.owner-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.owner-type-badge i {
    font-size: 0.7rem;
}

#new-repo-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

#new-repo-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}


.tracked-repos-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.tracked-repos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.loading-repos {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.tracked-repo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tracked-repo-item:hover {
    background: var(--bg-tertiary);
}

.repo-name {
    font-weight: 500;
    color: var(--text-primary);
}

.remove-btn {
    gap: 0.25rem;
}

.empty-repos {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Backup Section Styles */
.backup-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.backup-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.backup-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.backup-btn {
    font-size: 0.875rem;
}

.import-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.import-options {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

@media (min-width: 640px) {
    .backup-controls {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .import-section {
        flex: 1;
    }

    .export-btn,
    .import-btn {
        flex-shrink: 0;
        min-width: 140px;
    }
}

/* Modal responsive styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .add-repo-form {
        flex-direction: column;
    }
}

/* Chart View Styles */
.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.view-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent);
    color: white;
}

.chart-controls {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.chart-filters {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 150px;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.refresh-chart-btn {
    height: fit-content;
}

.chart-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.charts-wrapper {
    display: grid;
    gap: 2rem;
}

.chart-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chart-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.chart-stat-dot.clones {
    background: var(--accent);
}

.chart-stat-dot.uniques {
    background: #10b981;
}

.chart-canvas-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

.chart-canvas-container canvas {
    max-height: 100%;
}

.empty-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-chart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-chart h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-chart p {
    font-size: 0.875rem;
}

/* Responsive adjustments for chart view */
@media (max-width: 768px) {
    .chart-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-group select {
        min-width: auto;
        flex: 1;
        max-width: 200px;
    }
    
    .refresh-chart-btn {
        align-self: center;
        margin-top: 0.5rem;
    }
    
    .chart-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .chart-canvas-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .view-toggle {
        flex-direction: column;
        width: 100%;
    }
    
    .view-btn {
        justify-content: center;
        padding: 0.75rem;
    }
    
    .chart-controls {
        padding: 0.75rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .chart-item {
        padding: 1rem;
    }
    
    .chart-canvas-container {
        height: 200px;
    }
}