/* ========== GLOBAL BODY & BACKGROUND ========== */
:root {
    --font-family: Arial, sans-serif;
    --bg-color: #f5f5f5;
    --text-color: #111;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(0, 0, 0, 0.2);
    --button-bg: rgba(0, 0, 0, 0.05);
    --button-hover-bg: rgba(0, 0, 0, 0.15);
    --footer-bg: rgba(255,255,255,0.5);
}

body.dark {
    --font-family: Arial, sans-serif;
    --bg-color: #0d0d0d;
    --text-color: #f1f1f1;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
    --button-bg: rgba(255, 255, 255, 0.08);
    --button-hover-bg: rgba(255, 255, 255, 0.25);
    --footer-bg: rgba(0,0,0,0.5);
}

/* Apply variables */
body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
}


/* ========== HEADINGS & TEXT ========== */
h1 {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

h2.itext2 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 10px;
}

.ptext, .ptext-minimal, .gray-text, .itext, .itext2 {
    color: var(--text-color);
}

/* Subtle faded text */
.gray-text {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.header-img {
        width: 65%;      /* scales image to half the screen width */
        height: auto;    /* keeps aspect ratio */
        display: block;  /* lets margin auto center it */
        margin: 0 auto;  /* centers the image horizontally */
    }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    width: 95%;
    padding-bottom: 4rem;
}

.dashboard-header {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-stack {
    margin: 20px auto;
    width: 95%;
}

/* Make cards fill their grid item */
.grid-stack-item .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 10px;
    margin-bottom: 15px;
}

/* Glass Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.card h2 {
    font-size: clamp(1rem, 2vw, 2rem);
    margin-bottom: 0.5rem;
    text-align: center;
}

.card p {
    margin: 0.3rem 0;
}


.remove-btn {
    margin-top: 10px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,0,0,0.2);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: rgba(255,0,0,0.35);
}


/* ========== GLASS STYLE CORE ========== */
.glass, .metric, .button-container, .popupNavi, footer {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    padding: 15px;
    margin: 15px auto;
}


/* ========== LIQUID GLASS INPUTS & DROPDOWNS ========== */
.glass-input, 
.glass-select {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: var(--text-color);
    width: 250px;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    outline: none;
    transition: all 0.3s ease;
}

/* Focus & hover glow */
.glass-input:focus, .glass-select:focus,
.glass-input:hover, .glass-select:hover {
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* Form container centered with spacing */
.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;  /* space between each element */
    margin: 20px auto;
    width: 100%;
    max-width: 600px; /* keeps it neat on wide screens */
}

/* Row for select + input side by side */
.search-row {
    display: flex;
    justify-content: center;
    gap: 12px; /* spacing between dropdown and input */
    width: 100%;
}

/* Make input + select flex nicely */
.search-row .glass-select,
.search-row .glass-input {
    flex: 1;
    min-width: 0; /* prevents weird stretching */
}

/* Ensure buttons match alignment */
.search-form .nmap-button,
.search-form .nmap-button-red {
    width: 100%;
    max-width: 300px;
    text-align: center;
}

/* Glassy result table */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Header styling */
.result-table th {
    padding: 12px 10px;
    text-align: left;
    background: rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255,255,255,0.15);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.result-table th:last-child {
    border-right: none;
}

/* Data cells */
.result-table td {
    padding: 10px 12px;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-color);
}

.result-table td:last-child {
    border-right: none;
}

/* Row striping for clarity */
.result-table tr:nth-child(even) {
    background: rgba(255,255,255,0.05);
}

/* Hover effect */
.result-table tr:hover {
    background: rgba(255,255,255,0.12);
}

/* Keep "Reset View" button aligned */
.result-table th a {
    float: right;
    margin-left: 10px;
}



/* -------------------------------------------- */

/* Custom dropdown arrow */
.glass-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg fill='%23cccccc' height='20' width='20' xmlns='http://www.w3.org/2000/svg'><polygon points='0,0 20,0 10,10'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 34px; /* extra space for arrow */
}


/* ========== METRICS ========== */
.metric {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color);
    max-width: 600px;
}

.metrics-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
}

.metrics-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.metrics-list li:last-child { border-bottom: none; }


/* ========== BUTTONS ========== */
.nmap-button, .nmap-button-blue, .nmap-button-green,
.nmap-button-red, .nmap-button-purple, .nmap-button-yellow,
.nmap-button-list-item, .nmap-button-list-itemfolder {
    display: inline-block;
    padding: 12px 18px;
    margin: 5px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--button-bg);
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Buttons fill card width */
.card .nmap-button,
.card .nmap-button-blue,
.card .nmap-button-green,
.card .nmap-button-red,
.card .nmap-button-purple,
.card .nmap-button-yellow,
.card .nmap-button-list-item,
.card .nmap-button-list-itemfolder {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0;
    text-align: center;
}


