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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #212529;
    line-height: 1.6;
}

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

header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #212529;
}

.subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #495057;
}

.feature svg {
    width: 20px;
    height: 20px;
    color: #28a745;
}

.main-card {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.upload-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-zone:hover {
    border-color: #495057;
    background: #e9ecef;
}

.upload-zone.dragover {
    border-color: #495057;
    background: #dee2e6;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #6c757d;
}

.upload-text {
    font-size: 1.2rem;
    color: #212529;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #6c757d;
    font-size: 0.9rem;
}

.content-area {
    display: none;
    margin-top: 30px;
}

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

/* Main Grid Layout */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
    margin-bottom: 30px;
}

.editor-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.editor-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.preview-section, .metadata-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.editor-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    margin: -25px -25px 20px -25px;
}

.section-title svg {
    color: #6366f1;
    flex-shrink: 0;
}

.image-preview {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
    background: white;
    padding: 10px;
    border: 1px solid #dee2e6;
}

.gps-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gps-warning-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #856404;
}

.gps-warning-content svg {
    flex-shrink: 0;
}

.gps-warning-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.preview-action-btn {
    flex: 1;
    background: #6366f1;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.preview-action-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.preview-action-btn-secondary {
    background: #ffffff;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.preview-action-btn-secondary:hover {
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.preview-action-btn svg {
    flex-shrink: 0;
}

.btn-remove-gps {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-remove-gps:hover {
    background: #c82333;
}

.gps-map-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.gps-map {
    width: 100%;
    height: 250px;
    background: #e9ecef;
}

.gps-coordinates {
    padding: 12px 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

/* Quick Actions - inherits editor-section styles */

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
    text-align: left;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.action-btn.remove-gps {
    border-color: #fecaca;
    color: #dc2626;
}

.action-btn.remove-gps:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.action-btn.keep-camera {
    border-color: #bfdbfe;
    color: #2563eb;
}

.action-btn.keep-camera:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.action-btn.social-safe {
    border-color: #d9f99d;
    color: #65a30d;
}

.action-btn.social-safe:hover {
    background: #f7fee7;
    border-color: #65a30d;
}

.action-btn.remove-all {
    border-color: #fca5a5;
    color: #991b1b;
}

.action-btn.remove-all:hover {
    background: #fef2f2;
    border-color: #991b1b;
}

.action-btn-description {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 2px;
}

#visualMetadataContainer {
    margin-top: 0;
}

.visual-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.card-header svg {
    color: #6366f1;
}

.card-title {
    font-size: 1rem;
}

.card-content {
    padding: 15px;
}

/* Camera Settings Card */
.camera-model {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
    text-align: center;
}

.camera-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.setting-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.setting-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.setting-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

/* Date/Time Card */
.datetime-info {
    text-align: center;
}

.datetime-main {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.datetime-secondary {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Image Properties Card */
.props-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.prop-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.prop-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.prop-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

/* Color Palette Card */
.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.color-box {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-hex {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-weight: 600;
}

/* Copyright Card */
.copyright-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.copyright-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #6f42c1;
}

.copyright-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.copyright-value {
    font-size: 0.9rem;
    color: #212529;
    font-weight: 600;
    text-align: right;
}

.metadata-list {
    max-height: 1000px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbar for webkit browsers (Chrome, Safari, Edge) */
.metadata-list::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
.metadata-list {
    scrollbar-width: none;
}

.metadata-category {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: white;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    border-left: 4px solid;
}

.category-header:hover {
    background: #f8f9fa;
}

.category-header.camera {
    border-left-color: #007bff;
}

.category-header.location {
    border-left-color: #dc3545;
}

.category-header.datetime {
    border-left-color: #28a745;
}

.category-header.software {
    border-left-color: #ffc107;
}

.category-header.copyright {
    border-left-color: #6f42c1;
}

.category-header.other {
    border-left-color: #6c757d;
}

.category-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.category-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.category-header.camera .category-icon {
    color: #007bff;
}

.category-header.location .category-icon {
    color: #dc3545;
}

.category-header.datetime .category-icon {
    color: #28a745;
}

.category-header.software .category-icon {
    color: #ffc107;
}

.category-header.copyright .category-icon {
    color: #6f42c1;
}

.category-header.other .category-icon {
    color: #6c757d;
}

.category-name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
}

.category-count {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 8px;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-delete-btn:hover {
    background: #dc3545;
    color: white;
}

.category-delete-btn svg {
    width: 16px;
    height: 16px;
}

.category-toggle {
    color: #6c757d;
    transition: transform 0.2s;
}

.category-toggle.collapsed {
    transform: rotate(-90deg);
}

.category-content {
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
    max-height: 2000px;
    overflow: visible;
    transition: max-height 0.3s ease;
}

.category-content.collapsed {
    max-height: 0;
    border-top: none;
    overflow: hidden;
}

.category-items {
    padding: 10px;
}

.metadata-item {
    background: white;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metadata-content {
    flex: 1;
}

.metadata-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.metadata-value {
    color: #212529;
    word-break: break-word;
    font-size: 0.95rem;
}

.metadata-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.metadata-input:focus {
    outline: none;
    border-color: #495057;
}

.metadata-actions {
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
    color: #6c757d;
}

.icon-btn:hover {
    background: #e9ecef;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.icon-btn.edit:hover {
    color: #007bff;
}

.icon-btn.delete:hover {
    color: #dc3545;
}

.icon-btn.save:hover {
    color: #28a745;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-width: 150px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.section {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #212529;
}

.section h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #212529;
}

.section p {
    color: #495057;
    margin-bottom: 15px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.step {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.step h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #212529;
}

.step p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
}

.faq-answer {
    color: #495057;
    line-height: 1.7;
}

.no-metadata {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Privacy Score Styles */
.privacy-score-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.score-gauge {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 12;
}

.score-fill {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.score-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.privacy-recommendations {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.privacy-recommendations h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.privacy-recommendations ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.privacy-recommendations li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: #495057;
    line-height: 1.5;
}

.privacy-recommendations li:before {
    content: "→";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #6c757d;
}

.privacy-recommendations li:last-child {
    margin-bottom: 0;
}

/* Privacy risk levels */
.score-value.excellent { color: #28a745; }
.score-fill.excellent { stroke: #28a745; }
.score-label.excellent { color: #28a745; }
.privacy-recommendations.excellent { 
    background: #f0fdf4;
    border-left-color: #28a745;
}

.score-value.good { color: #20c997; }
.score-fill.good { stroke: #20c997; }
.score-label.good { color: #20c997; }
.privacy-recommendations.good { 
    background: #f0fdfa;
    border-left-color: #20c997;
}

.score-value.moderate { color: #ffc107; }
.score-fill.moderate { stroke: #ffc107; }
.score-label.moderate { color: #ffc107; }
.privacy-recommendations.moderate { 
    background: #fffbeb;
    border-left-color: #ffc107;
}

.score-value.concerning { color: #fd7e14; }
.score-fill.concerning { stroke: #fd7e14; }
.score-label.concerning { color: #fd7e14; }
.privacy-recommendations.concerning { 
    background: #fff7ed;
    border-left-color: #fd7e14;
}

.score-value.high-risk { color: #dc3545; }
.score-fill.high-risk { stroke: #dc3545; }
.score-label.high-risk { color: #dc3545; }
.privacy-recommendations.high-risk { 
    background: #fef2f2;
    border-left-color: #dc3545;
}

/* Sensitive field highlighting */
.metadata-item.sensitive .metadata-label {
    color: #dc3545;
    font-weight: 700;
}

.metadata-item.sensitive .metadata-value {
    color: #dc3545;
    background: #fff5f5;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

.metadata-item.moderate-risk .metadata-label {
    color: #fd7e14;
    font-weight: 700;
}

.metadata-item.moderate-risk .metadata-value {
    color: #fd7e14;
    background: #fff8f0;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #fd7e14;
}

footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 30px 0;
    text-align: center;
    color: #6c757d;
    margin-top: 60px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .editor-right {
        order: -1;
    }

    .main-card, .section {
        padding: 25px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .steps {
        grid-template-columns: 1fr;
    }
    
    .gps-warning {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-remove-gps {
        width: 100%;
        justify-content: center;
    }
    
    .camera-settings-grid,
    .props-grid {
        grid-template-columns: 1fr;
    }
    
    .color-palette {
        justify-content: center;
    }
}
