/* ============================
   MyUI Design System v1.0
   Enterprise-grade CSS framework
   ============================ */

/* --- CSS Custom Properties --- */
:root {
    /* Brand Colors */
    --my-primary: #4F6EF7;
    --my-primary-light: #7B93FA;
    --my-primary-dark: #3A52CC;
    --my-primary-surface: rgba(79, 110, 247, 0.08);
    --my-primary-surface-hover: rgba(79, 110, 247, 0.14);

    --my-accent: #00D1B2;
    --my-accent-light: #33E0C7;
    --my-accent-dark: #00A88E;

    --my-error: #F44336;
    --my-warning: #FF9800;
    --my-success: #4CAF50;

    /* Surfaces */
    --my-bg: #0B0F1A;
    --my-bg-secondary: #111827;
    --my-surface: #1A2035;
    --my-surface-2: #1F2A42;
    --my-surface-3: #263150;
    --my-surface-border: rgba(255, 255, 255, 0.06);

    /* Text */
    --my-text: #F0F2F8;
    --my-text-secondary: #8B95B0;
    --my-text-muted: #5A6480;
    --my-text-on-primary: #FFFFFF;

    /* Effects */
    --my-glow: 0 0 40px rgba(79, 110, 247, 0.15);
    --my-glow-accent: 0 0 40px rgba(0, 209, 178, 0.12);
    --my-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --my-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --my-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --my-shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);

    /* Radius */
    --my-radius-xs: 6px;
    --my-radius-sm: 10px;
    --my-radius-md: 16px;
    --my-radius-lg: 24px;
    --my-radius-xl: 32px;
    --my-radius-full: 999px;

    /* Typography */
    --my-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --my-font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;

    /* Layout */
    --my-max-width: 1200px;
    --my-nav-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--my-primary-light);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--my-accent);
}

img { max-width: 100%; height: auto; }

::selection {
    background: var(--my-primary);
    color: white;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--my-text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
    color: var(--my-text-secondary);
    line-height: 1.75;
    font-size: 1rem;
}

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

.text-center { text-align: center; }
.text-muted { color: var(--my-text-muted); }

/* --- Layout --- */
.my-container {
    max-width: var(--my-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.my-section {
    padding: 100px 0;
    position: relative;
}

.my-section + .my-section {
    border-top: 1px solid var(--my-surface-border);
}

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

@media (max-width: 768px) {
    .my-grid-2,
    .my-grid-3,
    .my-grid-4 {
        grid-template-columns: 1fr;
    }
    .my-section { padding: 64px 0; }
}

/* --- Navbar --- */
.my-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--my-nav-height);
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
    background: transparent;
}
.my-nav.scrolled {
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--my-surface-border);
}

.my-nav-inner {
    max-width: var(--my-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.my-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--my-text);
    letter-spacing: -0.02em;
}

.my-nav-brand svg {
    color: var(--my-primary);
}

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

.my-nav-links a {
    color: var(--my-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.my-nav-links a:hover,
.my-nav-links a.active {
    color: var(--my-text);
}
.my-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--my-primary);
    border-radius: 1px;
    transition: width 0.3s;
}
.my-nav-links a:hover::after,
.my-nav-links a.active::after {
    width: 100%;
}

.my-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* --- Buttons --- */
.my-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--my-radius-full);
    font-family: var(--my-font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.my-btn-primary {
    background: linear-gradient(135deg, var(--my-primary), var(--my-primary-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(79, 110, 247, 0.3);
}
.my-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 110, 247, 0.45);
    color: white;
}

.my-btn-outline {
    background: transparent;
    color: var(--my-text);
    border: 1.5px solid var(--my-surface-border);
}
.my-btn-outline:hover {
    background: var(--my-primary-surface);
    border-color: var(--my-primary);
    color: var(--my-primary-light);
}

.my-btn-ghost {
    background: transparent;
    color: var(--my-text-secondary);
    padding: 10px 20px;
}
.my-btn-ghost:hover {
    color: var(--my-text);
    background: var(--my-primary-surface);
}

.my-btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.my-btn-sm {
    padding: 8px 20px;
    font-size: 0.82rem;
}

/* --- Cards --- */
.my-card {
    background: var(--my-surface);
    border: 1px solid var(--my-surface-border);
    border-radius: var(--my-radius-md);
    padding: 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.my-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--my-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.my-card:hover {
    border-color: rgba(79, 110, 247, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--my-glow);
}
.my-card:hover::before {
    opacity: 1;
}

.my-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--my-radius-sm);
    background: var(--my-primary-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--my-primary-light);
}

