/* ============================================
   MaxtivityTech.com — Design System
   Tech & Productivity Theme (Indigo & Purple)
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* --- Theme Variables --- */
:root {
    --color-bg: #EEF2FF;
    --color-bg-darker: #E0E7FF;
    --color-bg-card: rgba(255, 255, 255, 0.75);
    --color-bg-card-solid: #FFFFFF;

    --color-primary: #4F46E5;
    /* Indigo */
    --color-primary-light: #6366F1;
    --color-primary-dark: #3730A3;

    --color-accent: #8B5CF6;
    /* Purple */
    --color-accent-light: #A78BFA;
    --color-accent-dark: #6D28D9;

    --color-cyan: #06B6D4;
    --color-success: #10B981;
    --color-success-light: #34D399;
    --color-danger: #EF4444;

    --color-text: #1E293B;
    --color-text-light: #64748B;
    --color-text-muted: #94A3B8;

    --color-border: rgba(79, 70, 229, 0.15);
    --color-footer-bg: #0F172A;
    /* Slate 900 for tech feel */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    /* specifically for code/password/json */

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 8px rgba(79, 70, 229, 0.08);
    --shadow-md: 0 8px 24px rgba(79, 70, 229, 0.12);
    --shadow-lg: 0 16px 48px rgba(79, 70, 229, 0.15);

    --max-width: 1200px;
    --sidebar-width: 300px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    align-items: start;
}

.main-content {
    min-width: 0;
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 120px 0 100px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 30%, #0F172A 60%, #1e1b4b 100%);
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    animation: glowPulse 6s ease-in-out infinite alternate;
    pointer-events: none;
    /* Add tech grid baseline */
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

@keyframes glowPulse {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--color-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent-light);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero h1 span {
    background: linear-gradient(135deg, #A78BFA, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.hero-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: white;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.hero-nav a:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--color-accent-light);
    transform: translateY(-2px);
}

.hero-nav .icon {
    font-size: 1.1rem;
}

/* --- Section Header --- */
.tool-section {
    margin-bottom: 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-tag {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 100px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 0 auto;
}

/* --- Tool Card --- */
.calc-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.calc-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.25);
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--color-text);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    pointer-events: none;
}

.input-row {
    display: flex;
    gap: 16px;
}

.input-row .form-group {
    flex: 1;
}

input[type="number"],
input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

/* Tech monospace inputs */
.input-mono {
    font-family: var(--font-mono) !important;
    font-size: 1.1rem;
    color: var(--color-primary-dark);
    letter-spacing: 0.05em;
    background: #F8FAFC !important;
}

textarea.input-mono {
    min-height: 250px;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    font-size: 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%234F46E5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* --- Tech Buttons --- */
.btn-calculate {
    display: block;
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-calculate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.btn-calculate:hover::before {
    opacity: 1;
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-group .btn-secondary {
    flex: 1;
}

/* --- Switches for Settings (Tech Style) --- */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.switch-label:hover {
    background: white;
    border-color: var(--color-primary-light);
}

.switch-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.slider-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #cbd5e1;
    border-radius: 20px;
    margin-right: 12px;
    transition: .3s;
}

.slider-switch:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked+.slider-switch {
    background-color: var(--color-primary);
}

input:checked+.slider-switch:before {
    transform: translateX(20px);
}

/* --- Result Area & Displays --- */
.result-panel {
    margin-top: 28px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: var(--radius-md);
    text-align: center;
    display: none;
    animation: resultSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.result-panel.visible {
    display: block;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy Display box specifically for Password / Tools */
.display-box {
    position: relative;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 20px;
    padding-right: 60px;
    margin-bottom: 24px;
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--color-text);
    text-align: left;
    transition: border-color 0.3s ease;
}

.display-box.highlight {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.05);
}

.btn-copy-abs {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.2s;
    font-size: 1.2rem;
}

.btn-copy-abs:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Status Bars (e.g., Password Strength) */
.strength-meter {
    display: flex;
    gap: 4px;
    height: 8px;
    margin-top: 12px;
}

.strength-bar {
    flex: 1;
    background: #e2e8f0;
    border-radius: 4px;
    transition: background 0.3s;
}

.strength-text {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 8px;
    text-align: left;
    color: var(--color-text-muted);
}

.strength-1 {
    background: var(--color-danger);
}

.strength-2 {
    background: #F59E0B;
}

.strength-3 {
    background: #3B82F6;
}

.strength-4 {
    background: var(--color-success);
}


/* --- JSON/Converter Layout --- */
.dual-pane {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dual-pane {
        grid-template-columns: 1fr;
    }
}

/* Range Slider */
.range-container {
    padding: 8px 0;
    margin-bottom: 24px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.range-amount {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 1.1rem;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 100px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}


/* --- Ad Slots --- */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(224, 231, 255, 0.5);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
}

.ad-slot-leaderboard {
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 20px;
    min-height: 90px;
}

.ad-slot-sidebar {
    min-height: 250px;
    padding: 20px;
    margin-bottom: 24px;
}

.ad-slot-incontent {
    margin: 40px 0;
    padding: 20px;
    min-height: 100px;
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 {
    transition-delay: 0.1s;
}

.fade-in-delay-2 {
    transition-delay: 0.2s;
}

/* Sticky wrapper */
.sidebar {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}


/* --- Footer --- */
.site-footer {
    background: var(--color-footer-bg);
    color: rgba(255, 255, 255, 0.65);
    padding: 60px 0 32px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    max-width: 320px;
}

.footer-links h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-accent-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-disclaimer {
    margin-top: 12px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Subpages --- */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.nav-logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.hero-mini {
    padding: 60px 0 50px;
    text-align: center;
    background: linear-gradient(135deg, #4F46E5 0%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}

.hero-mini::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--color-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-mini h1 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    position: relative;
    z-index: 1;
}

.hero-mini p {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.content-card {
    background: var(--color-bg-card-solid);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    margin: 40px auto;
    max-width: 800px;
    box-shadow: var(--shadow-md);
}

.content-card h2 {
    margin: 32px 0 16px;
    color: var(--color-primary-dark);
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    margin: 24px 0 12px;
}

.content-card p,
.content-card li {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-card ul {
    padding-left: 24px;
}

.last-updated {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--color-primary);
    margin-bottom: 24px;
    font-weight: 600;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.feature-card {
    padding: 28px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(79, 70, 229, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Contact Specific */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.contact-info-card,
.contact-form {
    padding: 28px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.legal-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

.btn-cta {
    display: inline-flex;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-weight: 700;
    border-radius: 100px;
    transition: transform 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    color: white;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {

    .feature-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-nav {
        flex-direction: column;
        align-items: center;
    }

    .hero-nav a {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .calc-card,
    .content-card {
        padding: 24px;
    }
}