/* TopRank Skills Directory - Home Page Styles */

[x-cloak] { display: none !important; }

/* Hero Section Gradient Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-gradient {
    background: linear-gradient(45deg, #2b8cee, #1e40af, #2b8cee);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Search Input Focus Effect */
.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Skill Card Hover Effects */
.skill-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(43, 140, 238, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Statistics Card Animation */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.02);
    border-color: #2b8cee !important;
}

.stat-card:hover .material-symbols-outlined {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Growth Badge Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.growth-badge {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Timeline Styles */
.timeline-dot {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(43, 140, 238, 0.1);
}

/* Documentation Link Hover */
.doc-link {
    transition: all 0.2s ease;
}

.doc-link:hover {
    padding-left: 1rem;
}

/* Code Block Copy Button */
.code-copy-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.skill-card:hover .code-copy-btn {
    opacity: 1;
}

/* CTA Button Hover Effects */
.cta-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 100%;
}

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

/* Loading State for Chart */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.chart-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2b8cee;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

    .skill-card {
        margin-bottom: 1rem;
    }
}

/* Dark Mode Specific Styles */
.dark .skill-card {
    background: linear-gradient(135deg, #1c2631 0%, #111418 100%);
}

.dark .stat-card {
    background: linear-gradient(135deg, #1c2631 0%, #111418 100%);
}

/* Period Button Active State */
.period-btn-active {
    background-color: white;
    color: #111418;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.dark .period-btn-active {
    background-color: #1c2631;
    color: white;
}

/* Trending Tag */
.trending-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.trending-tag::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #2b8cee, transparent);
}

/* Knowledge Hub Article Card */
.knowledge-card {
    transition: all 0.3s ease;
}

.knowledge-card:hover {
    transform: translateY(-8px);
}

.knowledge-card:hover .article-overlay {
    opacity: 0;
}

/* Search Input Keyboard Shortcut Hint */
.search-hint {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    background: #f0f2f4;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #617589;
    pointer-events: none;
}

/* Milestone Badge Colors */
.milestone-new {
    background: linear-gradient(135deg, #2b8cee 0%, #1e40af 100%);
}

.milestone-update {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.milestone-feature {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Accessibility */
.focus-visible:focus {
    outline: 2px solid #2b8cee;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero-gradient,
    .cta-section,
    .milestones,
    nav,
    footer {
        display: none;
    }

    .skill-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
