:root {
    --primary-bg: #181c20;
    --secondary-bg: #23272b;
    --accent: #00c3ff;
    --border: #444c56;
    --header: #1a222a;
    --text: #eaeaea;
    --highlight: #00c3ff;
    --danger: #e74c3c;
    --info: #3498db;
    --modal-bg: rgba(24,28,32,0.97);
}

body {
    background: var(--primary-bg);
    color: var(--text);
    font-family: 'Segoe UI', 'Arial', sans-serif;
    margin: 0;
    min-height: 100vh;
}

header {
    background: var(--header);
    padding: 24px 0 16px 0;
    text-align: center;
    border-bottom: 3px solid var(--accent);
    margin-bottom: 32px;
}

header h1 {
    color: var(--accent);
    letter-spacing: 2px;
    font-size: 2.2rem;
    margin: 0;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
}

#searchInput, #categoryFilter {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--secondary-bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

#searchInput:focus, #categoryFilter:focus {
    border: 1.5px solid var(--accent);
}

.table-container {
    max-width: 98vw;
    margin: 0 auto;
    background: var(--secondary-bg);
    padding: 24px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    border: 1.5px solid var(--border);
}

#lawTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

#lawTable th, #lawTable td {
    padding: 12px 10px;
    text-align: left;
}

#lawTable th {
    background: var(--header);
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    font-size: 1.05rem;
}

#lawTable tbody tr {
    border-bottom: 1px solid var(--border);
    background: var(--secondary-bg);
    transition: background 0.15s;
    cursor: pointer;
}

#lawTable tbody tr:hover {
    background: #27313a;
}

#lawTable td {
    color: var(--text);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: var(--modal-bg);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--secondary-bg);
    padding: 36px 32px 32px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    min-width: 340px;
    max-width: 95vw;
    width: 460px;
    position: relative;
    animation: modalPop 0.18s;
}

@keyframes modalPop {
    from {transform: scale(0.85);}
    to {transform: scale(1);}
}

.close {
    position: absolute;
    top: 18px; right: 22px;
    font-size: 2rem;
    color: var(--accent);
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}

.close:hover {
    color: var(--danger);
}

#modalDetails {
    color: var(--text);
}

#modalDetails h2 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

#modalDetails .law-detail-row {
    margin-bottom: 10px;
    font-size: 1.08rem;
}

#modalDetails .law-label {
    font-weight: bold;
    color: var(--highlight);
    margin-right: 7px;
}

@media (max-width: 900px) {
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    .table-container {
        padding: 10px 2px;
    }
    #lawTable th, #lawTable td {
        padding: 8px 4px;
        font-size: 0.96rem;
    }
    .modal-content {
        width: 97vw;
        min-width: unset;
        padding: 18px 6px 16px 10px;
    }
}
