/* ===== Global Reset & Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 20px;
    background: black;
    background: #0a0a0a;
    color: #EEE;
}

body.has-header {
    padding-top: 88px;
}

/* ===== Global Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #EEE;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.header-brand img {
    width: 28px;
    height: 28px;
    margin:0;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #EEE;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFF;
}

.header-button.primary {
    background: #DADADA;
    color: #0a0a0a;
    border-color: transparent;
}

.header-button.primary:hover {
    background: #FFFFFF;
    color: #0a0a0a;
}

@media (max-width: 640px) {
    .site-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Typography ===== */
h1 {
    color: #EEE;
    margin-bottom: 20px;
}

h2 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 20px;
}

h3 {
    color: #CCC;
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 16px;
}

p,
li {
    color: #AAA;
    line-height: 1.6;
}

li {
    margin-bottom: 10px;
}

strong {
    color: #DDD;
}

/* ===== Layout Containers ===== */
.container {
    background: black;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
}

/* Page-specific container widths */
.container.reset-password {
    max-width: 420px;
}

.container.delete-account {
    max-width: 600px;
    width: 100%;
    text-align: left;
}

body.modtest-mode {
    padding: 20px;
    background: #0a0a0a;
}

.modtest-mode .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: none;
    box-shadow: none;
    text-align: left;
}

/* ===== Loading Spinner ===== */
.spinner {
    border: 3px solid #333;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== Buttons ===== */
.button {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: black;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.button:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.button:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.verify-email .button,
.reset-password .button {
    margin-top: 20px;
}

.reset-password .button {
    margin-top: 12px;
}

.email-link {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.3s;
}

.email-link:hover {
    background: #5568d3;
}

/* ===== Status Indicators ===== */
.success {
    color: #27ae60;
    font-size: 60px;
}

.error {
    color: #e74c3c;
    font-size: 60px;
}

/* ===== Form Elements ===== */
label {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #0b0b0b;
    color: #fff;
    box-sizing: border-box;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    resize: vertical;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #EEE;
    font-size: 14px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
}

.form-row {
    margin-top: 12px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.error-text {
    color: #ff6b6b;
    margin-top: 8px;
    font-size: 14px;
}

/* ===== Checkboxes ===== */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

/* ===== Delete Account Page Styles ===== */
.delete-account h1 {
    text-align: center;
    margin-bottom: 10px;
}

.delete-account p {
    margin-bottom: 15px;
}

.delete-account ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.warning {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.warning p {
    color: #e74c3c;
    margin: 0;
}

.contact-box {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.contact-box h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.email-text {
    color: #667eea;
    font-weight: 600;
    font-size: 18px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

/* ===== Modtest Page Styles ===== */
header {
    text-align: center;
    margin-bottom: 40px;
}

header img {
    width: 80px;
    margin-bottom: 20px;
}

.subtitle {
    color: #AAA;
    font-size: 14px;
}

.input-section {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.input-mode {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-button {
    flex: 1;
    padding: 10px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #AAA;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.input-mode-content {
    display: none;
}

.input-mode-content.active {
    display: block;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.note {
    background: #2a2a2a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #AAA;
    border-left: 3px solid #667eea;
}

.endpoint-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    margin-left: 6px;
    text-transform: uppercase;
}

.badge-aim {
    background: #2a2a5a;
    color: #9b9bff;
    border: 1px solid #4a4a8a;
}

.badge-live {
    background: #2a4a2a;
    color: #80ff80;
    border: 1px solid #4a7a4a;
}

/* ===== Results Section ===== */
.results-section {
    margin-top: 30px;
}

#results {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    gap: 15px;
}

.result-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: min-content;
    min-width: 220px;
}

.result-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-image {
    height: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 0;
    background: #0a0a0a;
}

.result-info {
    padding: 10px;
}

.result-url {
    color: #AAA;
    font-size: 10px;
    word-break: break-all;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.result-data {
    padding: 10px;
    flex: 1;
}

.error-message {
    color: #f87171;
    font-size: 14px;
    margin-top: 10px;
}

/* ===== Score Display ===== */
.score-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.score-item {
    background: #0a0a0a;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #333;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
}

.score-label {
    font-size: 11px;
    color: #FFF;
    margin-bottom: 0;
    font-weight: 500;
}

.score-value {
    font-size: 11px;
    font-weight: 600;
}

.score-item.chip-high {
    background: #4a1e1e;
    border-color: #f87171;
}

.score-item.chip-medium {
    background: #4a3a1e;
    border-color: #fbbf24;
}

.score-item.chip-low {
    background: #1e4a2e;
    border-color: #4ade80;
}

/* ===== OCR Section ===== */
.ocr-section {
    background: #0a0a0a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-top: 12px;
}

.ocr-label {
    font-size: 12px;
    color: #AAA;
    margin-bottom: 8px;
}

.ocr-text {
    color: #EEE;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== Status Badges ===== */
.status-approved {
    background: #1e4620;
    color: #4ade80;
}

.status-declined {
    background: #4a1e1e;
    color: #f87171;
}

.status-pending {
    background: #3a3a3a;
    color: #fbbf24;
}

.status-flagged {
    background: #4a1e2a;
    color: #ff6b9d;
}

.status-uploading {
    background: #3a3a5a;
    color: #9b9bff;
}

.approval-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.badge-approved {
    background: #1e4620;
    color: #4ade80;
    border: 1px solid #4ade80;
}

.badge-flagged {
    background: #4a1e1e;
    color: #f87171;
    border: 1px solid #f87171;
}

/* ===== Live Status Display ===== */
.live-status {
    margin-top: 8px;
    padding: 8px;
    background: #0a0a0a;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 11px;
}

.live-status-label {
    color: #AAA;
    font-size: 10px;
    margin-bottom: 4px;
}

.live-status-value {
    font-weight: 600;
    font-size: 12px;
}

/* ===== Upload Progress ===== */
.upload-progress {
    margin-top: 8px;
    padding: 8px;
    background: #0a0a0a;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 11px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
}

/* ===== Violations ===== */
.violation-list {
    margin-top: 8px;
    padding: 8px;
    background: #4a1e1e;
    border-radius: 6px;
    border: 1px solid #f87171;
}

.violation-item {
    font-size: 10px;
    color: #f87171;
    margin: 4px 0;
}

/* ===== Utility Classes ===== */
.small {
    color: #888;
    font-size: 13px;
    margin-top: 8px;
}
