/* --- Basic Reset & Body Styling --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif; /* Changed font for a more modern feel */
    background-color: #f9f9f9; /* Slightly different background */
    color: #333;
}

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

/* --- Header & Search Bar - UPDATED --- */
header {
    background-color: #008080; /* Your requested color */
    color: #ffffff; /* White text for better contrast */
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Space between title and search bar */
}

.logo-img {
    height: 40px; /* Logo size */
    margin-right: 15px;
}

.logo-text {
    font-size: 1.5em; /* Smaller title text */
    font-weight: 500;
}

.search-bar input {
    width: 100%; /* Full width search bar */
    padding: 12px 20px;
    border: none;
    border-radius: 25px; /* More rounded */
    font-size: 1em;
    background-color: rgba(255, 255, 255, 0.2); /* Transparent white */
    color: #ffffff;
}

.search-bar input::placeholder {
    color: #e0e0e0; /* Lighter placeholder text */
}

/* --- Main Content & Sections --- */
main {
    padding: 40px 0;
}

.app-section h2 {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2c3e50;
}

.loading-text {
    color: #777;
    font-size: 1.1em;
}

/* --- App Grid & Card - UPDATED & More Stylish --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.app-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for border-radius */
}

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

.app-card-content {
    padding: 20px;
    display: flex;
    align-items: center;
}

.app-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-right: 15px;
    object-fit: cover;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

.app-card-info h3 {
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.3;
}

.app-card-info p {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

/* --- Footer - UPDATED --- */
footer {
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    background-color: #008080; /* Your requested color */
    color: #e0e0e0; /* Light gray text */
}

/* --- MOBILE FRIENDLY STYLES --- */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1.3em;
    }
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .header-top {
        margin-bottom: 12px;
    }
    .logo-img {
        height: 35px;
    }
    .logo-text {
        font-size: 1.2em;
    }
    .app-grid {
        /* On very small screens, show 2 columns */
        grid-template-columns: 1fr 1fr; 
        gap: 15px;
    }
    .app-card-content {
        padding: 15px;
        flex-direction: column; /* Stack icon and text vertically */
        align-items: flex-start;
    }
    .app-card-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* --- App Detail Page Styles --- */

.back-link {
    text-decoration: none;
    color: inherit;
}

.app-detail-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

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

.app-detail-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    margin-right: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.app-detail-title-group h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
}

.app-detail-title-group p {
    font-size: 1.1em;
    color: #008080; /* Your theme color */
    font-weight: 500;
}

.app-detail-title-group span {
    font-size: 0.9em;
    color: #777;
}

.app-detail-actions {
    margin-bottom: 30px;
}

.download-button {
    display: inline-block;
    width: 100%;
    text-align: center;
    background-color: #2ecc71; /* Green color for download */
    color: #fff;
    padding: 15px 0;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.download-button:hover {
    background-color: #27ae60;
}

.no-download {
    color: #e74c3c;
    text-align: center;
    font-weight: 500;
}

.screenshots-gallery {
    margin-bottom: 30px;
}

.screenshots-gallery h2, .app-description h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gallery {
    display: flex;
    gap: 15px;
    overflow-x: auto; /* Allows horizontal scrolling */
    padding-bottom: 10px;
}

.gallery img {
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
}

.app-description p {
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap; /* Preserves line breaks from your description */
}

.error-text {
    color: #e74c3c;
    font-size: 1.2em;
    text-align: center;
    padding: 40px 0;
}
