:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.search-bar {
    margin: 20px auto;
    max-width: 600px;
}

#searchInput {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1rem;
    outline: none;
}

#searchInput:focus {
    border-color: var(--primary-color);
}

.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.app-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 15px;
    object-fit: cover;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.app-developer {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.app-description {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9rem;
}

.app-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.download-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
}

.download-btn:hover {
    background-color: #2980b9;
}

.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.category-btn {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-color);
    font-size: 0.85rem;
    margin-top: 30px;
}

.no-results {
    text-align: center;
    grid-column: 1 / -1;
    padding: 30px;
    color: var(--gray-color);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.error-message {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.error-message p {
    margin-bottom: 15px;
}

.error-message button {
    padding: 8px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-message button:hover {
    background-color: #c0392b;
}

@media (max-width: 768px) {
    .app-list {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}