/* Theme-specific styles */

/* Light theme enhancements */
:root {
    --gradient-primary: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f6f8fa 100%);
}

/* Dark theme enhancements */
[data-theme="dark"] {
    --gradient-primary: linear-gradient(135deg, #2ea043 0%, #238636 100%);
    --gradient-card: linear-gradient(135deg, #161b22 0%, #0d1117 100%);

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

    ::-webkit-scrollbar-track {
        background: var(--surface-color);
    }

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

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-color);
    }
}

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

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.repo-card {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.repo-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.repo-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #006400;
        --text-primary: #000000;
        --text-secondary: #333333;
    }

    [data-theme="dark"] {
        --primary-color: #00ff00;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Category color classes */
.category-ai { color: var(--category-color, #10b981); }
.category-anime { color: var(--category-color, #ef4444); }
.category-fintech { color: var(--category-color, #3b82f6); }
.category-webdev { color: var(--category-color, #8b5cf6); }

/* Badge animations */
.beta-tag {
    animation: pulse 2s infinite;
}

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

/* Tooltip styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Progress indicator for loading */
.loading-progress {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.loading-progress::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--primary-color);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(250%); }
}