/* Autor: Ingeniero Juan Pablo Llinás Ramírez – Puro Ingenio Samario */
:root {
  --bg:#0b1220; --fg:#e9eef7; --muted:#9fb0c9; --card:#121a2b; --border:#1d2941;
  --accent:#26c281; --accent-2:#4d6bfe;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--fg);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif}
.pis-container{max-width:1100px;margin:0 auto;padding:20px}
.pis-header{border-bottom:1px solid var(--border);background:linear-gradient(180deg,rgba(77,107,254,.08),transparent)}
.pis-header h1{margin:0 0 6px;font-size:32px}
.pis-header .sub{margin:0 0 10px;color:var(--muted)}
.pis-footer{border-top:1px solid var(--border);padding:28px 0;color:var(--muted);text-align:center}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;margin:18px 0}
.card-body{padding:20px}
.ip-big{font-size:40px;font-weight:700;letter-spacing:.5px}
.ip-meta{margin-top:6px;color:var(--muted);display:flex;gap:8px;align-items:center}
.muted{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
.break{word-break:break-word}
.badge{display:inline-block;padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:rgba(38,194,129,.1);color:var(--accent);font-weight:600;font-size:12px}
.row-actions{margin-top:16px;display:flex;gap:8px;flex-wrap:wrap}
.btn{appearance:none;border:1px solid var(--border);background:var(--accent-2);color:#fff;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:600}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn.btn-outline{background:transparent;color:var(--fg);border-color:var(--border)}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:980px){.grid{grid-template-columns:1fr}}
.list{margin:0;padding-left:20px}
.list li{margin:6px 0}
.geo-box{margin-top:14px;padding:12px;border-radius:10px;background:rgba(77,107,254,.08);border:1px dashed var(--border)}
.hidden{display:none}
.note{margin-top:10px;color:var(--muted);font-size:14px}

/* IPv4/IPv6 blocks */
.dual-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
@media (max-width:700px){.dual-grid{grid-template-columns:1fr}}
.ip-block{border:1px dashed var(--border);border-radius:12px;padding:12px}
.ip-block h3{margin:0 0 6px}
.ip-line{font-size:18px;word-break:break-all}
.ip-type{margin-top:4px;color:var(--muted);font-size:13px}

/* ---------------------------------------
   Puro Ingenio Samario — What is My IP
   CSS optimizado, sin dependencias externas
------------------------------------------ */

body {
    margin: 0;
    font-family: system-ui, -apple-system, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
}

/* Header */
.pis-header {
    background: #0b3d91;
    color: #fff;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.pis-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switch select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Layout general */
.pis-container {
    width: 92%;
    max-width: 1080px;
    margin: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.card-hero {
    text-align: center;
    padding: 2rem;
}

.card h2,
.card h3 {
    margin-top: 0;
}

/* IP principal */
.ip-big {
    font-size: 3rem;
    font-weight: bold;
    color: #0b3d91;
    word-break: break-word;
}

.badge {
    background: #0b3d91;
    color: #fff;
    padding: 4px 8px;
    font-size: .8rem;
    border-radius: 6px;
}

.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Botones */
.btn {
    background: #0b3d91;
    color: #fff;
    border: none;
    padding: .7rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: .5rem;
}

.btn-outline {
    background: #fff;
    border: 2px solid #0b3d91;
    color: #0b3d91;
}

.btn-success {
    background: #1aa01a;
}

.row-actions {
    margin-top: 1.2rem;
    text-align: center;
}

/* Listas */
.list {
    padding-left: 1rem;
}

.list li {
    margin-bottom: .4rem;
}

/* Textos */
.mono {
    font-family: "JetBrains Mono", "Courier New", monospace;
}

.break {
    word-break: break-word;
}

/* Geolocalización / WebRTC */
.geo-box {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 8px;
    background: #fafafa;
}

.small {
    font-size: 0.85rem;
}

/* Footer */
.pis-footer {
    background: #e9eef4;
    color: #0b3d91;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsivo */
@media (max-width: 600px) {
    .ip-big {
        font-size: 2rem;
    }
    .dual-grid {
        grid-template-columns: 1fr;
    }
}
