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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: #0d0d1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #e94560;
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: #ff6b81;
}

ul, ol {
    list-style: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
}

/* ===== Utility ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Nav ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(233, 69, 96, 0.15);
    transition: background 0.3s, backdrop-filter 0.3s;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
}

nav ul {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

nav ul li a {
    color: #c0c0d0;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color 0.3s;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: width 0.3s;
}
nav ul li a:hover {
    color: #fff;
}
nav ul li a:hover::after {
    width: 100%;
}

#darkModeToggle {
    font-size: 1.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.1);
    transition: background 0.3s, transform 0.3s;
}
#darkModeToggle:hover {
    background: rgba(233, 69, 96, 0.25);
    transform: scale(1.1);
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
    gap: 2rem;
    flex-wrap: wrap;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(233,69,96,0.08) 0%, transparent 60%);
    animation: heroGlow 12s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

#hero > div:first-child {
    flex: 1 1 400px;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

#hero > div:last-child {
    flex: 1 1 300px;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

#hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #e94560, #ff6b81, #e94560);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

#hero p {
    font-size: 1.1rem;
    color: #b0b0c8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

#hero div:first-child > div {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}
#hero a[role="button"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233,69,96,0.45);
}

#hero a[role="button"]:last-child {
    background: transparent;
    border: 2px solid #e94560;
    color: #e94560;
    box-shadow: none;
}
#hero a[role="button"]:last-child:hover {
    background: rgba(233,69,96,0.1);
    border-color: #ff6b81;
    color: #ff6b81;
}

/* ===== Sections Common ===== */
section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #e94560, #ff6b81);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

section p {
    color: #b0b0c8;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.05rem;
}

/* ===== About ===== */
#about > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#about article {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(233, 69, 96, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
#about article:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.15);
}

#about article h3 {
    color: #e94560;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

#about article p {
    text-align: left;
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Products & Services ===== */
#products > div,
#services > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#products article,
#services article {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(233, 69, 96, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
#products article::before,
#services article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e94560, #ff6b81);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}
#products article:hover::before,
#services article:hover::before {
    transform: scaleX(1);
}

#products article:hover,
#services article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.12);
}

#products article h3,
#services article h3 {
    color: #e94560;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

#products article p,
#services article p {
    text-align: left;
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Features ===== */
#features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

#features ul li {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(233, 69, 96, 0.08);
    transition: all 0.3s;
    color: #d0d0e0;
    font-size: 0.95rem;
}
#features ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
}

#features ul li strong {
    color: #e94560;
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

/* ===== Resources ===== */
#resources > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

#resources article {
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(233, 69, 96, 0.06);
    transition: all 0.3s;
}
#resources article:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.1);
}

#resources article h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}
#resources article h3 a {
    color: #e0e0f0;
    transition: color 0.3s;
}
#resources article h3 a:hover {
    color: #e94560;
}

#resources article p {
    text-align: left;
    margin: 0;
    font-size: 0.9rem;
    color: #a0a0b8;
}

/* ===== HowTo ===== */
#howto {
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(233, 69, 96, 0.08);
}

#howto ol {
    max-width: 600px;
    margin: 1.5rem auto;
    counter-reset: step;
}

#howto ol li {
    counter-increment: step;
    padding: 0.8rem 1rem 0.8rem 3rem;
    position: relative;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(233, 69, 96, 0.06);
    transition: background 0.3s;
}
#howto ol li:hover {
    background: rgba(26, 26, 46, 0.8);
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e94560;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

#howto ol li strong {
    color: #e94560;
}

/* ===== FAQ ===== */
#faq > div {
    max-width: 800px;
    margin: 2rem auto 0;
}

details {
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 14px;
    margin-bottom: 1rem;
    border: 1px solid rgba(233, 69, 96, 0.06);
    overflow: hidden;
    transition: all 0.3s;
}
details:hover {
    border-color: rgba(233, 69, 96, 0.2);
}

summary {
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    color: #d0d0e8;
    position: relative;
    list-style: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    font-size: 1.4rem;
    color: #e94560;
    transition: transform 0.3s;
}
details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

summary:hover {
    color: #fff;
}

