/* ============================
   PAX Horoscope & Astrology
   Astrology Theme Stylesheet
   ============================ */

/* CSS Variables */
:root {
    /* Primary Colors - Mystical Purple Theme */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary: #4f46e5;
    --secondary-light: #818cf8;
    --accent: #fbbf24;
    --accent-light: #fcd34d;

    /* Background Colors */
    --bg-dark: #0f0a1e;
    --bg-darker: #080510;
    --bg-card: rgba(124, 58, 237, 0.08);
    --bg-card-hover: rgba(124, 58, 237, 0.15);

    /* Text Colors */
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;

    /* Element Colors */
    --fire: #ef4444;
    --earth: #22c55e;
    --air: #3b82f6;
    --water: #06b6d4;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #1e1b4b 100%);
    --gradient-accent: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-card: linear-gradient(145deg, rgba(124, 58, 237, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    --gradient-hero: linear-gradient(180deg, rgba(8, 5, 16, 0) 0%, rgba(15, 10, 30, 1) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(124, 58, 237, 0.15);
    --shadow-md: 0 4px 20px rgba(124, 58, 237, 0.2);
    --shadow-lg: 0 8px 40px rgba(124, 58, 237, 0.25);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.4);

    /* Border */
    --border-color: rgba(124, 58, 237, 0.2);
    --border-glow: rgba(124, 58, 237, 0.5);

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;
    --card-radius: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Stars Canvas Background */
.stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ============================
   Navigation
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.navbar .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
}

.navbar .logo img {
    border-radius: 8px;
}

.navbar .logo span {
    display: none;
}

@media (min-width: 768px) {
    .navbar .logo span {
        display: inline;
    }
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
}

.lang-btn .globe-icon {
    opacity: 0.8;
}

.lang-btn .chevron-icon {
    opacity: 0.6;
    transition: var(--transition-fast);
}

.lang-dropdown.open .chevron-icon {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 100;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu button,
.lang-menu a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-menu button:hover,
.lang-menu a:hover {
    background: var(--bg-card);
    color: var(--text-light);
}

.lang-menu button.active,
.lang-menu a.active {
    background: var(--bg-card-hover);
    color: var(--primary-light);
}

/* Scrollbar for lang menu */
.lang-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-menu::-webkit-scrollbar-track {
    background: transparent;
}

.lang-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* ============================
   Hero Section
   ============================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-content {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--gradient-accent);
    border-radius: 50px;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.badge-icon {
    font-size: 1rem;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.6); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 32px;
}

@media (min-width: 1024px) {
    .hero-subtitle {
        margin: 0 0 32px;
    }
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* Store Buttons */
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.store-btn img {
    height: 53px;
    width: auto;
}

.store-btn.large img {
    height: 59px;
}

.store-btn.google-play:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.store-btn.app-store {
    position: relative;
}

.store-btn.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.coming-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 4px 10px;
    background: var(--primary);
    border-radius: 20px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

@media (min-width: 1024px) {
    .hero-stats {
        justify-content: flex-start;
    }
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    width: 280px;
    max-width: 100%;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid var(--border-color);
    background: var(--bg-dark);
}

.phone-mockup img {
    width: 100%;
    height: auto;
    display: block;
}

/* Floating Zodiac Symbols */
.floating-zodiac {
    position: absolute;
    font-size: 2.5rem;
    color: var(--primary-light);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.zodiac-1 { top: 10%; left: 5%; animation-delay: 0s; }
.zodiac-2 { top: 20%; right: 5%; animation-delay: 1.5s; }
.zodiac-3 { bottom: 30%; left: 10%; animation-delay: 3s; }
.zodiac-4 { bottom: 10%; right: 10%; animation-delay: 4.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================
   Section Styles
   ============================ */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================
   Features Section
   ============================ */
.features {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px 24px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    text-align: center;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================
   Zodiac Signs Section
   ============================ */
.zodiac {
    background: var(--bg-darker);
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .zodiac-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .zodiac-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.zodiac-card {
    padding: 24px 16px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.zodiac-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md);
}

.zodiac-card[data-element="fire"]:hover {
    border-color: var(--fire);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.zodiac-card[data-element="earth"]:hover {
    border-color: var(--earth);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.zodiac-card[data-element="air"]:hover {
    border-color: var(--air);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.zodiac-card[data-element="water"]:hover {
    border-color: var(--water);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.zodiac-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
}

.zodiac-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.zodiac-dates {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.zodiac-element {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 20px;
}

.zodiac-card[data-element="fire"] .zodiac-element {
    background: rgba(239, 68, 68, 0.2);
    color: var(--fire);
}

.zodiac-card[data-element="earth"] .zodiac-element {
    background: rgba(34, 197, 94, 0.2);
    color: var(--earth);
}

.zodiac-card[data-element="air"] .zodiac-element {
    background: rgba(59, 130, 246, 0.2);
    color: var(--air);
}

.zodiac-card[data-element="water"] .zodiac-element {
    background: rgba(6, 182, 212, 0.2);
    color: var(--water);
}

/* ============================
   Screenshots Section
   ============================ */
.screenshots {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    overflow: hidden;
}

.screenshots-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: center;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition-normal);
}

.screenshot-item:hover {
    transform: scale(1.02);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================
   FAQ Section
   ============================ */
.faq {
    background: var(--bg-dark);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--border-glow);
}

.faq-item[open] {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-light);
    transition: var(--transition-fast);
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item summary:hover {
    color: var(--primary-light);
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================
   Download Section
   ============================ */
.download {
    background: var(--gradient-primary);
    padding: 80px 0;
}

.download-content {
    text-align: center;
}

.download-text h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.download-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--bg-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-logo img {
    border-radius: 8px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-tagline {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ============================
   Animations
   ============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Responsive Adjustments
   ============================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .hero {
        padding-top: 80px;
    }

    .hero-visual {
        order: -1;
    }

    .phone-mockup {
        width: 220px;
    }

    .floating-zodiac {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }

    .stat-divider {
        display: none;
    }

    .hero-stats {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-btn img {
        height: 48px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .zodiac-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================
   Utility Classes
   ============================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
