:root{ --bg:#1a0033; --card:#2a0a4a; --muted:#c59fd6; --ink:#f7f7f7; --line:#3a2358; --accent:#22c55e; --pill:#1f2937; --chip:#0e1520; --brand:#ffd94a; --pink:#ff7ab6; --bad:#ef4444; }
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:#f7f7f7;font-family:Inter,Segoe UI,Roboto,Helvetica,Arial,sans-serif}

/* --- MAIN LAYOUT FIXES --- */
.container {
    max-width: 1000px;
    margin: 60px auto;       /* 60px top/bottom, AUTO left/right (Centers it) */
    padding: 30px;           /* Adds breathing room inside the box */
    background: var(--card); /* Uses your purple card color */
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* Nice deep shadow for floating effect */
}

/* Typography */
h1 { margin-top: 0; margin-bottom: 20px; font-size: 32px; color: var(--brand); text-align: center; }
.input-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--muted); }

/* Input Styling */
input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    color: #fff;
    background-color: #0e1520;
    outline: none;
}
input[type="text"]:focus { border-color: var(--pink); }

/* --- BUTTONS --- */
.btn-group { display: flex; gap: 15px; }

button {
    flex: 1; 
    padding: 14px 20px; 
    font-size: 16px; 
    border-radius: 8px; 
    cursor: pointer; 
    border: none; 
    font-weight: 700;
    transition: transform 0.1s ease, opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover { opacity: 0.9; transform: translateY(-1px); }
button:disabled { background-color: #555 !important; cursor: not-allowed; color: #aaa !important; }

/* PINK SCAN BUTTON */
#scanBtn { 
    background-color: #ff7ab6; 
    color: #2a0a4a; /* Dark purple text for contrast */
}

/* GREEN EXPORT BUTTON */
#exportBtn { 
    background-color: #86efac; 
    color: #064e3b; /* Dark green text for contrast */
    display: none; /* Hidden by default until results found */
}
#exportBtn:hover { background-color: #4ade80; }

/* Status Bar */
#status { 
    margin-top: 20px; 
    padding: 15px; 
    background: #d4af37; 
    color: white; 
    border-radius: 4px; 
    display: none; 
    border-left: 5px solid #b38f1d;
    font-weight: bold;
}

/* Table Styling */
table { width: 100%; border-collapse: collapse; margin-top: 20px; display: none; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
th { background-color: #151c24; color: var(--brand); position: sticky; top: 0; }
.domain-cell { font-family: monospace; font-size: 1.1em; color: var(--pink); }
.center-cell { text-align: center; }
input[type="checkbox"] { transform: scale(1.5); cursor: pointer; accent-color: var(--pink); }

/* Hidden map helper */
#map-helper { display: none; }

/* --- PDF APP ADD-ONS (Append to style.css) --- */

/* --- SPLIT UPLOAD BOXES (Replace old #drop-zone styles) --- */

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.upload-box {
    border: 2px dashed var(--line);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background: var(--chip);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.upload-box.hover {
    border-color: var(--pink);
    background: #1a2330;
    transform: translateY(-2px);
}

.upload-box.loaded {
    border-style: solid;
    border-color: var(--accent); /* Green border when file loaded */
    background: rgba(34, 197, 94, 0.05);
}

.box-label {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--brand);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom Browse Button */
.browse-btn {
    background: var(--pill);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.2s;
}

.browse-btn:hover {
    background: var(--muted);
    color: #000;
}

/* Hide the ugly default file input */
input[type="file"] {
    display: none;
}

.file-name-display {
    margin-top: 15px;
    font-size: 0.9em;
    color: var(--accent);
    word-break: break-all;
    display: none; /* Hidden until file selected */
}

/* --- Keep the rest of your Summary/Diff styles below --- */

/* Diff Output Area */
#results-area { 
    display: none; 
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.diff-container { 
    white-space: pre-wrap; 
    font-family: 'Roboto Mono', monospace; /* Tech feel */
    line-height: 1.6; 
    font-size: 14px; 
    color: var(--ink); /* Your main text color */
}

/* Highlighting: Adapted for Dark Mode */
.added { 
    background-color: rgba(34, 197, 94, 0.5); 
    color: #ffffff; /* White text on Green */
    border-radius: 4px;
    padding: 2px 4px;
    font-weight: bold;
}

.removed { 
    /* Darker red background for better contrast */
    background-color: rgba(239, 68, 68, 0.5); 
    color: #ffffff;  /* <--- WHITE TEXT */
    text-decoration: line-through;
    border-radius: 4px;
    padding: 2px 4px;
    margin-right: 4px;
}

.grey { color: var(--muted); }

/* File Names Header */
.file-info { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
    color: var(--brand); /* Yellow brand color */
    font-family: monospace;
}

/* --- SUMMARY TABLE ADDITIONS --- */

#summary-area {
    display: none;
    margin-top: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #1a0f2e; /* Darker contrast background */
    overflow: hidden;
}

#summary-header {
    background: var(--card);
    padding: 15px;
    border-bottom: 1px solid var(--line);
    font-weight: bold;
    color: var(--brand);
    font-size: 1.1em;
}

.summary-table {
    display: table; /* <--- THIS FIXES THE INVISIBLE TABLE */
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: transparent; /* Ensures it blends with your card */
}

/* Ensure the headers and cells are visible against your dark theme */
.summary-table th {
    background: #151c24; 
    color: var(--muted);
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
    color: var(--ink);
}

.summary-table tr:last-child td { border-bottom: none; }

/* Status Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.badge.mod { background: rgba(255, 217, 74, 0.2); color: var(--brand); }
.badge.del { 
    background: rgba(239, 68, 68, 0.5); 
    color: #ffffff; /* <--- WHITE TEXT */
}
.badge.add { 
    background: rgba(34, 197, 94, 0.5); 
    color: #ffffff; 
}

/* Context Text (The nearby words) */
.ctx { color: var(--muted); font-style: italic; font-size: 0.9em; }