/* ============================================
   Global Styles & Variables
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   Header
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    animation: slideInRight 0.6s ease-out;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.2));
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.logo-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: var(--gradient);
    opacity: 0.05;
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    background-size: 200% 100%;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* ============================================
   Search Container
   ============================================ */
.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 4rem;
    font-size: 1.05rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    font-weight: 400;
    color: var(--dark);
}

.search-input::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.search-input:hover {
    border-color: var(--primary-light);
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.12), 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2), 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.search-input:focus + .search-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   Stats
   ============================================ */
.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* ============================================
   Filter Section
   ============================================ */
.filter-section {
    padding: 4rem 0;
    background: var(--white);
}

.filter-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.5rem;
}

.filter-btn {
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--gray);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: -1;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: var(--white);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.filter-btn.active::before {
    opacity: 1;
}

.auth-filter {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--dark-light);
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.checkbox-label:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Categories Grid
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.category-card {
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.category-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--gray);
}

/* ============================================
   APIs Section
   ============================================ */
.apis-section {
    padding: 4rem 0;
    background: var(--light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.75rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.view-btn svg {
    width: 20px;
    height: 20px;
    color: var(--gray);
    transition: all 0.25s ease;
}

.view-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.view-btn:hover svg {
    color: var(--primary);
    transform: scale(1.1);
}

.view-btn.active {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

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

/* ============================================
   APIs Grid - Unique Design
   ============================================ */
.apis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.api-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
    border: 3px solid transparent;
    background-clip: padding-box;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.api-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #f43f5e);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.api-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2),
                0 0 0 4px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.api-card:hover::before {
    height: 8px;
}

.api-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.api-name {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.api-category {
    position: relative;
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(10px);
    color: #6366f1;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.api-description {
    padding: 0 1.5rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.api-tags {
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.api-tag {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.api-tag:hover {
    transform: scale(1.05);
    border-color: #cbd5e1;
}

.api-tag.auth {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #fcd34d;
}

.api-tag.https {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #6ee7b7;
}

.api-tag.cors {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: #93c5fd;
}

.api-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px dashed #e2e8f0;
    margin-top: 0.5rem;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.02));
}

.api-link {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: 2px solid transparent;
}

.api-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* ============================================
   List View
   ============================================ */
.apis-grid.list-view {
    grid-template-columns: 1fr;
}

.apis-grid.list-view .api-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
}

.apis-grid.list-view .api-description {
    -webkit-line-clamp: 2;
}

/* ============================================
   Load More
   ============================================ */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2.5rem;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

/* ============================================
   About Section
   ============================================ */
.about-section {
    padding: 5rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--border);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--primary);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.about-card p {
    color: var(--gray);
    line-height: 1.8;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.25s ease-out;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 10px 40px rgba(99, 102, 241, 0.15);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(241, 245, 249, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gradient);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.modal-close svg {
    width: 22px;
    height: 22px;
    color: var(--dark-light);
    transition: color 0.3s ease;
}

.modal-close:hover svg {
    color: var(--white);
}

.modal-header {
    margin-bottom: 0;
    padding: 2.5rem 3rem 2rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0.5;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding-right: 3rem;
}

.modal-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#modalBody {
    padding: 2rem 3rem 3rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

#modalBody::-webkit-scrollbar {
    width: 8px;
}

#modalBody::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

#modalBody::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

.modal-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(248, 249, 255, 0.5);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.modal-section:hover {
    background: rgba(248, 249, 255, 0.8);
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

.modal-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}

.modal-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient);
    border-radius: 2px;
}

.modal-section p,
.modal-section ul {
    color: var(--dark-light);
    line-height: 1.8;
    font-size: 0.9375rem;
}

.modal-section ul {
    list-style: none;
    padding-left: 0;
}

.modal-section li {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--white);
    margin-bottom: 0.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.modal-section li:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

.modal-section li:last-child {
    border-bottom: none;
}

.code-block {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #a5f3fc;
    padding: 1.75rem;
    border-radius: 14px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
    opacity: 0.5;
}

.code-block::-webkit-scrollbar {
    height: 8px;
}

.code-block::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.code-block::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

.app-ideas {
    display: grid;
    gap: 1rem;
}

.app-idea {
    padding: 1.5rem;
    background: var(--white);
    border-radius: 14px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-idea::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
}

.app-idea:hover {
    background: rgba(248, 249, 255, 0.8);
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    transform: translateX(4px);
}

.app-idea strong {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    font-size: 1rem;
    font-weight: 600;
}

.app-idea strong::before {
    content: '💡';
    font-size: 1.125rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p {
    color: var(--gray);
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-light);
    color: var(--gray);
}

.footer-bottom a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .apis-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
        padding-right: 3rem;
    }
    
    #modalBody {
        padding: 1.5rem;
        max-height: calc(90vh - 180px);
    }
    
    .modal-section {
        padding: 1.25rem;
    }
    
    .code-block {
        padding: 1.25rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .checkbox-label {
        padding: 0.75rem 1rem;
        justify-content: center;
    }
    
    .auth-filter {
        flex-direction: column;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--light) 25%, var(--border) 50%, var(--light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

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

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

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