/* 
   ANTIGRAVITY DESIGN SYSTEM 
   Premium Dark/Neon Theme
   Vanilla CSS - No Build Step Required
*/

:root {
    /* Color Palette */
    --color-bg: #030014;
    --color-text: #ffffff;
    --color-text-muted: #94a3b8;

    --color-neon-blue: #00f3ff;
    --color-neon-purple: #bc13fe;
    --color-neon-pink: #ff00ea;

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

    /* Typography */
    --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    outline: none;
    /* Globally remove default outlines */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
.bg-antigravity {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    /* Animated Gradient Background - Premium & Rich */
    background:
        radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #05011a 0%, #1e0b36 50%, #05011a 100%);
    background-size: 400% 400%;
    animation: luxuriousShift 15s ease-in-out infinite alternate;
    will-change: background-position, background-size;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: floatOrb 25s ease-in-out infinite;
    mix-blend-mode: screen;
}

.orb-1 {
    top: -20%;
    left: 20%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(188, 19, 254, 0.25) 0%, transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -20%;
    right: 10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 80%);
    animation-delay: -12s;
    animation-direction: reverse;
}

/* Canvas Overlay */
#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    mix-blend-mode: screen;
}

/* Layout */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Navigation */
.nav-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.brand-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-neon-blue);
}

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

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-btn {
    color: var(--color-text);
    font-weight: 500;
}

/* Typography Helpers */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 24px;

    /* Cross-browser Gradient Text */
    background-image: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    /* Safari/Chrome */
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* Safari/Chrome */

    /* Remove any border/outline */
    border: none;
    outline: none;

    /* Fallback for very old browsers */
    @supports not (background-clip: text) {
        color: white;
        background: none;
    }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--color-text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
    font-weight: 300;
}

/* Components */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-glass-border);
    border-radius: 100px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-neon-blue);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-neon-blue);
    animation: pulse 2s infinite;
}

/* Premium Buttons */
.btn-group {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 32px;
    border-radius: 12px;
    /* More modern than 100px pill */
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    /* Premium Glass/Neon Button */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0px var(--color-neon-blue);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover {
    border-color: var(--color-neon-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

/* Feature Cards (Glassmorphism) */
.features-grid {
    display: grid;
    /* Force 3 columns on larger screens */
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    /* Wider gap for cleaner look */
    margin-top: 80px;
}

.feature-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--color-glass-border);
    padding: 40px 32px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: white;
}

.feature-desc {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    margin-top: 120px;
    padding: 80px 0;
    border-top: 1px solid var(--color-glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes luxuriousShift {
    0% {
        background-position: 0% 50%;
        opacity: 0.8;
    }

    50% {
        background-position: 100% 50%;
        opacity: 1;
    }

    100% {
        background-position: 0% 50%;
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-entry {
    animation: fadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .hero-title {
        font-size: 3.5rem;
    }

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

    .container {
        padding: 0 20px;
    }
}

/* Premium Editor Styles */
.editor-panel {
    background: rgba(13, 17, 23, 0.6);
    /* Github Dark Dimmed-ish */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.editor-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.input-panel:focus-within {
    border-color: var(--color-neon-blue);
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.1);
}

.editor-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.title-text {
    font-family: var(--font-body);
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.blue-pulse {
    background: var(--color-neon-blue);
    box-shadow: 0 0 8px var(--color-neon-blue);
}

.purple-pulse {
    background: var(--color-neon-purple);
    box-shadow: 0 0 8px var(--color-neon-purple);
}

.editor-tools {
    display: flex;
    gap: 6px;
}

.tool-btn {
    background: transparent;
    border: none;
    color: #6e7681;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.editor-body {
    flex-grow: 1;
    display: flex;
    position: relative;
    padding: 16px 0;
}

.line-numbers {
    width: 40px;
    text-align: right;
    padding-right: 12px;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 12px;
}

.premium-textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: #e6edf3;
    font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-right: 16px;
    min-height: 200px;
}

.premium-textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.output-content {
    flex-grow: 1;
    padding-right: 16px;
    color: var(--color-text-muted);
    font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.placeholder-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    opacity: 0.5;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Refiner Page Specifics */
.refiner-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    gap: 0;
}

.action-bar {
    width: 100%;
    margin: 24px 0;
    display: flex;
}

.action-bar .btn {
    width: 100%;
    height: 56px;
    font-size: 1.1rem;
    justify-content: center;
}