/* Reset & Base Variables */
:root {
    --primary-color: #8FA8FF; /* Moonlit blue-purple */
    --primary-hover: #F2CE7B; /* Moon gold */
    --text-color: #E9EDFF; /* Moon white */
    --text-light: rgba(233, 237, 255, 0.7);
    --bg-color: #0F1633; /* Indigo night sky (fallback) */
    --card-bg: rgba(255, 255, 255, 0.06);
    --border-color: rgba(143, 168, 255, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #0F1633 0%, #18204A 100%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: 700;
}
h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s, color 0.3s;
    cursor: pointer;
}
.primary-btn {
    background-color: var(--primary-color);
    color: #0F1633;
    border: none;
}
.primary-btn:hover {
    background-color: var(--primary-hover);
    color: #0F1633;
    transform: translateY(-2px);
}
.large-btn {
    padding: 16px 36px;
    font-size: 1.2rem;
}

/* Header */
header {
    background-color: rgba(15, 22, 51, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}
nav a {
    color: var(--text-color);
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover {
    color: var(--primary-hover);
}

/* Sections */
section {
    padding: 80px 0;
}

/* Hero Section */
.hero {
    background: transparent;
    color: var(--text-color);
    text-align: center;
    padding: 120px 0;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border-color: rgba(143, 168, 255, 0.5);
}
.card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Pricing Card */
.pricing-card {
    position: relative;
}
.pricing-card.featured {
    border-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(242, 206, 123, 0.15);
}
.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}
.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-hover);
    color: #0F1633;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}
.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}
.price span {
    font-size: 1rem;
    color: var(--text-light);
}
.pricing-card ul {
    margin-bottom: 30px;
    text-align: left;
}
.pricing-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
}
.pricing-card ul li:last-child {
    border-bottom: none;
}
.pricing-card .btn {
    width: 100%;
}

/* Reviews */
.review-card {
    text-align: left;
}
.stars {
    margin-bottom: 15px;
}
.review-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
}
.review-card .user {
    font-weight: bold;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
details {
    background: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
summary {
    padding: 20px;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: color 0.3s;
}
summary:hover {
    color: var(--primary-color);
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--primary-color);
}
details[open] summary::after {
    content: '−';
}
details p {
    padding: 0 20px 20px;
    color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 15px;
    padding-top: 15px;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-light);
    padding: 40px 0 20px;
    text-align: center;
}
.footer-links {
    margin-bottom: 20px;
}
.footer-links a {
    color: var(--text-light);
    margin: 0 15px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--primary-hover);
}
.copyright {
    color: rgba(233, 237, 255, 0.4);
    font-size: 0.9rem;
}

/* Subpages Basic Styles */
.subpage-header {
    background: transparent;
    color: var(--text-color);
    padding: 60px 0;
    text-align: center;
}
.subpage-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin: -40px auto 40px;
    max-width: 900px;
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.subpage-content h2 {
    text-align: left;
    margin-top: 30px;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.subpage-content h3 {
    margin-top: 20px;
}
.subpage-content p, .subpage-content ul {
    margin-bottom: 15px;
    color: var(--text-light);
}
.subpage-content ul {
    padding-left: 20px;
    list-style: disc;
}

/* Media Queries */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        padding: 15px;
        height: auto;
    }
    nav {
        margin: 15px 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav a {
        margin: 5px 10px;
    }
    
    .hero {
        padding: 80px 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .btn {
        padding: 14px 28px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .subpage-content {
        margin: -20px 15px 40px;
        padding: 20px;
    }
}

/* =========================================
   Moonlit Night Background Decoration Layer
   ========================================= */
.moonlight-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Full Moon */
.bg-moon {
    position: absolute;
    top: -15%; right: -5%;
    width: 60vw; height: 60vw;
    max-width: 700px; max-height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,237,255,0.7) 0%, rgba(143,168,255,0.3) 25%, transparent 60%);
    animation: moonBreathe 12s infinite alternate ease-in-out;
}
@keyframes moonBreathe {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.03); opacity: 1; }
}

/* Stars */
.bg-stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.bg-stars .star {
    position: absolute;
    width: 2px; height: 2px;
    background: #E9EDFF;
    border-radius: 50%;
    box-shadow: 0 0 6px 1px rgba(233, 237, 255, 0.8);
    animation: starTwinkle 3.5s infinite alternate ease-in-out;
}
.star.s1 { top: 15%; left: 20%; animation-delay: 0s; }
.star.s2 { top: 25%; left: 75%; animation-delay: 0.5s; }
.star.s3 { top: 40%; left: 10%; animation-delay: 1s; }
.star.s4 { top: 55%; left: 85%; animation-delay: 1.5s; }
.star.s5 { top: 10%; left: 60%; animation-delay: 2s; }
.star.s6 { top: 75%; left: 30%; animation-delay: 2.5s; }
.star.s7 { top: 80%; left: 80%; animation-delay: 3s; }
.star.s8 { top: 35%; left: 45%; animation-delay: 3.5s; }

@keyframes starTwinkle {
    0% { opacity: 0.1; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1.3); }
}

/* Meteor */
.bg-meteor {
    position: absolute;
    top: -10%; left: -10%;
    width: 150px; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(233, 237, 255, 0.9));
    transform: rotate(45deg);
    opacity: 0;
    animation: meteorShoot 9s infinite linear;
}
@keyframes meteorShoot {
    0% { transform: translate(0, 0) rotate(45deg); opacity: 0; }
    3% { opacity: 0; }
    8% { opacity: 0.9; }
    13% { transform: translate(80vw, 80vh) rotate(45deg); opacity: 0; }
    100% { transform: translate(80vw, 80vh) rotate(45deg); opacity: 0; }
}

/* Cloud Shadows */
.bg-cloud {
    position: absolute;
    bottom: -20%;
    width: 150vw; height: 60vh;
    background: radial-gradient(ellipse at bottom, rgba(15,22,51,0.95) 0%, transparent 75%);
    opacity: 0.85;
}
.cloud1 {
    left: -30%;
    animation: cloudMove1 46s infinite alternate ease-in-out;
}
.cloud2 {
    right: -30%;
    bottom: -30%;
    height: 70vh;
    animation: cloudMove2 60s infinite alternate ease-in-out;
}
@keyframes cloudMove1 {
    0% { transform: translateX(0); }
    100% { transform: translateX(12%); }
}
@keyframes cloudMove2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(-12%); }
}

/* Blue-purple Faint Light */
.bg-light {
    position: absolute;
    top: 20%; left: 10%;
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, rgba(143,168,255,0.12) 0%, transparent 60%);
    animation: floatLight 30s infinite alternate ease-in-out;
}
@keyframes floatLight {
    0% { transform: translate(0, 0); }
    100% { transform: translate(8%, 12%); }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .bg-moon, .bg-stars .star, .bg-cloud, .bg-light {
        animation: none !important;
    }
    .bg-meteor {
        display: none !important;
    }
}


/* Accessibility & Focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    z-index: 99999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}
:focus-visible {
    outline: 2px solid var(--primary-hover);
    outline-offset: 2px;
}
h2[id], h3[id], section[id] {
    scroll-margin-top: 80px;
}
