/* ===== LA CHEVE ISP - PLATAFORMA PROFESIONAL PARA ISPs ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Bebas+Neue&family=Permanent+Marker&display=swap');

:root {
    --bg-primary: #0B0F1A;
    --bg-secondary: #111827;
    --bg-card: #1A2035;
    --bg-card-hover: #1E2845;
    --border: rgba(59, 130, 246, 0.12);
    --border-accent: rgba(59, 130, 246, 0.3);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --accent: #3B82F6;
    --accent-light: #60A5FA;
    --accent-dark: #2563EB;
    --teal: #14B8A6;
    --teal-dark: #0D9488;
    --green: #22C55E;
    --amber: #F59E0B;
    --red: #EF4444;
    --purple: #8B5CF6;
    --gradient-accent: linear-gradient(135deg, #3B82F6 0%, #14B8A6 100%);
    --gradient-card: linear-gradient(145deg, #1A2035 0%, #151B2E 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.25);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.35);
    --shadow-glow: 0 0 20px rgba(59,130,246,0.15);
    --radius: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 15px;
    line-height: 1.6;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.navbar .logo .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-accent);
    border-radius: 8px;
    font-size: 0.9rem;
}

.navbar .logo span {
    color: var(--accent-light);
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.2s;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(59,130,246,0.08);
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.55rem 1.3rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.1px;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 2px 10px rgba(59,130,246,0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--accent-light);
    border: 1.5px solid var(--border-accent);
}

.btn-outline:hover {
    background: rgba(59,130,246,0.08);
    border-color: var(--accent);
}

.btn-meet {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #1a0e05;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(245,158,11,0.25);
}

.btn-meet:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}

.btn-danger { background: var(--red); color: white; }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Grid pattern background */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Gradient orbs */
.hero::after {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 820px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(59,130,246,0.1);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-badge .pulse {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.hero h1 .gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn { padding: 0.7rem 1.6rem; font-size: 0.9rem; }

/* Stats */
.stats-bar {
    display: flex;
    gap: 1px;
    justify-content: center;
    margin-top: 4rem;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.stat-item {
    text-align: center;
    padding: 1.5rem 2.5rem;
    background: var(--bg-card);
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 3rem;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
    margin: 0 auto;
    margin-top: 1rem;
}

/* ===== DIVIDER ===== */
.section-divider {
    max-width: 1200px;
    margin: 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
}

.card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.25s ease;
    position: relative;
}

.card:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.card-icon.blue { background: rgba(59,130,246,0.12); color: var(--accent-light); }
.card-icon.teal { background: rgba(20,184,166,0.12); color: var(--teal); }
.card-icon.purple { background: rgba(139,92,246,0.12); color: var(--purple); }
.card-icon.amber { background: rgba(245,158,11,0.12); color: var(--amber); }

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ===== MAPA ===== */
#mapa-section {
    padding: 4rem 0;
}

#mapa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

#mapa {
    height: 580px;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}

.mapa-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    padding: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ===== MEET SECTION - Aqui si informal ===== */
.meet-section {
    background:
        linear-gradient(145deg, #2a1608 0%, #1a0e05 100%);
    border: 2px solid #B87333;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(185,115,51,0.08);
    overflow: hidden;
}

/* Wood grain texture for meet section */
.meet-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(90,52,21,0.05) 40px, rgba(90,52,21,0.05) 41px);
    pointer-events: none;
}

.meet-section .section-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.2rem;
    color: #FBBF24;
    text-shadow: 0 0 20px rgba(245,158,11,0.4), 0 0 60px rgba(245,158,11,0.15);
    letter-spacing: 1px;
}

.meet-section .meet-subtitle {
    color: #FEF3C7;
    opacity: 0.6;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.meet-rules-label {
    font-family: 'Bebas Neue', cursive;
    color: #B87333;
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
}

.meet-rules {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(0,0,0,0.35);
    border-radius: 12px;
    border: 1px dashed rgba(185,115,51,0.25);
    position: relative;
}

.meet-rules li {
    padding: 0.6rem 0;
    color: #FEF3C7;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(185,115,51,0.08);
}

.meet-rules li:last-child { border-bottom: none; }

.meet-rules li::before {
    content: '\f0fc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #F59E0B;
    font-size: 0.85rem;
    min-width: 18px;
}

.meet-btn-wrapper {
    margin-top: 1.5rem;
    position: relative;
}

.btn-meet-large {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #1a0e05;
    font-size: 1.1rem;
    padding: 1rem 3rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

.btn-meet-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245,158,11,0.4);
}

/* ===== ISP LIST ===== */
.isp-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.isp-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.isp-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.isp-card .isp-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.isp-card .isp-estado {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.isp-card .isp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 0.3rem;
}

.tag {
    background: rgba(59,130,246,0.1);
    color: var(--accent-light);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.tag-green {
    background: rgba(20,184,166,0.1);
    color: var(--teal);
}

.tag-fiber {
    background: rgba(34,197,94,0.1);
    color: var(--green);
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.modal .modal-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.form-divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

.form-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-message {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.87rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(34,197,94,0.08);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}

.form-message.error {
    display: block;
    background: rgba(239,68,68,0.08);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.2);
}

/* ===== ESTADOS GRID ===== */
.estados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.8rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.estado-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.estado-checkbox:hover { background: rgba(59,130,246,0.06); }

.estado-checkbox input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* ===== USER PANEL ===== */
.user-panel {
    display: none;
    padding: 5rem 2rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.user-panel.active { display: block; }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* ===== TABS ===== */
.tab-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
    color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer .footer-brand {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    letter-spacing: -0.2px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    grid-column: 1/-1;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
    opacity: 0.3;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===== LOADER ===== */
.loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(59,130,246,0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .stats-bar { flex-direction: column; }
    .stat-item { padding: 1rem; }
    .stat-number { font-size: 2rem; }
    #mapa { height: 400px; }
    .form-row { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .modal { padding: 1.5rem; width: 95%; }
    .navbar { padding: 0 1rem; }
    .panel-header { flex-direction: column; gap: 1rem; text-align: center; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .tab-nav { flex-wrap: wrap; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.6s ease forwards; }
