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

body {
    background-color: #020617;
    color: #f8fafc;
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

header {
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffffff;
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #020617;
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
}

h1.app-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #f59e0b;
}

.offline-badge {
    font-size: 0.75rem;
    background-color: #1e293b;
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #334155;
}

main {
    flex: 1;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 96px;
}

.card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fbbf24;
}

.tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-emerald {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

p.desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 16px;
    line-height: 1.4;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.form-group input, .form-group select {
    width: 100%;
    background-color: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    color: #f8fafc;
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: #f59e0b;
}

.btn {
    width: 100%;
    background-color: #d97706;
    color: #020617;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 4px;
}

.btn-emerald {
    background-color: #059669;
    color: #f8fafc;
}

.hidden {
    display: none !important;
}

nav.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 12px 16px;
    display: flex;
    justify-content: space-around;
    z-index: 50;
}

nav.bottom-nav button {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

nav.bottom-nav button.active-amber {
    color: #fbbf24;
}

nav.bottom-nav button.active-emerald {
    color: #34d399;
}

.result-box {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(to bottom right, rgba(245, 158, 11, 0.1), rgba(249, 115, 22, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    text-align: center;
}

.result-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fbbf24;
    margin: 4px 0;
}




nav.bottom-nav button.active-red {
    color: #f87171;
}

.offline-badge.online {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
}

.empty-state {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    border-style: dashed;
}

/* Honeypot field for bots; hidden from people and screen readers. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 9999px;
    padding: 10px 18px;
    font-size: 0.8rem;
    z-index: 60;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

nav.bottom-nav {
    overflow-x: auto;
    gap: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

nav.bottom-nav button {
    flex-shrink: 0;
}
