/* App Store Website - Main Stylesheet */

/* CSS Variables */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --white: #fff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 20px;
}

nav a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light-color);
    border-radius: 25px;
    padding: 8px 15px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 5px 10px;
    width: 200px;
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-download {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 40px;
    font-size: 18px;
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Featured Apps Section */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.featured-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.app-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 15px;
}

.app-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-developer {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.app-rating {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.app-rating span {
    color: #999;
    font-weight: normal;
}

.app-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.app-btn:hover {
    background: var(--primary-dark);
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: var(--white);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.category-name {
    font-weight: 600;
}

/* App Detail Page */
.app-detail {
    padding: 40px 0;
}

.app-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.app-detail-icon {
    width: 150px;
    height: 150px;
    border-radius: 30px;
    object-fit: cover;
}

.app-detail-info {
    flex: 1;
    min-width: 300px;
}

.app-detail-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.app-detail-info .developer {
    color: #666;
    margin-bottom: 15px;
}

.app-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meta-item {
    background: var(--light-color);
    padding: 10px 20px;
    border-radius: 8px;
}

.meta-item strong {
    color: var(--primary-color);
}

/* Download Flow Pages */
.download-flow {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-page {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.blog-content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.blog-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.blog-content p {
    margin-bottom: 15px;
}

.scroll-section {
    text-align: center;
    padding: 60px 0;
}

.scroll-btn {
    background: var(--secondary-color);
    color: var(--white);
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.scroll-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.continue-btn {
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 35px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.continue-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Download Page */
.download-page {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.download-page .app-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.download-info {
    margin: 30px 0;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-color);
}

.info-row:last-child {
    border-bottom: none;
}

.download-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Related Apps */
.related-apps {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--light-color);
}

.related-apps h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.related-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-app-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.related-app-card:hover {
    transform: translateX(5px);
    background: var(--primary-color);
    color: var(--white);
}

.related-app-card img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
}

.developer-branding {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #20b857;
    transform: scale(1.1);
    box-shadow: 3px 3px 15px rgba(0,0,0,0.4);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* Admin Panel Styles */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
}

/* Admin Dashboard */
.admin-header {
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    background: var(--dark-color);
    padding: 0;
}

.admin-nav ul {
    display: flex;
    flex-wrap: wrap;
}

.admin-nav a {
    display: block;
    padding: 15px 25px;
    color: var(--white);
    transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
}

.admin-content {
    padding: 30px;
}

.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.admin-card h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-color);
}

.data-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--light-color);
}

.action-btn {
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    margin-right: 5px;
}

.action-btn.edit {
    background: var(--secondary-color);
    color: var(--white);
}

.action-btn.delete {
    background: #f44336;
    color: var(--white);
}

.action-btn.view {
    background: var(--accent-color);
    color: var(--white);
}

/* Play Store Fetcher */
.fetcher-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.fetcher-form {
    background: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
}

.preview-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: var(--white);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--primary-color);
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: var(--secondary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-main {
        flex-wrap: wrap;
    }
    
    nav {
        display: none;
        width: 100%;
        order: 3;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid var(--light-color);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .app-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .fetcher-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }
    
    .hero-buttons .btn {
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .featured-apps {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-page {
        padding: 25px;
    }
    
    .download-page {
        padding: 25px;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 26px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 15px;
    }
    
    .category-icon {
        font-size: 30px;
    }
    
    .app-detail-info h1 {
        font-size: 24px;
    }
    
    .download-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Header Fix - Search and Menu in Single Line */
@media (max-width: 992px) {
    .header-main .search-box {
        flex: 1;
        min-width: 200px;
        margin-left: 15px;
    }
    
    .header-main .search-box input {
        width: 100%;
    }
    
    .header-main > .logo {
        flex: 0 0 auto;
    }
    
    .header-main > .mobile-menu-btn {
        flex: 0 0 auto;
        margin-left: 10px;
    }
}