details p {
    padding: 0 1.5rem 1.2rem;
    text-align: left;
    margin: 0;
    font-size: 0.95rem;
    color: #b0b0c8;
}

/* ===== Contact ===== */
#contact address {
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto 0;
    border: 1px solid rgba(233, 69, 96, 0.08);
    font-style: normal;
}

#contact address p {
    text-align: left;
    margin: 0 0 0.8rem;
    font-size: 1rem;
    color: #c0c0d0;
}

#contact address a {
    color: #e94560;
    font-weight: 500;
}
#contact address a:hover {
    color: #ff6b81;
}

/* ===== Footer ===== */
footer {
    background: rgba(13, 13, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(233, 69, 96, 0.1);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 2rem;
}

footer > div:first-child {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

footer h3 {
    color: #e94560;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

footer p {
    color: #a0a0b8;
    font-size: 0.9rem;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer ul li a {
    color: #b0b0c8;
    font-size: 0.9rem;
    transition: color 0.3s;
}
footer ul li a:hover {
    color: #e94560;
}

footer > div:last-child {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(233, 69, 96, 0.08);
    color: #888;
    font-size: 0.85rem;
}

/* ===== Back to Top ===== */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e94560;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}
#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#backToTop:hover {
    background: #c23152;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233,69,96,0.4);
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.5rem 1rem;
    }
    nav ul {
        justify-content: center;
        gap: 0.8rem;
    }
    nav ul li a {
        font-size: 0.85rem;
    }
    #hero {
        padding: 5rem 1rem 3rem;
        flex-direction: column;
    }
    #hero > div:last-child {
        display: none;
    }
    section {
        padding: 3rem 1rem;
    }
    #howto {
        padding: 2rem 1rem;
    }
    #contact address {
        padding: 1.5rem;
    }
    footer > div:first-child {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    #hero h1 {
        font-size: 1.8rem;
    }
    #hero p {
        font-size: 0.95rem;
    }
    #hero a[role="button"] {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    nav ul li a {
        font-size: 0.8rem;
    }
}

/* ===== Dark Mode Toggle State (light mode not needed, but toggling icon) ===== */
body.light {
    background: #f5f5fa;
    color: #1a1a2e;
}
body.light header {
    background: rgba(245, 245, 250, 0.85);
    border-bottom-color: rgba(233, 69, 96, 0.2);
}
body.light nav ul li a {
    color: #333;
}
body.light nav ul li a:hover {
    color: #e94560;
}
body.light #darkModeToggle {
    background: rgba(233, 69, 96, 0.1);
}
body.light #hero {
    background: linear-gradient(135deg, #f0f0f8 0%, #e8e8f0 40%, #ddddee 70%, #ccccdd 100%);
}
body.light #hero h1 {
    -webkit-text-fill-color: #e94560;
}
body.light #hero p {
    color: #555;
}
body.light section h2 {
    -webkit-text-fill-color: #e94560;
}
body.light section p,
body.light #about article p,
body.light #products article p,
body.light #services article p,
body.light #resources article p,
body.light details p,
body.light #contact address p,
body.light footer p,
body.light footer ul li a {
    color: #444;
}
body.light #about article,
body.light #products article,
body.light #services article,
body.light #features ul li,
body.light #resources article,
body.light #howto,
body.light details,
body.light #contact address {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(233, 69, 96, 0.15);
}
body.light #about article h3,
body.light #products article h3,
body.light #services article h3,
body.light #features ul li strong,
body.light #howto ol li strong,
body.light footer h3 {
    color: #c23152;
}
body.light #howto ol li {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(233, 69, 96, 0.1);
}
body.light summary {
    color: #1a1a2e;
}
body.light summary:hover {
    color: #c23152;
}
body.light footer {
    background: rgba(245, 245, 250, 0.9);
    border-top-color: rgba(233, 69, 96, 0.15);
}
body.light footer > div:last-child {
    color: #888;
}
body.light #backToTop {
    background: #c23152;
    box-shadow: 0 4px 15px rgba(194, 49, 82, 0.3);
}
body.light #backToTop:hover {
    background: #a82844;
}

/* ===== Scroll Animation Trigger (via Intersection Observer will add class) ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}