/* ===================================
   Clean & Minimal UI Enhancements
   =================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Back to Top Button - Minimal */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: var(--gray-700);
}

/* Clean Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.filter-tab {
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
    background: var(--primary-50);
}

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

/* Clean Search Box */
.search-container {
    margin-bottom: 24px;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(94, 84, 142, 0.08);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.4;
}

/* Cleaner Resource Sections */
.resource-section {
    margin-bottom: 32px;
}

.resource-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.resource-section-icon {
    font-size: 1.25rem;
}

.resource-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.resource-section-count {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: auto;
}

/* Clean Resource Items */
.resource-item {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.resource-item:hover {
    border-color: var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.resource-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.resource-name a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.resource-name a:hover {
    color: var(--primary-700);
}

.resource-description,
.features-list {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    margin-top: 6px;
    margin-bottom: 6px;
}

.resource-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
}

.resource-badge.free {
    background: var(--accent-100);
    color: var(--accent-700);
}

.resource-badge.level {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Collapsible Animation */
.section-toggle {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.resource-section-header.collapsed .section-toggle {
    transform: rotate(-90deg);
}

.resource-section-header.collapsed + .resource-items {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.resource-items {
    max-height: 10000px;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Subtle Page Progress */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 10000;
    background: transparent;
}

.page-progress-bar {
    height: 100%;
    background: var(--primary-500);
    width: 0%;
    transition: width 0.3s ease;
}

/* Clean Keyboard Toast */
.shortcuts-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: white;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--gray-700);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}

.shortcuts-toast.visible {
    opacity: 1;
    visibility: visible;
}

.shortcut-key {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    margin: 0 2px;
}

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

.resource-section {
    animation: fadeIn 0.4s ease;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .resource-section-title {
        font-size: 1.25rem;
    }

    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove all dark/heavy styles */
.filter-tabs {
    background: transparent ;
    backdrop-filter: none ;
}

.resource-section-header {
    background: transparent ;
}

/* Keep everything light and airy */
body {
    background: #fafafa;
}