:root {
    --bg-color: #0f172a; /* Slate 900 */
    --card-bg: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --primary-color: #10b981; /* Security Green */
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.2);
    
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.05), transparent 25%);
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header-icon {
    width: 64px;
    height: 64px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn.sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary.outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-primary.outline:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Dropzone */
.uploader-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--card-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.uploader-section:hover, .uploader-section.dragover {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

.upload-prompt {
    text-align: center;
    color: var(--text-secondary);
}

.upload-prompt svg {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.upload-prompt h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
}

.status-text {
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Results Container */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Image Card */
.image-card {
    padding: 1.5rem;
}

.card-layout {
    display: flex;
    gap: 2rem;
}

.image-preview {
    flex: 0 0 300px;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-meta-pill {
    position: absolute;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.file-name {
    top: 0.5rem;
    left: 0.5rem;
    max-width: calc(100% - 1rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    bottom: 0.5rem;
    right: 0.5rem;
}

/* Metadata Panel */
.metadata-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge[data-status="analyzing"] { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge[data-status="found"] { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge[data-status="clean"] { background: rgba(16, 185, 129, 0.1); color: var(--success-color); border: 1px solid rgba(16, 185, 129, 0.2); }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.meta-group {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--card-border);
}

.meta-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-title svg {
    color: var(--danger-color); /* Highlight sensitive data */
}

/* Sub-items */
.coords {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.map-link {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.875rem;
}

.map-link:hover {
    text-decoration: underline;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.meta-key {
    color: var(--text-secondary);
}

.meta-value {
    font-family: var(--font-mono);
    font-weight: 500;
}

/* Raw EXIF */
.raw-exif-toggle {
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
}

.toggle-raw-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.toggle-raw-btn:hover {
    color: var(--text-primary);
}

.toggle-raw-btn .chevron {
    transition: transform 0.2s ease;
}

.toggle-raw-btn.open .chevron {
    transform: rotate(180deg);
}

.raw-exif-data {
    background: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--card-border);
    max-height: 200px;
    overflow-y: auto;
}

.raw-json {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--success-color);
    white-space: pre-wrap;
    word-break: break-all;
}

/* Actions */
.card-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .card-layout {
        flex-direction: column;
    }
    .image-preview {
        flex: 0 0 auto;
        width: 100%;
    }
}
