:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --dark: #1b263b;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/photo/sbl/sbl3.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 2s ease;
}

.search-bar input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    padding: 1rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background-color: var(--primary);
}

/* Apps Section */
.container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 2px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 1rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.app-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.app-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.app-image {
    height: 200px;
    overflow: hidden;
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .app-image img {
    transform: scale(1.1);
}

.app-content {
    padding: 1.5rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.app-developer {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.app-description {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 0.95rem;
    flex: 1;
}

.app-meta-container {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.app-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.app-rating {
    color: var(--warning);
}

.app-size {
    color: #666;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.download-btn:hover {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.search-by-name-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(to right, #4cc9f0, #4895ef);
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    cursor: pointer;
}

.search-by-name-btn:hover {
    background: linear-gradient(to right, #4895ef, #4361ee);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* App Detail Page */
.app-detail {
    margin-top: 2rem;
}

.back-button {
    margin-bottom: 2rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--secondary);
}

.app-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.app-detail-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.app-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.app-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.app-detail-info .app-meta {
    margin: 1.5rem 0;
    font-size: 1rem;
}

.app-detail-info .app-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Featured Apps */
.featured-apps {
    background-color: var(--dark);
    padding: 4rem 0;
    color: white;
}

.featured-apps .section-title h2 {
    color: white;
}

.featured-apps .app-card {
    background-color: #2a3a5a;
}

.featured-apps .app-title {
    color: white;
}

.featured-apps .app-developer, 
.featured-apps .app-description, 
.featured-apps .app-size {
    color: #bbb;
}

.featured-apps .app-meta-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    padding: 1rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.newsletter-form button:hover {
    background-color: var(--primary);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 404 Page Styles */
.not-found {
    text-align: center;
    padding: 5rem 0;
}

.not-found h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: var(--danger);
}

.not-found p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--dark);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: all 0.5s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .mobile-menu {
        display: block;
        z-index: 101;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .app-detail-content {
        grid-template-columns: 1fr;
    }
}

/* Favicon fallback */
.link[rel="icon"] {
    display: none;
}

/* App Popup Styles */
.app-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.app-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.app-popup.active .popup-content {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: var(--danger);
}

.popup-app-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.popup-download-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.popup-download-btn:hover {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.popup-title {
    flex: 1;
}

.btn-back-popup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem;
    margin-right: 1rem;
}

.btn-back-popup:hover {
    color: var(--secondary);
}
/* Add these styles to the end of styles.css */
.pagination-container {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(.disabled) {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}