/* public/style.css */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --danger: #ef4444;
    --card-bg: #ffffff;
    --dark-blue: #1e293b;
}

/* Base Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    /* Increased for 4 columns */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAVIGATION --- */
nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Mobile Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--border);
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item-dropdown {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        margin-top: 5px;
        display: block;
        /* Always show in mobile for simplicity or manage via JS */
    }
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon-link {
    color: var(--primary);
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.nav-icon-link:hover {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
    /* Primary color with opacity */
}

.plan-badge,
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
}

.badge-free {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-solo {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-starter {
    background: #dcfce7;
    color: #15803d;
}

.badge-business {
    background: #fef3c7;
    color: #b45309;
}

.badge-plus {
    background: #ffe4e6;
    color: #be123c;
}

.badge-pro {
    background: #fae8ff;
    color: #86198f;
}

.badge-premium {
    background: #fae8ff;
    color: #86198f;
}

.badge-ultimate {
    background: #1e293b;
    color: #f8fafc;
}

.nav-account-btn svg {
    width: 32px;
    /* Made larger */
    height: 32px;
    stroke-width: 2;
}

.nav-account-btn.logged-in {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.nav-account-btn.logged-in:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

/* --- BUTTONS --- */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.full-width {
    width: 100%;
    margin-top: 15px;
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: 3.5rem;
    color: #0f172a;
    margin: 20px 0;
    letter-spacing: -1.5px;
    line-height: 1.1;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-subtitle {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    font-style: italic;
    color: #334155;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Discrete text links in hero */
[data-i18n="hero_availability"] a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dotted #94a3b8;
    transition: all 0.2s ease;
}

[data-i18n="hero_availability"] a:hover {
    border-bottom: 2px solid #475569;
}

/* --- VIDEO SECTION --- */
.video-section {
    margin-top: -20px;
    margin-bottom: 20px;
}

.video-wrapper {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    /* border: 4px solid var(--dark-blue); */
    background: transparent;
    /* Ensure proportional resizing */
    height: auto;
    position: relative;
}

.demo-video {
    width: 100%;
    height: auto;
    /* object-fit: cover; */
    display: block;
}

/* --- FEATURES GRID --- */
.features {
    padding: 20px 0 60px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    padding: 22px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
    display: grid;
    grid-template-rows: 1fr auto 90px;
}

.feat-content {
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.feature-card h3 {
    margin-top: 0;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature-card p {
    font-size: 0.92rem;
    line-height: 1.5;
}

.feature-card .feat-warn {
    font-size: 11px;
    font-style: italic;
    line-height: 1.3;
    margin: 6px 0 0;
    border-radius: 0 5px 5px 0;
    align-self: start;
    overflow: hidden;
}

.feature-card .feat-warn:not(:empty) {
    padding: 5px 9px;
    background: #fff7ed;
    border-left: 3px solid #f97316;
    color: #7c2d12;
}


/* =========================================
   UPDATED DIAGRAM: Embedded Laptop Workflow
   ========================================= */

.architecture-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 60px 0 30px;
    flex-wrap: wrap;
}

/* Internal Network Grouping */
.internal-network-group {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 30px 20px 20px;
    position: relative;
    margin-right: 20px;
    background-color: rgba(248, 250, 252, 0.5);
}

.network-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 10px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trust-note {
    max-width: 700px;
    margin: 0 auto;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    color: #475569;
    text-align: center;
}

.trust-note a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

/* --- GENERIC NODE STYLING (Fix for missing styles) --- */
.arch-node {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 180px;
}

.arch-node h4 {
    margin: 10px 0 5px;
    font-size: 1.1rem;
    color: #1e293b;
}

.arch-node p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.arch-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 5px;
}

/* Specific Nodes Overrides */
.arch-node.computer-container {
    width: 380px;
    padding: 0;
    text-align: left;
    overflow: hidden;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
}

.node-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.node-header .arch-icon {
    margin-bottom: 0;
}

.node-header h4 {
    margin: 0;
}

.arch-node.cloud-node {
    width: 180px;
}

/* Internal Layout */
.internal-flow {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.internal-step {
    width: 100%;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chrome-logo {
    width: 16px;
    height: 16px;
}

.code-snippet {
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: monospace;
    line-height: 1.4;
}

.code-snippet.danger {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #ef4444;
    color: #334155;
}

.code-snippet.safe {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    margin-top: 15px;
}

.masking-engine {
    background: white;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
}

.engine-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.arch-icon-small {
    font-size: 1.5rem;
}

.engine-text {
    display: flex;
    flex-direction: column;
}

.engine-text strong {
    color: #4338ca;
    font-size: 0.95rem;
    margin: 0;
}

.engine-text span {
    color: #64748b;
    font-size: 0.75rem;
}

.down-arrow {
    color: #cbd5e1;
    font-weight: bold;
}

/* 2. THE TRAFFIC FLOW (Arrows) */
/* 2. THE TRAFFIC FLOW (Arrows) */
.traffic-flow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    margin: 0 30px;
    width: 200px;
}

.arrow-wrapper {
    position: relative;
    width: 100%;
    text-align: center;
    overflow: visible !important;
    /* ALLOW PACKET TO FLOAT OVER NODE */
}

.arrow-line {
    height: 2px;
    background: #cbd5e1;
    width: 100%;
    position: relative;
    margin: 10px 0;
    overflow: visible !important;
    /* ALLOW PACKET TO FLOAT OVER NODE */
}

.flow-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.flow-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ANIMATION PACKETS */
.packet-track {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.packet-mover {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    /* Ensure on top of nodes */
}

.packet-body {
    background: #fff;
    border: 1px solid #6366f1;
    color: #1e293b;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Fixed Dimensions for Stability */
    width: 130px;
    height: 24px;
    position: relative;
    overflow: hidden;
}

.packet-body span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

/* OUTGOING (Left to Right) - Active 0% to 40% (4s) */
.packet-mover.outgoing {
    animation: moveRight 10s linear infinite;
}

.packet-mover.outgoing .state-1 {
    /* Unmasked -> Hidden */
    animation: fadeOutEarly 10s linear infinite;
}

.packet-mover.outgoing .state-2 {
    /* Masked -> Visible */
    animation: fadeInEarly 10s linear infinite;
}

/* INCOMING (Right to Left) - Active 50% to 90% (4s) */
.packet-mover.incoming {
    animation: moveLeft 10s linear infinite;
    /* No delay needed if keyframes handle the waiting */
}

.packet-mover.incoming .state-1 {
    /* Masked -> Hidden */
    animation: fadeOutLate 10s linear infinite;
}

.packet-mover.incoming .state-2 {
    /* Unmasked -> Visible */
    animation: fadeInLate 10s linear infinite;
}

/* Outgoing Move: 0-40% Active */
/* EXTENDED: Starts at -250px (Narrow Browser) -> Pause -> -65px (Ext Center) -> 0 -> 100% */
@keyframes moveRight {
    0% {
        left: -250px;
        opacity: 1;
    }

    5% {
        left: -250px;
        opacity: 1;
    }

    /* PAUSE */
    38% {
        opacity: 1;
    }

    40% {
        left: 100%;
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Incoming Move: 50-90% Active */
@keyframes moveLeft {
    0% {
        left: 100%;
        opacity: 0;
    }

    50% {
        left: 100%;
        opacity: 0;
    }

    52% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    90% {
        left: -250px;
        opacity: 0;
    }

    100% {
        left: -250px;
        opacity: 0;
    }
}

/* Early Switch (Request: Sooner -> ~12%) */
@keyframes fadeOutEarly {
    0% {
        opacity: 1;
    }

    12% {
        opacity: 1;
    }

    /* Hold */
    14% {
        opacity: 0;
    }

    /* Snap */
    100% {
        opacity: 0;
    }
}

@keyframes fadeInEarly {
    0% {
        opacity: 0;
    }

    12% {
        opacity: 0;
    }

    /* Hold */
    14% {
        opacity: 1;
    }

    /* Snap */
    100% {
        opacity: 1;
    }
}

/* Late Switch (Response: Later -> ~80%) */
@keyframes fadeOutLate {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    /* Hold */
    82% {
        opacity: 0;
    }

    /* Snap */
    100% {
        opacity: 0;
    }
}

@keyframes fadeInLate {
    0% {
        opacity: 0;
    }

    80% {
        opacity: 0;
    }

    /* Hold */
    82% {
        opacity: 1;
    }

    /* Snap */
    100% {
        opacity: 1;
    }
}

/* Arrow Gradients */
.outgoing .arrow-line {
    background: linear-gradient(to right, #cbd5e1 50%, #6366f1 100%);
}

.outgoing .arrow-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #6366f1;
}

.incoming .arrow-line {
    background: linear-gradient(to left, #cbd5e1 50%, #16a34a 100%);
}

.incoming .arrow-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #16a34a;
}

/* 2b. ENTERPRISE BOX FLOW ANIMATION */
.enterprise-flow .packet-mover.outgoing {
    animation: moveRightBox 10s linear infinite;
}

.enterprise-flow .packet-mover.incoming {
    animation: moveLeftBox 10s linear infinite;
}

.enterprise-flow .packet-mover.outgoing .state-1 {
    /* john@doe */
    animation: fadeOutBox 10s linear infinite;
}

.enterprise-flow .packet-mover.outgoing .state-2 {
    /* Token */
    animation: fadeInBox 10s linear infinite;
}

.enterprise-flow .packet-mover.incoming .state-1 {
    /* Token */
    animation: fadeOutBoxIn 10s linear infinite;
}

.enterprise-flow .packet-mover.incoming .state-2 {
    /* john@doe */
    animation: fadeInBoxIn 10s linear infinite;
}

/* Path: Emp(-550) -> Box(-140) -> AI(100%) */
@keyframes moveRightBox {
    0% {
        left: -550px;
        opacity: 1;
    }

    5% {
        left: -550px;
        opacity: 1;
    }

    /* Pause at Emp */
    38% {
        opacity: 1;
    }

    40% {
        left: 100%;
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes moveLeftBox {
    0% {
        left: 100%;
        opacity: 0;
    }

    50% {
        left: 100%;
        opacity: 0;
    }

    52% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    90% {
        left: -550px;
        opacity: 0;
    }

    100% {
        left: -550px;
        opacity: 0;
    }
}

/* Switch at Box Left Entry (-250px). Dist from -450 is 200. Total 650. Ratio 30%.
   Time = 5% + (0.30 * 35%) = 5% + 10.5% = ~15.5% (Round to 15%).
*/
@keyframes fadeOutBox {
    0% {
        opacity: 1;
    }

    15% {
        opacity: 1;
    }

    17% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeInBox {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 0;
    }

    17% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

/* Incoming Switch at Box Left Entry (-250px). Dist from 100%(200) to -250 is 450. Total 650. Ratio 69%.
   Time = 50% + (0.69 * 40%) = 50% + 27.6% = ~78%.
*/
@keyframes fadeOutBoxIn {

    /* Token Fades Out */
    0% {
        opacity: 1;
    }

    78% {
        opacity: 1;
    }

    80% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeInBoxIn {

    /* john@doe Fades In */
    0% {
        opacity: 0;
    }

    78% {
        opacity: 0;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

/* Diagram Mobile Responsive */
@media (max-width: 900px) {
    .architecture-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .traffic-flow {
        transform: rotate(90deg);
        margin: 40px 0;
        width: 140px;
        gap: 50px;
    }

    .flow-icon {
        transform: translate(-50%, -50%) rotate(-90deg);
    }

    .flow-label {
        display: none;
    }

    .arch-simple-arrow {
        transform: rotate(90deg);
    }
}


/* --- ENTERPRISE SECTION --- */
.enterprise-section {
    background-color: #f8fafc;
    padding: 80px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tag-premise {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}

.arch-node.server {
    background: var(--dark-blue);
    color: white;
    border-color: #0f172a;
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2);
    width: 240px;
}

.arch-node.server p {
    color: #cbd5e1;
}

.arch-node.server h4 {
    color: white;
}

.server-details {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #334155;
    padding-top: 5px;
}

.safe-text {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 5px;
}

/* Simple Arrow for Enterprise (Employee -> Server) */
.arch-simple-arrow {
    font-size: 2rem;
    color: #cbd5e1;
    margin: 0 20px;
}

/* Enterprise Features Grid */
.feature-grid-ent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.ent-feature h4 {
    color: #1e293b;
    margin-bottom: 8px;
}

.ent-feature p {
    font-size: 0.95rem;
    color: #475569;
}

.enterprise-cta {
    text-align: center;
    margin-top: 50px;
}

.price-start {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
}


/* --- PRICING SECTION --- */
.pricing-section {
    padding: 80px 0 120px;
    text-align: center;
}

.pricing-grid {
    display: grid;
    /* CHANGED: 4 columns to fit Free plan */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
    text-align: left;
    align-items: stretch;
}

.plan-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 24px;
    /* Slightly reduced padding to fit 4 cols */
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.plan-card.premium {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.1);
    z-index: 2;
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.plan-card h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #0f172a;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 15px 0 5px;
    line-height: 1;
}

.period {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

.feature-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    flex-grow: 1;
    text-align: left;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
}

.check {
    color: var(--success);
    font-weight: bold;
    margin-top: 2px;
}

/* Responsive Grid for 4 Columns */
@media (max-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan-card.premium {
        transform: none;
    }
}

@media (max-width: 1100px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: white;
}

footer a {
    color: var(--primary);
    font-weight: 500;
    margin: 0 10px;
}

/* Footer Social Icons */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #94a3b8;
    transition: fill 0.2s ease;
}

.social-icon:hover {
    fill: #4338ca;
    /* Your primary color */
}

/* Language Selector */
.lang-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.footer-links {
    margin-top: 10px;
    margin-bottom: 0;
}

.footer-copyright {
    margin-bottom: 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Cookie Banner */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(2px);
}

.cookie-banner {
    position: fixed;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90%;
    max-width: 600px;
    background-color: #ffffff;
    color: #1e293b;
    padding: 20px 25px;
    border-radius: 12px;
    display: none;
    /* Controlled by JS */
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.5s ease;
    border: 1px solid #e2e8f0;
    /* New Layout Styles */
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.cookie-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    width: 100%;
}

.cookie-banner.visible {
    display: flex;
    /* Override display: none when visible class added (via JS logic that sets display:flex inline, but here we support class too) */
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cookie-overlay.visible {
    opacity: 1;
}

.cookie-banner button {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner {
        width: 100%;
        max-width: 100%;
        bottom: 0;
        left: 0;
        transform: translateY(20px);
        border-radius: 0;
        padding: 12px 16px;
        font-size: 0.85rem;
        gap: 10px;
    }

    .cookie-banner.visible {
        transform: translateY(0);
    }

    .cookie-text {
        gap: 10px;
    }

    .cookie-text span:first-child {
        font-size: 1.2rem !important;
    }

    .cookie-buttons {
        justify-content: flex-end;
    }
}

/* --- PRICING CAROUSEL --- */
.pricing-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    /* Space for buttons */
}

.pricing-viewport {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    /* Space for shadow/transform */
}

.pricing-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    width: max-content;
    margin: 0;
}

.pricing-track .plan-card {
    width: 300px;
    /* Default/Mobile width. Desktop overrides via JS. */
    flex-shrink: 0;
    /* Reset transform from premium hover for carousel stability or handle carefully */
}



.carousel-btn {
    background: white;
    border: 1px solid #cbd5e1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-btn:hover {
    background: #f8fafc;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

@media (max-width: 768px) {
    .pricing-carousel-wrapper {
        padding: 0;
        display: block;
        /* Fix flexbox sizing issue preventing scroll */
    }

    .carousel-btn {
        display: none;
    }

    .pricing-viewport {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 20px;
        /* Space for scrollbar if visible */

        /* Snap Logic */
        scroll-snap-type: x mandatory;
    }

    .pricing-track {
        width: max-content;
        padding: 0 20px;
        transform: none !important;
        /* Ensure JS doesn't override */
        display: flex;
        gap: 20px;
    }

    .pricing-track .plan-card {
        scroll-snap-align: center;
        /* scroll-snap-stop: always;  <-- Removed for smoother swipe */
        margin: 0;
        /* Ensure no extra margin interferes */
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e293b;
}

.modal-content p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-content button {
    width: 100%;
}

/* Painting Mode Icons */
#toolMask:hover,
#toolUnmask:hover,
#copyBtn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

#toolMask.active,
#toolUnmask.active {
    background-color: #cbd5e1 !important;
    border-color: #64748b !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Painter Badge (SVG Brush) */
#toolMask.active::after,
#toolUnmask.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f172a' stroke='none'%3E%3Cpath d='M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34a.996.996 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96a.996.996 0 0 0 0-1.41z'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}