/* undo.sh - Pop-art shell scripting dashboard */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== HERO ========== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 40px;
    overflow: hidden;
}

.hero-marble-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245, 240, 232, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(74, 144, 217, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(232, 184, 75, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero-pop-art-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(74, 144, 217, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    border: 2px solid #4a90d9;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #4a90d9;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    color: #f5f0e8;
    text-shadow: 4px 4px 0 rgba(74, 144, 217, 0.3);
}

.hero-title-accent {
    color: #e8b84b;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: #6c757d;
    margin-bottom: 48px;
    letter-spacing: 0.02em;
}

/* Terminal Window */
.hero-terminal,
.install-terminal {
    background: #0d0d1a;
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    margin: 0 auto 40px;
    max-width: 600px;
    box-shadow:
        0 0 0 1px rgba(74, 144, 217, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(245, 240, 232, 0.05);
    border-bottom: 1px solid rgba(245, 240, 232, 0.08);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.terminal-body {
    padding: 20px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(8px);
    animation: terminalFadeIn 0.5s ease forwards;
}

.terminal-line[data-line="1"] { animation-delay: 0.3s; }
.terminal-line[data-line="2"] { animation-delay: 1.2s; }
.terminal-line[data-line="3"] { animation-delay: 2s; }

.install-terminal .terminal-line {
    opacity: 1;
    transform: none;
    animation: none;
}

.terminal-prompt {
    color: #4a90d9;
    font-weight: 700;
}

.terminal-cmd {
    color: #f5f0e8;
}

.terminal-output {
    padding-left: 0;
}

.terminal-success {
    color: #28c840;
}

.terminal-dimmed {
    color: #6c757d;
}

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

.hero-cta {
    display: inline-block;
    padding: 14px 36px;
    background: #4a90d9;
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    border: 2px solid #4a90d9;
}

.hero-cta:hover {
    background: transparent;
    color: #4a90d9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.3);
}

/* Hero SVG Paths */
#hero-path-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
}

.flow-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0.2;
}

.flow-path-1 {
    stroke: #4a90d9;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawPath 3s ease forwards 0.5s;
}

.flow-path-2 {
    stroke: #e8b84b;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawPath 3s ease forwards 1s;
}

.flow-path-3 {
    stroke: #6c757d;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawPath 3s ease forwards 1.5s;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

/* ========== SECTION DIVIDERS ========== */
.section-divider {
    width: 100%;
    overflow: hidden;
}

.section-divider svg {
    display: block;
    width: 100%;
}

.pop-art-divider {
    background: transparent;
}

/* ========== DASHBOARD ========== */
#dashboard {
    padding: 80px 20px;
    background: #1a1a2e;
    position: relative;
}

.dashboard-header,
.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #f5f0e8;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0 rgba(74, 144, 217, 0.2);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 400;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Marble Panel Effect */
.marble-panel {
    background:
        linear-gradient(135deg, rgba(245, 240, 232, 0.06) 0%, rgba(245, 240, 232, 0.02) 50%, rgba(245, 240, 232, 0.05) 100%);
    border: 1px solid rgba(245, 240, 232, 0.1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marble-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(245, 240, 232, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(74, 144, 217, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.marble-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(74, 144, 217, 0.2);
}

.dashboard-panel {
    padding: 0;
}

.wide-panel {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(245, 240, 232, 0.08);
}

.panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f5f0e8;
    flex: 1;
}

.panel-badge {
    background: #4a90d9;
    color: #1a1a2e;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.panel-body {
    padding: 16px 24px 24px;
    position: relative;
}

/* Command List */
.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(245, 240, 232, 0.05);
    transition: background 0.2s ease;
}

.command-item:last-child {
    border-bottom: none;
}

.cmd-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.command-item[data-status="success"] .cmd-status { background: #28c840; }
.command-item[data-status="warning"] .cmd-status { background: #e8b84b; }
.command-item[data-status="error"] .cmd-status { background: #ff5f57; }

.cmd-text {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    color: #f5f0e8;
}

.cmd-time {
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
}

.cmd-undo-btn {
    padding: 4px 14px;
    background: transparent;
    border: 1px solid #4a90d9;
    color: #4a90d9;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cmd-undo-btn:hover {
    background: #4a90d9;
    color: #1a1a2e;
}

.cmd-undo-btn.undone {
    background: #28c840;
    border-color: #28c840;
    color: #1a1a2e;
    pointer-events: none;
}

/* Stats */
.stats-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px 16px;
    background: rgba(245, 240, 232, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(245, 240, 232, 0.06);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #e8b84b;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Flow Diagram */
.flow-body {
    padding: 24px;
}

#flow-diagram {
    width: 100%;
    height: auto;
}

.flow-node {
    fill: rgba(74, 144, 217, 0.15);
    stroke: #4a90d9;
    stroke-width: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.flow-node:hover {
    fill: rgba(74, 144, 217, 0.35);
    stroke-width: 3;
}

.flow-node[data-label="undo"] {
    fill: rgba(232, 184, 75, 0.15);
    stroke: #e8b84b;
}

.flow-node[data-label="undo"]:hover {
    fill: rgba(232, 184, 75, 0.35);
}

.flow-connect {
    fill: none;
    stroke: #4a90d9;
    stroke-width: 1.5;
    opacity: 0.4;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.flow-connect.animated {
    animation: drawConnect 1.5s ease forwards;
}

@keyframes drawConnect {
    to { stroke-dashoffset: 0; }
}

.flow-label {
    fill: #f5f0e8;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
}

/* ========== FEATURES ========== */
#features {
    padding: 80px 20px;
    background: linear-gradient(180deg, #1a1a2e 0%, #151527 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
}

.feature-pop-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4a90d9, #e8b84b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-pop-accent {
    transform: scaleX(1);
}

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

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f5f0e8;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.7;
}

/* ========== INSTALL ========== */
#install {
    padding: 80px 20px;
    background: #1a1a2e;
}

.install-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.install-content .section-title {
    margin-bottom: 12px;
}

.install-content .section-subtitle {
    margin-bottom: 48px;
}

.install-terminal {
    margin-bottom: 48px;
}

.install-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.install-option {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(245, 240, 232, 0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.install-option h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e8b84b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.install-option code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.8rem;
    color: #4a90d9;
    background: rgba(74, 144, 217, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    word-break: break-all;
}

/* ========== FOOTER ========== */
#footer {
    background: #0d0d1a;
    padding: 60px 20px 24px;
    border-top: 1px solid rgba(245, 240, 232, 0.08);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(245, 240, 232, 0.06);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #f5f0e8;
}

.footer-logo-accent {
    color: #e8b84b;
}

.footer-tagline {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 8px;
}

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f5f0e8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.footer-col a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #4a90d9;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wide-panel {
        grid-column: 1;
    }

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

    .install-options {
        grid-template-columns: 1fr;
    }

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

    .footer-links {
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-body {
        grid-template-columns: 1fr;
    }

    .hero-title {
        text-shadow: 2px 2px 0 rgba(74, 144, 217, 0.3);
    }

    .cmd-text {
        font-size: 0.75rem;
    }

    .cmd-time {
        display: none;
    }
}

/* ========== ANIMATIONS ========== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
