body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 2rem auto; padding: 0 1rem; background-color: #f4f7f9; }
.card { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
h2 { margin-top: 0; color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 0.5rem; }
.input-group { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
input { padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }
input#ip { flex: 3; min-width: 200px; }
input#cidr { flex: 1; min-width: 80px; }
button {
    padding: 10px 20px;
    background: linear-gradient(180deg,#2d9cdb,#2b86c7);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    box-shadow: 0 2px 6px rgba(45,156,219,0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
button:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(45,156,219,0.12); }
button:hover { filter: brightness(0.98); }
.result { margin-top: 1.5rem; display: none; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }
th {
    background: linear-gradient(180deg,#f7fbff,#eef6fb);
    color: #0f2b3d;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    padding: 12px;
    width: 30%;
    border-right: 1px solid rgba(16,24,40,0.04);
}
.error { color: #e74c3c; margin-top: 1rem; display: none; padding: 10px; background: #fdf2f2; border-left: 4px solid #e74c3c; }
code { background: #f0f0f0; padding: 2px 5px; border-radius: 3px; font-family: monospace; }
.binary { font-family: monospace; white-space: pre; font-size: 0.98rem; line-height: 1.4; }
.binary span { display: inline-block; padding: 0 4px; border-radius: 3px; margin: 0 1px; }
.bin-net { color: #ffffff; background: #0f5fa8; }
.bin-host { color: #071422; background: #f6f8fa; border: 1px solid #e3e7ea; }
.copy-btn { margin-left: 8px; padding: 4px 8px; font-size: 0.85rem; border-radius: 6px; border: 1px solid #d0d7dc; background: #ffffff; color: #2c3e50; cursor: pointer; box-shadow: none; transition: background 0.12s, border-color 0.12s, transform 0.08s; }
.copy-btn:hover { background: #fbfdff; border-color: #cfe6fb; }
.copy-btn:active { transform: translateY(1px); }
.copy-btn.copied { background: #2d9cdb; border-color: #2d9cdb; color: #fff; }
.small-btn {
    padding: 6px 10px;
    font-size: 0.88rem;
    border-radius: 6px;
    border: 1px solid rgba(33,37,41,0.08);
    background: linear-gradient(180deg,#ffffff,#f7fbff);
    cursor: pointer;
    color: #1f2d3d;
    font-weight: 600;
    min-width: 72px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    transition: background 0.15s ease, transform 0.08s ease;
}
.small-btn:hover { background: linear-gradient(180deg,#f4fbff,#eef8ff); transform: translateY(-1px); }
.small-btn:active { transform: translateY(0); }
.quick-btn { position: relative; display: inline-block; }
.popup { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid #e0e6ea; box-shadow: 0 8px 20px rgba(15,23,42,0.08); border-radius: 6px; padding: 8px; display: none; }
.popup[aria-hidden="false"] { display: block; }
.popup-search { width: 100%; padding: 6px 8px; margin-bottom: 6px; border: 1px solid #e6edf0; border-radius: 4px; }
.popup .options { max-height: 180px; overflow: auto; }
.popup .opt { padding: 6px 8px; border-radius: 4px; cursor: pointer; color: #1f2d3d; }
.popup .opt:hover { background: #f1f6fb; }
.result-sections { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.results-common, .results-binary { width: 100%; }
.results-binary .binary { max-width: 100%; overflow-x: auto; }
