:root {
    /* Dark Theme (Default) */
    --bg-color: #030303;
    --bg-surface: #111111;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #00e676; /* Play Store-ish Green */
    --accent-hover: #00c853;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --star-color: #ffd700;
}

[data-theme="light"] {
    --bg-color: #f8f9fa;
    --bg-surface: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #5f6368;
    --accent: #01875f;
    --accent-hover: #00c853;
    --surface: #ffffff;
    --surface-hover: #f1f3f4;
    --border: #dadce0;
    --star-color: #fbbc04;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, .outline-text {
    font-family: 'Space Grotesk', sans-serif;
}

/* Glassmorphism utilities */
.glass {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0; z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.theme-toggle:hover { background: var(--surface-hover); }

/* Developer Header */
.dev-header {
    padding: 4rem 5% 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dev-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #2b5876);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,230,118,0.2);
}

.dev-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.dev-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-value { color: var(--text-main); font-size: 1.5rem; font-weight: 900; }

/* Search and Filters */
.toolbar {
    padding: 2rem 5%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-bar {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.8rem 1.5rem;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.1);
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    margin-left: 1rem;
}

.categories {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-pill {
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-pill:hover { background: var(--surface-hover); color: var(--text-main); }
.category-pill.active { background: var(--accent); color: var(--bg-color); border-color: var(--accent); }

/* Play Store Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 5% 6rem;
}

.app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

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

.card-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--surface);
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.app-info h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.app-category { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.rating { display: flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
.star { color: var(--star-color); }

.app-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-install {
    background: var(--surface);
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    border-radius: 100px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
}
.app-card:hover .btn-install { background: var(--accent); color: var(--bg-color); border-color: var(--accent); }

/* --- APP DETAIL PAGE STYLES --- */

.detail-hero {
    padding: 4rem 5% 2rem;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.detail-icon {
    width: 180px;
    height: 180px;
    border-radius: 36px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.detail-header h1 { font-size: 3.5rem; margin-bottom: 0.5rem; }
.dev-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.detail-stats { display: flex; gap: 2rem; margin: 1.5rem 0; color: var(--text-muted); }
.detail-stats .stat { text-align: center; }
.detail-stats .stat-val { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.detail-stats .stat-lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 1rem 3rem;
    border-radius: 100px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.3s;
    border: none;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }

/* Screenshots Carousel */
.screenshots-section { padding: 2rem 5%; }
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar { display: none; }
.screenshot-mockup {
    flex: 0 0 auto;
    width: 250px;
    height: 500px;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Detailed Info */
.content-section {
    padding: 3rem 5%;
    max-width: 900px;
}

.content-section h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.content-section p { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 1.5rem; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.feature-item h4 { margin-bottom: 0.5rem; font-size: 1.2rem; }

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}
.info-table th, .info-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.info-table th { color: var(--text-muted); font-weight: normal; }
.info-table td { font-weight: 600; }

/* Footer Links */
.footer-links {
    padding: 4rem 5%;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}
.footer-links a:hover { color: var(--text-main); }

@media (max-width: 768px) {
    .detail-hero { flex-direction: column; text-align: center; }
    .detail-icon { width: 120px; height: 120px; }
    .detail-header h1 { font-size: 2.5rem; }
    .detail-stats { justify-content: center; }
}
