/* Security Threat Detection System Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e2a4a;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
}

.logo img {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Header controls */
.header-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.settings-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* Model status indicator in header */
.model-status {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 8px 15px;
    margin-top: 10px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.model-status .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.model-status .status-dot.ready {
    background: #28a745;
}

.model-status .status-dot.error {
    background: #dc3545;
}

.controls {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8f0fe;
    transform: scale(1.02);
}

input[type="file"] {
    display: none;
}

/* Overlay that captures all events for drag-and-drop */
.upload-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #1e2a4a;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #212529;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Enhanced control group layout */
.enhanced-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.control-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* Ensure reset button is always visible */
#resetBtn {
    margin-left: auto;
}

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.image-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.image-card.new-result {
    animation: slideInFromBottom 0.5s ease-out;
}

/* Image card overlay badges */
.device-indicator,
.time-indicator {
    position: absolute;
    top: 10px;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.3);
}

.device-indicator {
    right: 10px;
    background: #e57324;
}

.device-indicator.dd-gemma {
    background: #bfc8ff;
}

.time-indicator {
    left: 10px;
    background: #3498db;
}

.image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-info {
    padding: 15px;
}

.image-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.threat-details {
    margin-bottom: 10px;
}

.threat-status {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 0px;
    border-radius: 6px;
    display: inline-block;
}

.description {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    overflow-y: auto;
}

.modal-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
}

.modal img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    display: block;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Modal image size classes */
.modal img.size-small {
    max-width: 50vw !important;
    max-height: 45vh !important;
    min-width: 40vw;
    min-height: 30vh;
}

.modal img.size-auto {
    max-width: 90vw !important;
    max-height: 85vh !important;
    min-width: 40vw;
    min-height: 30vh;
}

.modal img.size-large {
    max-width: 90vw !important;
    max-height: 85vh !important;
    min-width: 80vw;
    min-height: 70vh;
}

.modal img.size-fullscreen {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Modal overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.4) 40%,
        rgba(0,0,0,0.2) 70%,
        rgba(0,0,0,0.8) 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.modal-overlay * {
    pointer-events: auto;
}

.modal-image-container:hover .modal-overlay {
    opacity: 1;
}

.modal-overlay-top {
    text-align: left;
}

.modal-overlay-bottom {
    text-align: left;
    margin-top: auto;
}

