/* ─── Fatrocu CLI v3.1 — Styles.css — Minimalist Scribble Art Theme ─────────── */

/* ─── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --bg-primary: #f8f7f2;        /* Warm paper white */
    --bg-secondary: #e8e6e1;      /* Soft off-white */
    --bg-card: #ffffff;            /* Pure white card */
    --bg-card-hover: #fafafa;
    --bg-accent: #e3e2dc;         /* Sketch paper */

    --text-primary: #2a2a2a;      /* Nearly black */
    --text-secondary: #5a5a5a;    /* Dark gray */
    --text-muted: #8a8a8a;        /* Medium gray */
    --text-accent: #3b3b3b;       /* Dark charcoal */

    --border-default: #d4d4d4;    /* Subtle border */
    --border-strong: #a8a8a8;     /* Darker border */
    --border-dashed: #a0a0a0 2px dashed;   /* Hand-drawn style border */

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-sans: 'Inter', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Scribble-specific */
    --scribble-width: 2px;
    --scribble-opacity: 0.15;
    --scribble-stroke: #3b3b3b;
    --scribble-thin: #8a8a8a;
    --scribble-thinner: #b8b8b8;
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 15px;
    letter-spacing: -0.02em;
}

/* ─── Scribble Background ──────────────────────────────────────────────────── */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scribble grid background - hand-drawn grid lines */
.bg-scribble-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(104, 104, 104, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 104, 104, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: -2px -2px;
    pointer-events: none;
    z-index: -2;
}

/* Scribble doodle overlay - random hand-drawn squiggles */
.bg-scribble-doodles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bg-scribble-doodles::before,
.bg-scribble-doodles::after {
    content: '';
    position: absolute;
    background: linear-gradient(45deg,
        transparent 40%,
        rgba(59, 59, 59, 0.04) 50%,
        transparent 60%
    );
    background-size: 200% 200%;
    background-position: 0 0;
    animation: scribble-drift 12s ease-in-out infinite;
    border-radius: 200px;
}

.bg-scribble-doodles::before {
    top: -20%;
    left: -10%;
    width: 120%;
    height: 120%;
    transform: rotate(15deg);
}

.bg-scribble-doodles::after {
    top: -15%;
    right: -15%;
    width: 130%;
    height: 130%;
    transform: rotate(-10deg);
}

@keyframes scribble-drift {
    0% { background-position: 0 0; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0 0; }
}

/* Subtle paper texture overlay */
.bg-paper-texture {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.3) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.25) 0%, transparent 35%);
    pointer-events: none;
    z-index: -1;
}

/* ─── Particles (scribble dots) ────────────────────────────────────────────── */
.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--scribble-stroke);
    opacity: 0.08;
    animation: scribble-float 8s ease-in-out infinite;
}

@keyframes scribble-float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.08; }
    25% { transform: translateY(-30px) translateX(15px) scale(0.7); opacity: 0.12; }
    50% { transform: translateY(-50px) translateX(-10px) scale(0.5); opacity: 0.06; }
    75% { transform: translateY(-35px) translateX(8px) scale(0.6); opacity: 0.1; }
}

/* ─── Section ───────────────────────────────────────────────────────────────── */
.section {
    padding: 120px 24px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 56px;
    height: 2px;
    background: var(--scribble-stroke);
    border-radius: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 32px;
    height: 2px;
    background: var(--scribble-thin);
    border-radius: 1px;
    border: 1px dashed var(--scribble-thin);
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
    padding: 120px 24px 80px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

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

.logo-glow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    border: 2px solid var(--border-default);
    border-style: dashed;
}

.logo-glow svg {
    width: 64px;
    height: 64px;
    z-index: 1;
}

.logo-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid var(--scribble-thin);
    border-radius: 50%;
    border-style: dashed;
    border-width: 1px;
    z-index: 0;
    animation: scribble-spin 20s linear infinite;
}

@keyframes scribble-spin {
    0% { transform: rotate(0deg) scaleX(1); }
    50% { transform: rotate(180deg) scaleX(0.95); }
    100% { transform: rotate(360deg) scaleX(1); }
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0;
    position: relative;
}

.logo-text h1::after {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 4px;
    width: calc(100% + 16px);
    height: 2px;
    background: var(--scribble-stroke);
    border-radius: 1px;
}

.logo-text .tagline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 6px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--border-default);
    border-style: dashed;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    background: transparent;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-md);
}

.btn:hover::before {
    opacity: 0.08;
}

.btn:hover {
    border-color: var(--text-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--text-primary);
    color: #ffffff;
    border-style: solid;
}

.btn-primary:hover {
    background: var(--text-accent);
    border-color: var(--text-accent);
}

.btn-secondary {
    background: transparent;
    border-style: dashed;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(59, 59, 59, 0.06);
    border-color: var(--scribble-stroke);
}

