@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --bg-dark: #020617;
    --bg-card: #0f172a;
    --emerald: #10b981;
    --cyan: #06b6d4;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --glow-emerald: rgba(16, 185, 129, 0.15);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Landing Layout */
.hero-section {
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, var(--glow-emerald) 0%, transparent 70%);
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--emerald);
    color: var(--emerald);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Mobile First Auth */
.auth-container {
    padding: 2rem 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.input-group input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
}

.btn-primary {
    width: 100%;
    background: var(--emerald);
    color: var(--bg-dark);
    border: none;
    padding: 1.1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* App Dashboard */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.5rem 1.5rem;
    z-index: 1000;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.nav-item.active {
    color: var(--emerald);
}

.content-grid {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    width: 48px;
    height: 48px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Feature Grid */
.feature-list {
    padding: 2rem 1.5rem;
}

.feature-item {
    margin-bottom: 2rem;
    border-left: 2px solid var(--emerald);
    padding-left: 1rem;
}

.feature-item h4 {
    margin: 0 0 0.5rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Heatmap Viz */
.heatmap-viz {
    width: 100%;
    height: 200px;
    background: radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.4) 0%, rgba(16, 185, 129, 0.1) 30%, transparent 70%);
    border-radius: 0.5rem;
    border: 1px dashed var(--border);
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
}

.milking-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.milking-cursor {
    width: 30px;
    height: 30px;
    background: var(--emerald);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--emerald);
    position: absolute;
    animation: slide 2s infinite ease-in-out;
}

.warning-box {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.protocol-header {
    border-left: 4px solid var(--emerald);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--glow-emerald), transparent);
}

.protocol-number {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--emerald);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.status-item {
    font-size: 0.75rem;
}

.status-label {
    display: block;
    color: var(--text-muted);
}

.status-value {
    font-weight: 700;
    color: var(--emerald);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.signal-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.signal-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.tag-badge {
    background: var(--emerald);
    color: var(--bg-dark);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.65rem;
}

@keyframes slide {
    0% {
        left: 10%;
        opacity: 0.2;
    }

    50% {
        left: 90%;
        opacity: 1;
    }

    100% {
        left: 10%;
        opacity: 0.2;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-section {
        padding-top: 10rem;
    }
}