.modal-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.modal-threat-info {
    background: rgba(0,0,0,0.7);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modal-threat-status {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.modal-threat-details {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-description {
    background: rgba(0,0,0,0.7);
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 15px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 100%;
    position: relative;
    z-index: 5;
}

.modal-description-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #ffd700;
}

.modal-description-text {
    font-size: 16px;
    line-height: 1.7;
    color: #f0f0f0;
    word-break: break-word;
    position: relative;
    z-index: 10;
}

/* Threat level styling for modal */
.threat-detected-yes { color: #ff6b6b; }
.threat-detected-no { color: #51cf66; }
.threat-detected-unknown { color: #868e96; }

/* Resize controls */
.modal-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1001;
    display: flex;
    gap: 10px;
}

.resize-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.resize-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.resize-btn.active {
    background: rgba(102, 126, 234, 0.8);
    border-color: rgba(102, 126, 234, 1);
}

/* Close button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

.close:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    opacity: 0.8;
}

/* Progress bars */
.progress-bar {
    background: #ecf0f1;
    border-radius: 10px;
    height: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1e2a4a;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Messages */
.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Processing indicator */
.processing-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    min-width: 260px;
}

.processing-indicator.show {
    display: block;
    animation: slideInFromRight 0.3s ease-out;
}

.processing-indicator-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.processing-progress-bar {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.processing-progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Scrollable content for long text in modals */
.scrollable-content {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    line-height: 1.6;
    position: relative;
    z-index: 10;
    scrollbar-width: auto;
    scrollbar-color: rgba(255,255,255,0.4) rgba(255,255,255,0.1);
}

.scrollable-content.raw-response {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', Monaco, 'Lucida Console', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    border: 1px solid rgba(255,255,255,0.2);
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.scrollable-content::-webkit-scrollbar {
    width: 12px;
    position: relative;
    z-index: 20;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    margin: 2px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.1);
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.6);
}

.scrollable-content::-webkit-scrollbar-thumb:active {
    background: rgba(255,255,255,0.8);
}

.modal-overlay .scrollable-content {
    pointer-events: auto;
    position: relative;
    z-index: 15;
}

/* Settings Modal */
.settings-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin: 5vh auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.settings-header {
    background: #1e2a4a;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.settings-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.settings-header .close {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.settings-header .close:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.settings-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

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

.tab-content {
    display: none;
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.settings-section {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3,
.settings-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.current-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.status-item {
    margin-bottom: 4px;
    font-size: 14px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-item strong {
    color: #333;
    margin-right: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    resize: none;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-control[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-control.field-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.field-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.required-mark {
    color: #dc3545;
    margin-left: 2px;
}


.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.validation-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.validation-result.success {
    background: #d1edff;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: block;
}

.validation-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.validation-result.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: block;
}

.settings-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.settings-message {
    margin-bottom: 15px;
    min-height: 20px;
}

.settings-message.success {
    color: #28a745;
    font-weight: 500;
}

.settings-message.error {
    color: #dc3545;
    font-weight: 500;
}

.settings-message.info {
    color: #17a2b8;
    font-weight: 500;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Custom scrollbar for settings modal */
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Prompt Label + Button (next to model selector) */
.prompt-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.prompt-label #currentPromptLabel {
    font-weight: 600;
}

/* Prompt Tabs (inside modal) */
.prompt-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.prompt-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.prompt-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.prompt-tab.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.prompt-tab-content {
    display: none;
}

.prompt-tab-content.active {
    display: block;
}

.max-tokens-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Prompt Edit Modal */
.prompt-edit-modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin: 5vh auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Prompt Loading Overlay */
.prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.prompt-overlay-content {
    background: white;
    border-radius: 12px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

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

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Touch device support */
@media (hover: none) and (pointer: coarse) {
    .modal-overlay {
        opacity: 0.8;
    }
}

/* Large screens */
@media (min-width: 1920px) {
    .modal img {
        max-width: 80vw;
        max-height: 80vh;
    }
}

@media (max-width: 1366px) {
    .modal img {
        max-width: 85vw;
        max-height: 80vh;
    }
}

/* Tablet breakpoint */
@media (max-width: 768px) {
    /* Header */
    .header-controls {
        position: relative;
        top: 0;
        right: 0;
        text-align: center;
        margin-top: 15px;
    }

    .header-title-section {
        flex-direction: column;
        gap: 15px;
    }

    .logo img {
        height: 50px;
    }

    .header h1 {
        font-size: 2rem;
    }

    /* Controls */
    .enhanced-controls {
        flex-direction: column;
        align-items: stretch;
    }

    /* Image card badges */
    .device-indicator,
    .time-indicator {
        font-size: 9px;
        padding: 2px 6px;
    }

    .threat-status {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Modal */
    .modal img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }

    .modal-overlay {
        padding: 15px;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-threat-status {
        font-size: 16px;
    }

    .modal-threat-details {
        font-size: 14px;
    }

    .modal-description-title {
        font-size: 16px;
    }

    .modal-description-text {
        font-size: 14px;
    }

    .modal-controls {
        top: 10px;
        left: 10px;
    }

    .resize-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Scrollable content */
    .scrollable-content {
        max-height: 150px;
        font-size: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: auto;
    }

    .scrollable-content::-webkit-scrollbar {
        width: 10px;
    }

    .scrollable-content.raw-response {
        max-height: 200px;
        font-size: 12px;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }

    /* Settings */
    .settings-modal-content {
        width: 95%;
        margin: 2vh auto;
        max-height: 95vh;
    }

    .settings-header {
        padding: 15px 20px;
    }

    .settings-header h3 {
        font-size: 1.3rem;
    }

    .tab-button {
        padding: 12px 10px;
        font-size: 13px;
    }

    .settings-section {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Mobile breakpoint */
@media (max-width: 480px) {
    /* Image card badges */
    .device-indicator,
    .time-indicator {
        font-size: 8px;
        padding: 2px 5px;
    }

    .threat-status {
        font-size: 9px;
        padding: 2px 5px;
    }

    /* Modal */
    .modal img {
        max-width: 98vw;
        max-height: 60vh;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .modal-threat-info,
    .modal-description {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .modal-threat-status {
        font-size: 14px;
    }

    .modal-threat-details {
        font-size: 13px;
    }

    .modal-description-title {
        font-size: 15px;
    }

    .modal-description-text {
        font-size: 13px;
    }

    .modal-controls {
        flex-direction: column;
        gap: 5px;
    }

    /* Scrollable content */
    .scrollable-content {
        max-height: 120px;
        font-size: 13px;
        -webkit-overflow-scrolling: touch;
    }

    .scrollable-content::-webkit-scrollbar {
        width: 8px;
    }

    .scrollable-content.raw-response {
        max-height: 150px;
        font-size: 11px;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }

    /* Settings */
    .settings-modal-content {
        width: 98%;
        margin: 1vh auto;
        max-height: 98vh;
    }

    .settings-header {
        padding: 12px 15px;
    }

    .settings-header h3 {
        font-size: 1.2rem;
    }

    .tab-button {
        padding: 10px 8px;
        font-size: 12px;
    }

    .settings-section {
        padding: 15px;
    }

    .settings-section h3 {
        font-size: 1.1rem;
    }
}
