/* ================================
   MASTER CSS - THEME VARIABLES
   ================================ */


/* -------- Light Theme (default) -------- */
:root {
    --bg-color: #E3F2F7;
    --text-color: #000;
    --header-footer-bg: #2E3B4E;
    --sidebar-bg: #2E3B4E;
    --sidebar-text: #fff;
    --right-col-bg: #3B5569;
    --right-col-cell-bg: #2E3B4E;
    --menu-hover-bg: #3B5569;
    --highlight-color: #4A6B82;
    --alert-color: red;
    --link-color: #4A6B82;
}

/* -------- Dark Theme (default) -------- */
[data-theme="dark"] {
    --bg-color: #111;
    --text-color: #ccc;
    --header-footer-bg: #111;
    --sidebar-bg: #111;
    --sidebar-text: #fff;
    --right-col-bg: #222;
    --right-col-cell-bg: #333;
    --menu-hover-bg: #444;
    --highlight-color: #FFD700;
    --alert-color: #ff5555;
    --link-color: #FFD700;
}


/* ================================
   GLOBAL THEME STYLES
   ================================ */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input[type="submit"] {
    background-color: var(--header-footer-bg);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

button:hover, input[type="submit"]:hover {
    filter: brightness(0.9);
}

.alert {
    color: var(--alert-color);
    font-weight: bold;
    text-align: center;
}

.highlight {
    color: var(--highlight-color);
    transition: color 0.3s;
}

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

html, body {
    height: 100%;
    width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
}

table th, table td {
    padding: 8px;
}

table tr:hover {
    background-color: rgba(74,107,130,0.1);
}

label, input[type="text"], form {
    font-family: inherit;
    color: var(--text-color);
}

input::placeholder {
    color: var(--text-color-secondary);
    opacity: 0.9;
}



/* ================================
   LAYOUT
   ================================ */
.header, .footer {
    background-color: var(--header-footer-bg);
    color: var(--sidebar-text);
    text-align: center;
    padding: 15px;
    transition: background-color 0.3s, color 0.3s;
}

.footer {
    font-size: 0.9em;
    padding: 10px;
}

.main-row {
    display: flex;
    flex-grow: 1;
    min-height: 500px;
}

.content {
    flex-grow: 1;
    padding: 20px;
    min-height: 600px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 10px;
    flex-shrink: 0;
}

.menu-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.menu-item:hover {
    background-color: var(--menu-hover-bg);
}

.submenu {
    display: none;
    margin-left: 10px;
    flex-direction: column;
}

.submenu a {
    color: #DDE6ED;
    padding: 8px 12px;
    border-radius: 4px;
    display: block;
}

.submenu a:hover {
    background-color: var(--menu-hover-bg);
}

/* Right column */
.right-column {
    width: 150px;
    background-color: var(--right-col-bg);
    padding: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s;
}

.right-column table {
    width: 100%;
    border-collapse: collapse;
}

.right-column td {
    border: 1px solid var(--header-footer-bg);
    padding: 8px;
    background-color: var(--right-col-cell-bg);
    margin-bottom: 5px;
    transition: background-color 0.3s, border-color 0.3s;
}


#themeToggleBtn {
    margin-bottom: 15px;
    width: 120px;
}

/* Contributor table title class */
.contributor-title {
    font-size: 12px;
    color: yellow;
    font-weight: bold;
    text-align: center;
}

/* ========================= Result Cards ========================= */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: var(--right-col-cell-bg);
    border-radius: 10px;
    padding: 15px;
    flex: 1 1 300px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #EEE; /* Brighter font color */
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.card h3 {
    margin-top: 0;
    color: #FFD700; /* Optional: make heading a golden color for contrast */
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.full-width-card {
    width: 100%;           /* span full content width */
    background-color: var(--right-col-cell-bg); /* matches cards */
    color: var(--sidebar-text);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;      /* spacing from above cards */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
