:root {
    --primary-color: #6C5CE7;
    --primary-dark: #5649C0;
    --secondary-color: #FD79A8;
    --accent-color: #00CEC9;
    --text-color: #2D3436;
    --text-light: #636E72;
    --bg-color: #FFFFFF;
    --bg-light: #F9F9F9;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - Inspired by FRVR */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 45px;
    margin-right: 12px;
    border-radius: 50%;
    transition: var(--transition);
}

.logo:hover img {
    transform: rotate(5deg);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background-color: var(--bg-light);
}

/* Hero Section - FRVR Inspired */
.hero {
    padding: 6rem 0 4rem;
    background: var(--bg-gradient);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background: white;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    /*position: sticky;*/
    top: 80px;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    background-color: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.sort-select {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--bg-light);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* Apps Stats */
.apps-stats {
    margin-bottom: 2rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
}

/* Apps Grid - FRVR Inspired Cards */
.apps-section {
    padding: 4rem 0;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.app-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.app-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

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

.app-image-container {
    width: 100%;
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.app-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.app-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.app-card:hover .app-image {
    transform: scale(1.1) rotate(2deg);
}

.app-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

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

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-color);
}

.app-category {
    font-size: 0.8rem;
    color: white;
    background: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--secondary-color);
    background: rgba(253, 121, 168, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.app-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    line-height: 1.5;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.app-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.7rem 1.2rem;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
}

.app-link:hover {
    color: white;
    background: var(--primary-color);
    transform: translateX(5px);
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

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

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Additional Styles */
.no-results {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    grid-column: 1 / -1;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.error-message {
    text-align: center;
    color: #e53e3e;
    font-size: 1.2rem;
    grid-column: 1 / -1;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

#total-apps {
    font-weight: 800;
    color: var(--primary-color);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 20px 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .app-image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .app-image-container {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .app-image {
        width: 100px;
        height: 100px;
    }
    
    .app-content {
        padding: 1.2rem;
    }
}