/* --- CSS Variables and Base Styles --- */
:root {
    --bg-color: #0d0c1d;
    --card-bg-color: #1a1a2e;
    --primary-color: #00ff7f; /* Neon Green */
    --secondary-color: #9f7aea; /* Purple */
    --text-color: #e0e0e0;
    --text-muted-color: #a0a0a0;
    --border-color: #33334d;
    --shadow-color: rgba(0, 255, 127, 0.2);
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #001f00, #0d0c1d, #1a0033);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    animation: fadeIn 1s ease-in-out;
}

body.modal-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.main-header {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: lowercase;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* --- Hero Section & Search --- */
.hero-section {
    padding: 4rem 0 2rem;
    text-align: center;
    overflow: hidden; /* Contain elements for animation */
}

.search-form {
    display: flex;
    justify-content: center;
    background: var(--card-bg-color);
    border-radius: 50px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted-color);
}

.search-button {
    background: var(--primary-color);
    border: none;
    color: var(--bg-color);
    padding: 0 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #00e671;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 2rem 0;
    position: relative;
    display: inline-block;
    transition: opacity 0.4s ease-out;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* --- Apps & Search Results Section --- */
.apps-section {
    padding-bottom: 4rem;
    position: relative;
    transition: opacity 0.4s ease-out;
}

.search-results-section {
    display: none; /* Hidden by default */
    padding-bottom: 4rem;
}

/* --- Active Search State --- */
body.search-active .apps-section,
body.search-active .page-title {
    opacity: 0.1;
    pointer-events: none;
}

body.search-active .search-results-section {
    display: block;
}


.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--card-bg-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 127, 0.2);
    box-shadow: 0 0 5px rgba(0, 255, 127, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.4s ease;
}

.app-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 255, 127, 0.5), 0 0 40px rgba(0, 255, 127, 0.3);
}

.card-image {
    position: relative;
    height: 180px;
    background-color: #333;
    overflow: hidden;
}

.card-image > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease-in-out;
}

.app-card:hover .card-image > img:first-child {
    transform: scale(1.05);
}

.card-app-icon-overlay {
    position: absolute;
    bottom: -30px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--card-bg-color);
    object-fit: cover;
    background-color: #333;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.card-badge.popular {
    background: var(--primary-color);
    color: var(--bg-color);
}

.card-badge.hot {
    background: #ff4757;
}

.card-rating {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: #ffd700;
}

.card-content {
    padding: 40px 20px 20px;
}

.card-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.app-subtitle {
    color: var(--primary-color);
    margin: 0 0 1rem;
    font-weight: 600;
}

.card-description {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 50px;
    transition: color 0.3s ease;
}

.app-card:hover .card-description {
    color: var(--primary-color);
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted-color);
    margin-bottom: 1.5rem;
}

.reviews-summary svg {
    color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.card-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    flex-grow: 1;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-get-app {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-get-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.btn-get-access {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-get-access:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

.btn-view-all {
    display: inline-block;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

/* --- Static Page Styles --- */
.page-section {
    padding: 4rem 0;
}

.page-content {
    background-color: var(--card-bg-color);
    padding: 2rem 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2, .page-content h3 {
    color: var(--primary-color);
}

.page-content p, .page-content li {
    color: var(--text-muted-color);
    line-height: 1.8;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

/* --- Contact Form --- */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.contact-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted-color);
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.main-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

#modalSubtitle {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

#modalImage {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background-color: #333;
}

#modalDescription {
    color: var(--text-muted-color);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Simple hiding for mobile, could be replaced with a hamburger menu */
    }
    .page-title {
        font-size: 2.5rem;
    }
    .app-grid {
        grid-template-columns: 1fr;
    }
    .page-content {
        padding: 1.5rem;
    }
}