:root {
    --primary: #004a99;
    --secondary: #00bcd4;
    --accent: #0df2f2;
    --white: #ffffff;
    --bg-dark: #020b1a;
    --text-main: #e0e6ed;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --container-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Background Droplets */
#water-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.droplet {
    position: absolute;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    filter: blur(2px);
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(110vh);
    }
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(2, 11, 26, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

#main-header.scrolled {
    padding: 0.8rem 0;
    background: rgba(2, 11, 26, 0.8);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg);
    padding: 0.3rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.lang-btn {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
}

.lang-btn.active {
    background: var(--secondary);
    color: var(--bg-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 70% 50%, rgba(0, 188, 212, 0.15) 0%, transparent 50%);
}

.hero h1 {
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1.5rem 0 2.5rem;
    color: #a0aec0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 188, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 188, 212, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--bg-dark);
}

/* Glass Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    transition: var(--transition);
}

/* Sections */
section {
    padding: 8rem 0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 1.2rem !important;
    cursor: pointer;
}

.product-card:hover {
    line-height: 1.4;
}

.product-img {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    position: relative;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
}

.product-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.1) translateY(-8px);
}

.product-img.hardware {
    background: rgba(255, 255, 255, 0.05);
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.product-desc {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-tag {
    font-weight: 800;
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

/* science-grid (Stitch) */
.science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.science-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.science-card .icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.science-card .step-number {
    position: absolute;
    top: -1rem;
    right: -0.5rem;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    z-index: -1;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-dark);
    max-width: 900px;
    width: 100%;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10;
}

.modal-img-col {
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.modal-img-col img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.modal-info-col {
    padding: 3.5rem;
}

.modal-info-col h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.modal-info-col .price-tag {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.modal-info-col p {
    color: #a0aec0;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-dark);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    z-index: 3000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cart-footer {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* Cart Icon Tool */
.cart-trigger {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: var(--bg-dark);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
}

/* Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive */
@media (max-width: 900px) {
    .modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-img-col {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}
/* --- Auth UI Styles --- */
.auth-modal {
    max-width: 450px !important;
    display: block !important;
    padding: 3rem;
}

.auth-form h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #a0aec0;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--white);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

.auth-switch span {
    color: var(--secondary);
    cursor: pointer;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 1rem;
    padding: 0.3rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-initials {
    width: 24px;
    height: 24px;
    background: var(--secondary);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

/* Subscription Selector */
.sub-selector {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.sub-option {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-option:hover {
    border-color: var(--secondary);
}

.sub-option.active {
    background: rgba(0, 188, 212, 0.1);
    border-color: var(--secondary);
}

.sub-badge {
    font-size: 0.65rem;
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
