:root {
    --primary-color: #007bff;
    --background-color: #f8f9fa;
    --text-color: #333;
    --container-bg: #ffffff;
    --border-color: #dee2e6;
    --danger-color: #dc3545;
    --safe-color: #28a745;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    /* Add padding to the bottom to avoid overlap with the fixed ad banner */
    padding: 20px 20px 70px 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
}

.lite-badge {
    font-size: 0.5em;
    font-weight: bold;
    color: var(--safe-color);
    background-color: #e9f7ef;
    padding: 3px 8px;
    border-radius: 10px;
    vertical-align: middle;
}

header p {
    margin: 5px 0 0;
    color: #6c757d;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    position: relative;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e9f7ff;
}

#upload-label p {
    margin: 5px 0;
    font-size: 1.2em;
    color: #6c757d;
}

#preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

#status-area {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    color: #495057;
}

#results-area {
    margin-top: 20px;
}

#results-area h2 {
    text-align: center;
    margin-top: 0;
}

#results-content {
    margin-top: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.result-item .label {
    font-weight: bold;
    text-transform: capitalize;
}

.result-item .score {
    font-family: monospace;
    font-size: 1.1em;
}

.result-item .bar-container {
    flex-grow: 1;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    margin: 0 15px;
    overflow: hidden;
}

.result-item .bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.result-item.high-risk .bar {
    background-color: var(--danger-color);
}

.result-item.low-risk .bar {
    background-color: var(--safe-color);
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.85em;
    color: #6c757d;
    text-align: center;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: #6c757d;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Ad Banner Styles */
#ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: #343a40;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content ul {
    list-style-type: none;
    padding: 0;
}

.modal-content li {
    margin-bottom: 15px;
}

/* Tab UI Styles */
.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.tab-button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 1.1em;
    color: #6c757d;
    margin-bottom: -1px; /* Overlap the container's border */
    transition: all 0.2s ease-in-out;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-panel {
    display: none; /* Hide by default */
}

.tab-panel.active {
    display: block; /* Show active panel */
}
