/* Modern Minimalist Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap'); /* For Arabic */

:root {
    --primary-color: #007AFF; /* iOS Blue */
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --bg-color: #ffffff;
    --bg-secondary: #f5f5f7;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --border-radius: 18px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #0056b3;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin-left: 1.5rem;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-color) !important;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 50%, #f093fb08 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 122, 255, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(88, 86, 214, 0.04) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, 2%) rotate(1deg); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    position: relative;
}

/* Social Proof Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.hero-badge i {
    color: var(--primary-color);
}

.hero-badge strong {
    color: var(--text-color);
}

/* App Cards */
.app-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #5856d6);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.app-card:hover::before {
    transform: scaleX(1);
}

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

/* Featured App Card */
.app-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.02) 0%, rgba(88, 86, 214, 0.02) 100%);
}

.app-card.featured::before {
    transform: scaleX(1);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary-color), #5856d6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[dir="rtl"] .featured-badge {
    right: auto;
    left: 12px;
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
    transition: transform 0.4s ease;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.app-rating {
    color: #FFB800;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-shadow: 0 1px 2px rgba(255, 184, 0, 0.3);
}

.app-rating i {
    filter: drop-shadow(0 1px 2px rgba(255, 184, 0, 0.4));
}

.rating-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 6px;
    font-weight: 500;
}

/* Download Count Badge */
.download-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.download-count i {
    color: #34c759;
    font-size: 0.7rem;
}

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

.btn-download {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.btn-download:hover {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-links a {
    color: var(--text-secondary);
    margin-right: 1.5rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* RTL Support */
[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

[dir="rtl"] .nav-link {
    margin-left: 0;
    margin-right: 1.5rem;
}

[dir="rtl"] .rating-count {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .footer-links a {
    margin-right: 0;
    margin-left: 1.5rem;
}

/* App Detail Page */
.app-header {
    padding: 4rem 0;
    background-color: var(--bg-secondary);
}

.app-detail-icon {
    width: 160px;
    height: 160px;
    border-radius: 32px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.app-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.app-detail-meta {
    display: flex;
    gap: 20px;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.meta-value {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.app-screenshots {
    padding: 4rem 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.app-screenshots::-webkit-scrollbar {
    display: none;
}

.screenshot {
    height: 500px;
    border-radius: 20px;
    margin-right: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: inline-block;
}

[dir="rtl"] .screenshot {
    margin-right: 0;
    margin-left: 20px;
}

.legal-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.legal-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 20px;
}

[dir="rtl"] .legal-links a {
    margin-right: 0;
    margin-left: 20px;
}
