/* ============================================
   MAILPY LANDING PAGE - STYLES
   ============================================ */

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);

    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Effects */
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-nav {
    padding: 10px 24px !important;
    background: var(--accent-gradient) !important;
    border-radius: 8px !important;
    color: white !important;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

.btn-huge {
    padding: 24px 48px;
    font-size: 20px;
    border-radius: 16px;
}

.btn-full {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* App Preview Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-preview {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.app-header {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.app-dots {
    display: flex;
    gap: 8px;
}

.app-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.app-dots span:nth-child(1) {
    background: #ff5f56;
}

.app-dots span:nth-child(2) {
    background: #ffbd2e;
}

.app-dots span:nth-child(3) {
    background: #27c93f;
}

.app-title {
    font-size: 12px;
    color: var(--text-muted);
}

.app-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    min-height: 300px;
}

.app-sidebar {
    background: var(--bg-secondary);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-item {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 8px;
}

.sidebar-item.active {
    background: var(--accent-gradient);
}

.app-content {
    padding: 20px;
}

.content-card {
    height: 120px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.content-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-stat {
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: var(--section-padding) 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--glass-border);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */

.how-it-works {
    padding: var(--section-padding) 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    text-align: center;
    padding: 40px;
    max-width: 300px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 15px;
}

.step-connector {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.5;
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing {
    padding: var(--section-padding) 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
}

.pricing-card.featured {
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.08);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.plan-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-duration {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
    flex-grow: 1;
}

.plan-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
    border-bottom: none;
}

.btn-buy {
    margin-top: auto;
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download {
    padding: var(--section-padding) 24px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.download p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.download-note {
    margin-top: 16px !important;
    font-size: 14px !important;
    color: var(--text-muted) !important;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 32px 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.copyright {
    font-size: 14px;
    color: var(--text-muted);
}

.admin-trigger {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    opacity: 0.5;
}

.admin-trigger:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    min-height: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
    }

    .step-connector {
        width: 2px;
        height: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-right {
        flex-direction: column;
    }
}

/* ============================================
   CODE BLOCKS & USAGE GUIDE
   ============================================ */

.usage-guide {
    padding: var(--section-padding) 24px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    /* Clean background */
}

/* Custom Scrollbar for the whole page */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333340;
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a5a;
}

.cmd-container {
    max-width: 800px;
    margin: 0 auto 40px;
    background: rgba(26, 26, 36, 0.6);
    /* Glass-like opacity */
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cmd-step {
    margin-bottom: 40px;
    position: relative;
    padding-left: 20px;
    /* Indent slightly */
    border-left: 2px solid rgba(99, 102, 241, 0.1);
}

.cmd-step:last-child {
    margin-bottom: 0;
    border-left: none;
}

.cmd-step h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    left: -35px;
    /* Pull header back to align badge */
}

.step-badge {
    background: var(--accent-gradient);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.cmd-step p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
}

.code-block {
    position: relative;
    background: #0a0a0e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 80px 20px 24px;
    /* Right padding space for button */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #a5b3ce;
    overflow-x: auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar for Code Block */
.code-block::-webkit-scrollbar {
    height: 6px;
    /* Thin scrollbar */
}

.code-block::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
}

.code-block::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.code-block code {
    white-space: pre;
    /* Keep single line for easy copying */
    display: block;
}

.btn-copy {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.btn-copy:hover {
    background: rgba(99, 102, 241, 0.15);
    color: white;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.btn-copy:active {
    transform: translateY(-50%) scale(0.95);
}