* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.5em;
    color: #00d4ff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

header p {
    color: #b0b0b0;
    font-size: 1.1em;
}

/* Módulos Grid */
.modulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.modulo-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.modulo-card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.modulo-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.modulo-card h3 {
    color: #00d4ff;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.modulo-card p {
    color: #b0b0b0;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.modulo-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    border: 1px solid #00d4ff;
}

.modulo-tag.cnpj {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border-color: #ff9800;
}

.modulo-tag.telefone {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: #4caf50;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #00d4ff;
}

.modal-content h2 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 2em;
}

.modal-content > p {
    color: #b0b0b0;
    margin-bottom: 25px;
}

.modal-input-group {
    margin-bottom: 30px;
}

.modal-input-group label {
    display: block;
    color: #00d4ff;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.modal-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.modal-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn-consultar-modal {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-consultar-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

.btn-consultar-modal:active {
    transform: translateY(0);
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.select-tipo {
    flex: 0 0 150px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.select-tipo:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.input-valor {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    transition: all 0.3s;
}

.input-valor:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.input-valor::placeholder {
    color: #888;
}

.btn-consultar {
    flex: 0 0 150px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

.btn-consultar:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    padding: 30px;
    margin-top: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.resultados {
    display: grid;
    gap: 25px;
}

.resultado-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.resultado-header h2 {
    color: #00d4ff;
    font-size: 1.5em;
    text-transform: uppercase;
}

.badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.badge.success {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.badge.error {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
    border: 1px solid #ff5252;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

td {
    color: #e0e0e0;
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.mini-table {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid rgba(0, 212, 255, 0.5);
}

.mini-row {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-row:last-child {
    border-bottom: none;
}

.mini-row strong {
    color: #00d4ff;
    margin-right: 8px;
}

.array-list {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.array-list div {
    padding: 5px 0;
    color: #e0e0e0;
}

.error-message {
    color: #ff5252;
    padding: 15px;
    background: rgba(255, 82, 82, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ff5252;
}

.json-viewer {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 10px;
}

.json-viewer pre {
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .select-tipo,
    .input-valor,
    .btn-consultar {
        flex: 1 1 100%;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    table {
        font-size: 0.9em;
    }
    
    .modulos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 25px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 1.5em;
    }
}
