/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.main-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.main-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background-color: #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: #4a6bff;
    color: white;
    box-shadow: 0 4px 8px rgba(74, 107, 255, 0.3);
}

/* Grid Layout */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Card Styles */
.app-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.card-header {
    padding: 12px 15px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.card-category {
    font-size: 0.85rem;
    color: #4a6bff;
    font-weight: 600;
}

.card-category i {
    margin-right: 5px;
}

.card-warning {
    color: #ff9800;
    font-size: 0.9rem;
}

.card-image {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.3;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.card-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.card-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-btn:not(.disabled) {
    background-color: #4a6bff;
    color: white;
}

.card-btn:hover:not(.disabled) {
    background-color: #3a5bef;
    transform: translateY(-2px);
}

.card-btn.secondary {
    background-color: #f0f2f5;
    color: #555;
}

.card-btn.secondary:hover:not(.disabled) {
    background-color: #e0e2e5;
}

.card-btn.disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* No Apps Message */
.no-apps {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.no-apps i {
    margin-bottom: 20px;
    color: #ccc;
}

.no-apps h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    width: 80%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    padding: 10px 15px;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

#modal-body {
    padding: 30px;
    clear: both;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #777;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 576px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-section {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}