/* ─── Features ──────────────────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-style: dashed;
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 30%, rgba(59, 59, 59, 0.04) 50%, transparent 70%);
    background-size: 200% 200%;
    border-radius: var(--radius-lg);
    animation: scribble-fade 8s ease-in-out infinite;
}

@keyframes scribble-fade {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.card:hover {
    border-color: var(--scribble-stroke);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card {
    text-align: center;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ─── Installation ─────────────────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    border-style: dashed;
}

.step-card:hover {
    border-color: var(--scribble-stroke);
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-accent);
    border: 2px dashed var(--scribble-thin);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-accent);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.step-card ul {
    list-style: none;
    padding: 0;
}

.step-card li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px dashed var(--border-default);
}

.step-card li:last-child {
    border-bottom: none;
}

/* ─── Code Blocks ───────────────────────────────────────────────────────────── */
.code-block {
    background: var(--bg-secondary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    border-style: dashed;
    position: relative;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 2px dashed var(--border-default);
    border-bottom-style: dashed;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.code-header span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.close-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    border: 1px dashed var(--border-default);
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(59, 59, 59, 0.06);
    color: var(--text-accent);
}

.code-content {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
}

.line {
    padding: 2px 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.line .keyword {
    color: #d94e4e;
}

.line .cmd {
    color: var(--text-primary);
}

/* ─── Commands Table ───────────────────────────────────────────────────────── */
.commands-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.commands-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 2px dashed var(--border-default);
}

.commands-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px dashed var(--border-default);
    font-size: 0.9rem;
}

.commands-table tbody tr:last-child td {
    border-bottom: none;
}

.commands-table tbody tr:hover td {
    background: rgba(59, 59, 59, 0.03);
}

.commands-table code {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-accent);
    border: 1px dashed var(--border-default);
    border-style: dashed;
}

/* ─── API ───────────────────────────────────────────────────────────────────── */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.api-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition-base);
    border-style: dashed;
    position: relative;
    overflow: hidden;
}

.api-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--scribble-stroke);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.api-card:hover::before {
    opacity: 1;
}

.api-card:hover {
    border-color: var(--scribble-stroke);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.api-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-accent);
}

.api-card pre {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 16px;
    border: 2px dashed var(--border-default);
    border-style: dashed;
}

.api-card .api-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ─── Environment Variables ────────────────────────────────────────────────── */
.env-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.env-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition-base);
    border-style: dashed;
    position: relative;
}

.env-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 4px;
    height: 24px;
    background: var(--scribble-stroke);
    border-radius: 2px;
    animation: scribble-bounce 2s ease-in-out infinite;
}

@keyframes scribble-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

.env-card:hover {
    border-color: var(--scribble-stroke);
    transform: translateY(-3px);
}

.env-card code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-accent);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--border-default);
    border-bottom-style: dashed;
}

.env-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ─── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-card {
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    border-style: dashed;
}

.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--scribble-stroke);
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.faq-card:hover::before {
    transform: scaleX(1);
}

.faq-card:hover {
    border-color: var(--scribble-stroke);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.faq-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.faq-card .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    border: 1px dashed var(--scribble-thin);
}

.badge-new { background: rgba(59, 59, 59, 0.04); color: var(--text-accent); }
.badge-pro { background: rgba(59, 59, 59, 0.06); color: var(--text-accent); }
.badge-hot { background: rgba(59, 59, 59, 0.08); color: var(--text-accent); }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer {
    padding: 60px 24px;
    margin-top: auto;
    background: var(--bg-secondary);
    border-top: 2px dashed var(--border-default);
    border-top-style: dashed;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    color: var(--text-accent);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--text-primary);
}

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

.footer-section p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Floating Badge ───────────────────────────────────────────────────────── */
.floating-badge {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    box-shadow: var(--shadow-lg);
    animation: scribble-slide 0.6s ease-out;
    border-style: dashed;
}

@keyframes scribble-slide {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.badge-icon {
    font-size: 1.4rem;
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-status {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-accent);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px dashed var(--scribble-thin);
}

.badge-status.offline {
    background: rgba(138, 138, 138, 0.1);
    color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .section { padding: 80px 20px; }
    .section-title { font-size: 2rem; }
    .hero-content { gap: 16px; }
    .logo-text h1 { font-size: 1.75rem; }
    .hero-description { font-size: 1.05rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .footer-container { flex-direction: column; }
    .commands-table { font-size: 0.8rem; }
    .commands-table tbody td { padding: 12px 14px; }
}

@media (max-width: 480px) {
    .section { padding: 60px 16px; }
    .section-title { font-size: 1.6rem; }
    .features-grid { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .api-grid { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scribble-stroke);
}

/* ─── Selection ─────────────────────────────────────────────────────────────── */
::selection {
    background: rgba(59, 59, 59, 0.15);
    color: #000;
}
