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

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111111;
    border-bottom: 1px solid #333;
    padding: 10px 20px;
    height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 3px;
    color: #fff;
}

.made-by {
    font-size: 10px;
    color: #666;
    letter-spacing: 1px;
}

.made-by a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.made-by a:hover {
    color: #0f0;
}

.header-center {
    display: flex;
    gap: 10px;
}

.upload-btn,
.header-btn {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.upload-btn:hover,
.header-btn:hover {
    background: #2a2a2a;
    border-color: #666;
}

.upload-btn input {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
}

.help-btn:hover {
    background: #2a2a2a;
    border-color: #666;
    color: #0f0;
}

.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    position: relative;
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, #111 19px, #111 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, #111 19px, #111 20px);
}

#mainCanvas {
    max-width: 90%;
    max-height: 90%;
    border: 1px solid #333;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    will-change: transform;
    transform-origin: center center;
    image-rendering: pixelated;
}

#annotationCanvas {
    position: absolute;
    border: 1px solid transparent;
    pointer-events: auto;
    cursor: crosshair;
    transition: opacity 0.2s ease;
    will-change: transform;
    transform-origin: center center;
    image-rendering: pixelated;
}

#magnifierCanvas {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    display: none;
    z-index: 1000;
    background: #000;
}

.pixel-info {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #444;
    color: #0f0;
    padding: 8px;
    font-size: 10px;
    font-family: monospace;
    pointer-events: none;
    display: none;
    z-index: 1001;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-bar {
    background: #111;
    border-top: 1px solid #333;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.status-left {
    display: flex;
    gap: 20px;
}

.status-left span {
    color: #0f0;
}

.shortcuts {
    display: flex;
    gap: 20px;
}

.shortcut {
    color: #666;
    font-size: 9px;
}

.shortcut kbd {
    display: inline-block;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 2px 6px;
    margin-right: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 9px;
}

.control-panel {
    width: 320px;
    background: #111;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: #0a0a0a;
    border-bottom: 1px solid #333;
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: #666;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: #888;
    background: #1a1a1a;
}

.tab-btn.active {
    color: #fff;
    background: #1a1a1a;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
}

.tab-panels {
    flex: 1;
    overflow-y: auto;
    background: #0a0a0a;
}

.tab-panel {
    display: none;
    padding: 20px;
}

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

.panel-section {
    margin-bottom: 25px;
}

.panel-section h3 {
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #222;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.control-row label {
    flex: 0 0 80px;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-row input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: #333;
    outline: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 0;
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 0;
}

.control-row .value {
    flex: 0 0 40px;
    text-align: right;
    font-size: 10px;
    color: #0f0;
    font-family: monospace;
}

.control-row input[type="text"] {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 5px 8px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.control-row input[type="color"] {
    flex: 1;
    height: 30px;
    background: #1a1a1a;
    border: 1px solid #333;
    cursor: pointer;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.filter-btn,
.tool-btn {
    background: #1a1a1a;
    color: #888;
    border: 1px solid #333;
    padding: 8px;
    cursor: pointer;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.filter-btn:hover,
.tool-btn:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #555;
}

.tool-btn.active,
.filter-btn.active {
    background: #333;
    color: #fff;
    border-color: #666;
}

.section-reset-btn {
    width: 100%;
    background: transparent;
    color: #555;
    border: 1px solid #333;
    padding: 6px;
    cursor: pointer;
    font-size: 9px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin-top: 10px;
}

.section-reset-btn:hover {
    color: #888;
    border-color: #555;
}

.panel-btn {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    padding: 10px;
    cursor: pointer;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s;
    margin-top: 10px;
}

.panel-btn:hover {
    background: #2a2a2a;
    border-color: #666;
}

.select-input {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    padding: 8px;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.select-input option {
    background: #1a1a1a;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #fff;
}

.checkbox-label:hover {
    color: #aaa;
}

.exif-content {
    font-size: 10px;
    font-family: monospace;
    color: #888;
    max-height: 400px;
    overflow-y: auto;
}

.exif-table {
    width: 100%;
}

.exif-table tr {
    border-bottom: 1px solid #222;
}

.exif-table td {
    padding: 6px 0;
}

.exif-key {
    color: #666;
    text-transform: uppercase;
    width: 40%;
}

.exif-value {
    color: #0f0;
    word-break: break-all;
}

.no-data {
    color: #444;
    text-align: center;
    padding: 20px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

.meta-section {
    margin-bottom: 20px;
}

.meta-section h4 {
    font-size: 10px;
    font-weight: normal;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #222;
}

.gps-info {
    padding: 10px;
    background: #0a0a0a;
    border: 1px solid #222;
}

.gps-info a,
.map-link {
    display: inline-block;
    margin-top: 10px;
    color: #0f0;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1px;
}

.gps-info a:hover,
.map-link:hover {
    text-decoration: underline;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .control-panel {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid #333;
    }
    
    .tab-nav {
        overflow-x: auto;
    }
}