:root{
--primary:#1f4959;
--bg:#f5f7f9;
--card:#ffffff;
--border:#e5e7eb;
--text:#1f2937;
--muted:#6b7280;
}

/* RESET */
*{box-sizing:border-box}

body{
margin:0;
font-family:system-ui,-apple-system;
background:var(--bg);
color:var(--text);
}



/* ===== HEADER PRO ===== */

.header{
position:sticky;
top:0;
z-index:999;
background: rgb(255 255 255);
backdrop-filter:blur(10px);
border-bottom:1px solid #1e293b;
}


/* LOGO */
.logo a{
color:#f1f5f9;
font-weight:700;
font-size:18px;
text-decoration:none;
}

.logo span{
color:#38bdf8;
}


/* HEADER LAYOUT */

.header-container{
max-width:1100px;
margin:auto;
display:flex;
align-items:center;
justify-content:space-between;
padding:20px 20px; /* tăng từ 12px → 20px */
position:relative;
min-height:160px; /* thêm chiều cao cố định */
}

/* CENTER LOGO */

.logo{
position:absolute;
left:50%;
transform:translateX(-50%);
}


.logo img{
height:90px; /* tăng từ ~38px */
object-fit:contain;
}

.nav{
display:flex;
justify-content:center;
gap:28px; /* rộng hơn */
padding:14px 0; /* cao hơn */
border-top:1px solid #1e293b;
}

/* LEFT placeholder */

.header-left{
width:40px;
}

/* RIGHT */

.header-right{
width:40px;
display:flex;
justify-content:flex-end;
}

/* NAV dưới logo */

.nav{
display:flex;
justify-content:center;
gap:28px; /* rộng hơn */
padding:14px 0; /* cao hơn */
border-top:1px solid #1e293b;
}

/* MOBILE */

@media(max-width:768px){

.logo img{
height:32px;
}

.nav{
flex-direction:column;
display:none;
background:#0f172a;
}

.nav.show{
display:flex;
}

}

/* NAV */
.nav{
display:flex;
gap:20px;
}

.nav a{
color:#94a3b8;
text-decoration:none;
font-size:14px;
transition:0.2s;
}

.nav a:hover{
color:#38bdf8;
}

/* RIGHT */
.header-right{
display:flex;
align-items:center;
gap:10px;
}

/* MENU TOGGLE */
.menu-toggle{
display:none;
background:none;
border:none;
color:#f1f5f9;
font-size:22px;
cursor:pointer;
}

/* MOBILE */
@media(max-width:768px){

.nav{
position:absolute;
top:60px;
left:0;
width:100%;
background:#0f172a;
flex-direction:column;
gap:0;
display:none;
}

.nav a{
padding:12px 20px;
border-top:1px solid #1e293b;
}

.nav.show{
display:flex;
}

.menu-toggle{
display:block;
}

}

.logo{
height:40px;
}

.menu a{
margin-left:20px;
text-decoration:none;
color:var(--text);
font-size:14px;
}

/* HERO */
.hero{
text-align:center;
padding:40px 20px;
}

.hero h1{
color:var(--primary);
font-size:22px;
}

.hero p{
color:var(--muted);
margin-top:10px;
}

.search{
margin-top:20px;
padding:10px;
width:250px;
border:1px solid var(--border);
border-radius:8px;
}

/* GRID */
.tools-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
gap:20px;
padding:30px;
}

/* CARD */
.tool-card{
background:var(--card);
padding:20px;
border-radius:12px;
text-decoration:none;
color:inherit;
border:1px solid var(--border);
transition:.2s;
}

.tool-icon svg{
width:28px;
height:28px;
stroke:#1f2937;
fill:none;
stroke-width:1.8;
}

.tool-card:hover .tool-icon svg{
stroke:#2563eb;
}
.tool-card:hover{
transform:translateY(-5px);
box-shadow:0 10px 25px rgba(0,0,0,.05);
}

.tool-icon{
font-size:30px;
margin-bottom:10px;
}

/* FOOTER */

.footer h4{
margin-bottom:10px;
}

.footer a{
text-decoration:none;
color:var(--muted);
font-size:14px;
}


/* ===== FOOTER PRO ===== */

.footer{
background: rgb(31, 73, 89);
color:#cbd5e1;
margin-top:60px;
font-size:14px;
}

.footer-container{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:30px;
padding:40px 20px;
max-width:1100px;
margin:auto;
}

.footer-col h4{
color:#f1f5f9;
margin-bottom:12px;
font-size:15px;
}

.footer-col p{
color:#94a3b8;
line-height:1.6;
}

.footer-col ul{
list-style:none;
padding:0;
margin:0;
}

.footer-col ul li{
margin-bottom:8px;
}

.footer-col ul li a{
color:#94a3b8;
text-decoration:none;
transition:0.2s;
}

.footer-col ul li a:hover{
color:#38bdf8;
}

/* STATUS */
.status-online{
color:#22c55e;
font-weight:600;
}

/* STATS */
.footer-stats{
margin-top:10px;
font-size:13px;
color:#94a3b8;
}

