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

:root {
    --primary-color: #0052CC;
    --primary-hover: #0747A6;
    --secondary-color: #6B778C;
    --danger-color: #DE350B;
    --success-color: #00875A;
    --bg-color: #FAFBFC;
    --card-bg: #FFFFFF;
    --text-primary: #172B4D;
    --text-secondary: #6B778C;
    --border-color: #DFE1E6;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --radius: 8px;
    --radius-sm: 4px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), #00C7E6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.language-selector {
    position: absolute;
    top: 0;
    right: 0;
}

.language-selector select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    background-color: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.upload-area.dragover {
    background-color: #F4F5F7;
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.upload-content svg {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-content p {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-content .or {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.browse-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

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

.image-preview {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    display: block;
    margin: 0 auto 20px;
    border-radius: var(--radius-sm);
}

.image-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exif-section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: #F4F5F7;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #EBECF0;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #BF2600;
}

.exif-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-panel {
    display: none;
}

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

.exif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.exif-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.exif-item:hover {
    background-color: #F4F5F7;
}

.exif-label {
    font-weight: 500;
    color: var(--text-primary);
}

.exif-value {
    color: var(--text-secondary);
    text-align: right;
    word-break: break-word;
    max-width: 60%;
}

#mapContainer {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: var(--radius-sm);
}

#map {
    text-align: center;
}

#map a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
}

#map a:hover {
    text-decoration: underline;
}

.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
}

.edit-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.edit-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--text-primary);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 100px;
    }
    
    .exif-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .exif-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}