.nmap-button:hover,
.nmap-button-blue:hover,
.nmap-button-green:hover,
.nmap-button-red:hover,
.nmap-button-purple:hover,
.nmap-button-yellow:hover,
.nmap-button-list-item:hover,
.nmap-button-list-itemfolder:hover,
.back-button:hover,
.mini-button:hover {
    background: var(--button-hover-bg);
    color: #000;
}

/* Accent Variants */
.nmap-button-blue { background: rgba(60,100,220,0.3); }
.nmap-button-green { background: rgba(40,160,60,0.3); }
.nmap-button-red { background: rgba(180,40,40,0.3); }
.nmap-button-purple { background: rgba(120,40,150,0.3); }
.nmap-button-yellow { background: rgba(200,200,70,0.4); color: #111; }
.nmap-button-list-itemfolder { background: rgba(120,130,200,0.35); }

.back-button {
    display: inline-block;
    padding: 10px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--button-bg);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s; /* Add a transition effect */
}

.mini-button {
    display: inline-block;
    padding: 10px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--button-bg);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s; /* Add a transition effect */
}


/* ========== OUTPUT CONTAINER STUFF ========== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5% auto;
    width: 90%;
    max-width: 1000px;
}

.header {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ccc;
    text-align: center;
}

.output-panel {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: left; /* <-- important! */
    font-family: monospace;
}

.output-panel pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #c7d2fe;
    margin: 0;
}
.output-panel.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

.copy-btn, .collapse-btn {
    background-color: #292929;
    color: #ccc;
    border: none;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 0.5rem;
}

.copy-btn:hover, .collapse-btn:hover {
    background-color: #3a3a3a;
}


/* specific to the MRA Stuff */
.centered-container {
    display: flex;
    justify-content: center;
    flex-direction: column;  /* Ensures vertical stacking */
    margin-top: 5%;
    padding: 1rem;
    box-sizing: border-box;
    width: 50%;
}
.prebody2 {
    display: none;

    background-color: var(--card-bg);
    padding: 10px;
    border: 1px solid var(--button-bg);

}



/* ========== BUTTON CONTAINERS ========== */
.main-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
}

.button-container {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 900px;
}

/* ========== POPUP NAVI ========== */
.popupNavi {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    transition: top 0.4s ease;
    z-index: 10;
}

/* ========== FOOTER ========== */
.whitespace {
    padding: 200px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: var(--footer-bg);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

footer p {
    color: var(--text-color);
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .button-container {
        flex-direction: column;
        align-items: stretch;
    }
    .metric {
        font-size: 0.9rem;
    }
    h1 {
        font-size: 2rem;
    }
}



/* ============= FLASH STUFF (Message Pop Up) ============ */
/* flash shit */
/* Success flash message */
.flashes_success {
    list-style-type: none;
    display: inline-block;
    padding: 10px;
    text-decoration: none;
    border-radius: 5px;
    color: #21c046;
    list-style-type: none;
    background: var(--button-bg);
    border: var(--card-border);
    text-align: center;
}

/* Error flash message */
.flashes_error {
    color: #a71725;
    background: var(--button-bg);
    border: var(--card-border);
    list-style-type: none;
}

/* Warning flash message */
.flashes {
    list-style-type: none;
    display: inline-block;
    padding: 10px;
    color: #d8db20;
    text-decoration: none;
    border-radius: 5px;
    background: var(--button-bg);
    border: var(--card-border);
}

/* Info flash message */
.flash {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
    list-style-type: none;
}


/* notifications part 2 eventually replacing flash....? */
.toast::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.4));
  border-radius: 12px;
  pointer-events: none;
}


.toast {
  visibility: hidden;
  min-width: 220px;
  max-width: 90%;

  /* Stronger tinted glass base behind blur */
  background: rgba(0, 0, 0, 0.8);  /* darker tint */
  color: #fdd72f;

  text-align: center;
  border-radius: 12px;
  padding: 12px 16px;
  position: fixed;
  z-index: 1000;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-family: monospace;

  opacity: 0;
  transition: opacity 0.4s ease-in-out, transform 0.2s ease;

  border: 1px solid rgba(255, 255, 0, 0.8);  /* brighter edge */
  
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);

  box-shadow:
    0 0 16px rgba(255, 255, 0, 0.4),
    inset 0 0 8px rgba(255, 255, 255, 0.1);

  /* text outline / shadow for contrast */
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.7),
    0 0 4px rgba(0, 0, 0, 0.5);
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