/* BOTTOM */
.footer-bottom{
text-align:center;
padding:15px;
border-top:1px solid #1e293b;
color:#64748b;
font-size:13px;
}


/* BREADCRUMB */
.breadcrumb-bar{
background:#fff;
border-bottom:1px solid var(--border);
padding:10px 20px;
}

.breadcrumb-container{
font-size:13px;
color:var(--muted);
}

.breadcrumb-container a{
color:var(--text);
text-decoration:none;
}

/* TOOL PAGE */
.tool-container{
max-width:1100px;
margin:40px auto;
padding:20px;
}

.json-box{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
margin-top:20px;
}

textarea{
width:100%;
height:300px;
padding:10px;
border:1px solid var(--border);
border-radius:8px;
font-family:monospace;
}

.output{
background:#111;
color:#00ff9c;
padding:10px;
border-radius:8px;
height:300px;
overflow:auto;
white-space:pre-wrap;
font-family:monospace;
}

/* BUTTONS */
.buttons{
margin-top:20px;
}

.buttons button{
margin-right:10px;
padding:10px 15px;
border:none;
background:var(--primary);
color:#fff;
border-radius:8px;
cursor:pointer;
}

.buttons button:hover{
opacity:0.9;
}



/* REGEX INPUT */
.regex-input{
width:100%;
padding:10px;
border:1px solid var(--border);
border-radius:8px;
font-family:monospace;
}

/* OUTPUT dùng chung rồi nên không cần thêm */

/* LABEL */
label{
font-size:14px;
color:var(--muted);
display:block;
margin-bottom:5px;
}




/* ERROR */
.error{
color:#dc2626;
margin-top:10px;
}

/* TABLE */
.table-wrap{
overflow:auto;
margin-bottom:30px;
}

.dns-table{
width:100%;
border-collapse:collapse;
background:#fff;
border:1px solid var(--border);
}

.dns-table th,
.dns-table td{
padding:10px;
border:1px solid var(--border);
font-size:13px;
text-align:left;
}

.dns-table th{
background:#f9fafb;
font-weight:600;
}



.dns-title{
margin-top:30px;
font-size:18px;
color:var(--primary);
}

/* Badge type */
.dns-title::before{
content:"●";
color:#22c55e;
margin-right:8px;
}

/* Table đẹp hơn */
.dns-table tr:hover{
background:#f9fafb;
}

/* TXT wrap */
.dns-table td{
word-break:break-all;
}