.my-card h3 {
    margin-bottom: 12px;
}

.my-card p {
    font-size: 0.92rem;
}

/* --- Hero --- */
.my-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--my-nav-height);
}

.my-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.my-hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 110, 247, 0.12), transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.my-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 209, 178, 0.08), transparent 60%);
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.my-hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.my-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--my-primary-surface);
    border: 1px solid rgba(79, 110, 247, 0.2);
    border-radius: var(--my-radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--my-primary-light);
    margin-bottom: 24px;
}

.my-hero h1 {
    margin-bottom: 24px;
}

.my-hero p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    max-width: 540px;
}

.my-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Feature Grid --- */
.my-feature-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.my-feature-header p {
    margin-top: 16px;
}

/* --- Stats --- */
.my-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 48px 0;
}

.my-stat {
    text-align: center;
}
.my-stat .num {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}
.my-stat .label {
    font-size: 0.85rem;
    color: var(--my-text-muted);
    font-weight: 500;
}

/* --- Code Block --- */
.my-code {
    background: var(--my-surface-2);
    border: 1px solid var(--my-surface-border);
    border-radius: var(--my-radius-sm);
    padding: 24px;
    font-family: var(--my-font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--my-text-secondary);
    overflow-x: auto;
    position: relative;
}

.my-code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.my-code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.my-code .keyword { color: #C792EA; }
.my-code .string { color: #C3E88D; }
.my-code .tag { color: #F07178; }
.my-code .attr { color: #FFCB6B; }
.my-code .comment { color: #546E7A; }
.my-code .fn { color: #82AAFF; }

/* --- Footer --- */
.my-footer {
    border-top: 1px solid var(--my-surface-border);
    padding: 64px 0 32px;
    background: var(--my-bg-secondary);
}

.my-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.my-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--my-text);
    margin-bottom: 16px;
}

.my-footer h4 {
    color: var(--my-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.my-footer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-footer ul a {
    color: var(--my-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.my-footer ul a:hover {
    color: var(--my-text);
}

.my-footer-bottom {
    border-top: 1px solid var(--my-surface-border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--my-text-muted);
}

@media (max-width: 768px) {
    .my-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .my-footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* --- Legal Pages --- */
.my-legal {
    padding-top: calc(var(--my-nav-height) + 60px);
    padding-bottom: 80px;
}

.my-legal-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--my-surface-border);
}

.my-legal-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.my-legal-header .date {
    color: var(--my-text-muted);
    font-size: 0.88rem;
}

.my-legal-content {
    max-width: 800px;
}

.my-legal-content h2 {
    font-size: 1.3rem;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--my-surface-border);
}

.my-legal-content h3 {
    font-size: 1.05rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.my-legal-content p {
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.my-legal-content ul,
.my-legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--my-text-secondary);
}

.my-legal-content li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.my-legal-content strong {
    color: var(--my-text);
    font-weight: 600;
}

.my-legal-content a {
    color: var(--my-primary-light);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.my-legal-content a:hover {
    border-bottom-color: var(--my-primary-light);
}

/* --- Pricing Section --- */
.my-pricing-card {
    background: var(--my-surface);
    border: 1px solid var(--my-surface-border);
    border-radius: var(--my-radius-md);
    padding: 36px 32px;
    text-align: center;
    transition: all 0.3s;
}
.my-pricing-card.featured {
    border-color: var(--my-primary);
    box-shadow: var(--my-glow);
    transform: scale(1.03);
}
.my-pricing-card:hover {
    transform: translateY(-4px);
}
.my-pricing-card.featured:hover {
    transform: translateY(-4px) scale(1.03);
}

.my-pricing-card .plan-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--my-text-muted);
    margin-bottom: 8px;
}
.my-pricing-card .price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--my-text);
    line-height: 1;
    margin-bottom: 4px;
}
.my-pricing-card .period {
    font-size: 0.82rem;
    color: var(--my-text-muted);
    margin-bottom: 28px;
}
.my-pricing-card .features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
}
.my-pricing-card .features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--my-surface-border);
    font-size: 0.9rem;
    color: var(--my-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.my-pricing-card .features li::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--my-primary-surface);
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234F6EF7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.7s ease-out both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- Misc --- */
.my-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--my-primary), var(--my-accent));
    border-radius: 2px;
    margin: 16px auto 0;
}

.my-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--my-radius-full);
    background: var(--my-primary-surface);
    color: var(--my-primary-light);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--my-bg); }
::-webkit-scrollbar-thumb { background: var(--my-surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--my-primary); }