.dns-A::before{color:#3b82f6;}
.dns-MX::before{color:#f59e0b;}
.dns-TXT::before{color:#8b5cf6;}
.dns-NS::before{color:#10b981;}


.ip-card{
background:#fff;
border:1px solid var(--border);
border-radius:12px;
padding:20px;
margin-bottom:25px;
box-shadow:0 5px 15px rgba(0,0,0,0.03);
}

.ip-header{
font-size:16px;
font-weight:600;
margin-bottom:15px;
color:var(--primary);
}

.ip-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:15px;
}

.ip-grid span{
display:block;
font-size:12px;
color:var(--muted);
margin-bottom:5px;
}

.ip-grid b{
font-size:14px;
}


/* UUID input spacing */
input[type="number"]{
margin-top:10px;
width:120px;
}


/* ANNOUNCEMENT */
.announcement{
background:#ecfdf5;
border:1px solid #bbf7d0;
padding:15px 20px;
border-radius:10px;
margin-bottom:20px;
}

.announcement h3{
margin-top:0;
color:#065f46;
font-size:16px;
}

.announcement ul{
margin:10px 0 0 20px;
padding:0;
}

.announcement li{
margin-bottom:6px;
font-size:14px;
}



textarea{
width:100%;
height:200px;
padding:12px;
border:1px solid var(--border);
border-radius:8px;
font-family:monospace;
}

.output{
margin-top:20px;
background:#111;
color:#00ff9c;
padding:12px;
border-radius:8px;
min-height:120px;
white-space:pre-wrap;
font-family:monospace;
}



/* SUBNET FORM */
.subnet-form{
display:flex;
gap:10px;
margin-top:20px;
}

.subnet-form input,
.subnet-form select{
padding:10px;
border:1px solid var(--border);
border-radius:8px;
font-family:monospace;
}


/* RESULT TABLE */
.result-table{
width:100%;
border-collapse:collapse;
background:#fff;
border:1px solid var(--border);
border-radius:10px;
overflow:hidden;
}

.result-table td{
padding:12px;
border-bottom:1px solid var(--border);
font-size:14px;
}

.result-table tr:last-child td{
border-bottom:none;
}

.result-table td:first-child{
font-weight:600;
background:#f9fafb;
width:180px;
}

/* RESPONSIVE */
@media(max-width:768px){

.result-table td{
display:block;
width:100%;
}

.result-table tr{
display:block;
margin-bottom:10px;
border:1px solid var(--border);
border-radius:8px;
overflow:hidden;
}

.result-table td:first-child{
background:#f3f4f6;
}
}

.result-box{
margin-top:20px;
}


/* WRAP */
.result-wrap{
margin-top:20px;
}

/* DESKTOP TABLE */
.result-table{
width:100%;
border-collapse:collapse;
background:#fff;
border-radius:12px;
overflow:hidden;
box-shadow:0 8px 25px rgba(0,0,0,0.05);
}

.result-table td{
padding:14px 16px;
border-bottom:1px solid #f1f1f1;
font-size:14px;
}

.result-table tr:last-child td{
border-bottom:none;
}

.result-table td:first-child{
font-weight:600;
background:#f9fafb;
color:#374151;
width:200px;
}

.result-table td:last-child{
color:#111827;
}

/* HOVER */
.result-table tr:hover{
background:#f3f4f6;
}

/* COPY */
.copyable{
cursor:pointer;
color:#2563eb;
}

.copyable:hover{
text-decoration:underline;
}

/* ================= MOBILE CARD ================= */
@media(max-width:768px){

.result-table,
.result-table tbody,
.result-table tr,
.result-table td{
display:block;
width:100%;
}

.result-table{
box-shadow:none;
background:none;
}

.result-table tr{
background:#fff;
margin-bottom:12px;
border-radius:12px;
padding:10px;
box-shadow:0 5px 15px rgba(0,0,0,0.05);
}

.result-table td{
border:none;
padding:6px 10px;
}

.result-table td:first-child{
background:none;
font-size:12px;
color:#6b7280;
padding-bottom:0;
}

.result-table td:last-child{
font-size:15px;
font-weight:500;
}

}



.result-card{
background:#fff;
padding:15px;
border-radius:10px;
margin-top:10px;
box-shadow:0 5px 15px rgba(0,0,0,0.05);
}

.badge.ok{
background:#dcfce7;
color:#166534;
padding:3px 6px;
border-radius:6px;
font-size:12px;
}

.badge.expired{
background:#fee2e2;
color:#991b1b;
padding:3px 6px;
border-radius:6px;
font-size:12px;
}


/* ===== TABLE ===== */

.result-table{
width:100%;
border-collapse:collapse;
margin-top:15px;
background:#fff;
border-radius:10px;
overflow:hidden;
}

.result-table th,
.result-table td{
border:1px solid #e5e7eb;
padding:12px;
text-align:left;
font-size:14px;
}

.result-table th{
background:#f9fafb;
font-weight:600;
}


/* ===== CARD ===== */

.result-cards{
display:flex;
flex-direction:column;
gap:10px;
margin-top:15px;
}

.result-card{
background:#fff;
padding:12px;
border-radius:10px;
box-shadow:0 5px 15px rgba(0,0,0,0.05);
}


/* ===== RAW ===== */

.raw-box{
margin-top:15px;
}

.raw-box summary{
cursor:pointer;
font-weight:600;
margin-bottom:10px;
}

.raw-box pre{
background:#111;
color:#0f0;
padding:10px;
border-radius:8px;
white-space:pre-wrap;
overflow:auto;
}


/* ===== RESPONSIVE ===== */

.desktop-only{
display:block;
}

.mobile-only{
display:none;
}

@media(max-width:768px){

.desktop-only{
display:none;
}

.mobile-only{
display:block;
}

}


/* ===== SUBNET TABLE ===== */

.table-wrap{
overflow-x:auto;
margin-top:15px;
}

.subnet-table{
width:100%;
border-collapse:collapse;
background:#fff;
border-radius:12px;
overflow:hidden;
box-shadow:0 4px 12px rgba(0,0,0,0.05);
font-size:14px;
}

.subnet-table thead{
background:#1f2937;
color:#fff;
position:sticky;
top:0;
}

.subnet-table th,
.subnet-table td{
padding:10px;
text-align:center;
border-bottom:1px solid #eee;
}

.subnet-table tr:hover{
background:#f9fafb;
}

.row-common{
background:#ecfdf5;
font-weight:600;
}

@media(max-width:600px){
.subnet-table th,
.subnet-table td{
padding:8px;
font-size:12px;
}
}


/* ===== SUBNET RESULT CARD ===== */

.subnet-card{
background:#fff;
border:1px solid #e5e7eb;
border-radius:14px;
padding:15px;
margin-top:15px;
box-shadow:0 4px 12px rgba(0,0,0,0.05);
}

.subnet-row{
display:flex;
justify-content:space-between;
padding:8px 0;
border-bottom:1px dashed #eee;
font-size:14px;
}

.subnet-row:last-child{
border-bottom:none;
}

.subnet-title{
font-weight:600;
color:#1f2937;
}

.subnet-value{
font-weight:600;
color:#2563eb;
}


/* ===== BIG INPUT ===== */

.input-large{
width:100%;
padding:14px 16px;
font-size:16px;
border-radius:10px;
border:1px solid #d1d5db;
margin-top:6px;
}

.input-large:focus{
outline:none;
border-color:#2563eb;
box-shadow:0 0 0 2px rgba(37,99,235,0.15);
}

.map-box{
margin-top:10px;
}

textarea#output{
background:#0f172a;
color:#22c55e;
font-family:monospace;
font-size:13px;
}
