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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    overflow: hidden;
    height: 100vh;
}

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

.tracker-main {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: calc(100vh - 84px);
    min-height: 0;
}

.sidebar {
    background: #11182e;
    border-right: 1px solid rgba(102, 126, 234, 0.35);
    overflow: auto;
    padding: 14px;
}

.panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #cdd6ff;
}

.marker-toolbar {
    display: grid;
    gap: 10px;
}

.primary-btn {
    appearance: none;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.primary-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.field {
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
    color: #c7c7d6;
}

.field select,
.field input[type="search"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #eee;
    padding: 10px 10px;
    border-radius: 10px;
    outline: none;
}

.hint {
    font-size: 0.85rem;
    color: #aab0c7;
}

.orbs-header {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.orbs-list {
    display: grid;
    gap: 8px;
}

.orb-item {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.orb-item.found {
    border-color: rgba(76, 175, 80, 0.45);
    background: rgba(76, 175, 80, 0.08);
}

.orb-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.orb-title {
    font-weight: 700;
    color: #e6e8ff;
    font-size: 0.98rem;
}

.orb-meta {
    font-size: 0.85rem;
    color: #aab0c7;
    line-height: 1.35;
}

.orb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ddd;
}

.canvas {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tracker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tracker-header h1 {
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    flex: 1;
    text-align: center;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #667eea;
}

.zoom-btn:hover {
    background: white;
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

#reset-zoom {
    width: auto;
    padding: 0 15px;
    font-size: 0.9rem;
}

#zoom-level {
    color: white;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.image-panel {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #0f0f1e;
    cursor: grab;
}

.image-panel:active {
    cursor: grabbing;
}

.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-out;
    position: relative;
}

.marker-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.marker {
    position: absolute;
    transform: translate(-50%, -100%);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35));
}

.marker.is-dragging {
    cursor: grabbing;
}

.marker.star {
    font-size: 28px;
}

.marker.circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    background: currentColor;
}

.marker.pin {
    font-size: 26px;
}

.marker-menu {
    position: fixed;
    z-index: 50;
    background: rgba(15, 15, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px;
    width: 240px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

.marker-menu h3 {
    margin-bottom: 10px;
    color: #e6e8ff;
    font-size: 1rem;
}

.marker-menu .row {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.marker-menu .row label {
    font-size: 0.85rem;
    color: #c7c7d6;
}

.marker-menu select,
.marker-menu input[type="color"] {
    width: 100%;
}

.danger-btn {
    appearance: none;
    border: 1px solid rgba(245, 87, 108, 0.65);
    background: rgba(245, 87, 108, 0.12);
    color: #ffd6dc;
    padding: 9px 10px;
    border-radius: 10px;
    width: 100%;
    cursor: pointer;
}

#trackerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #667eea;
    font-size: 2rem;
    pointer-events: none;
}

.placeholder-subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #999;
}

.info-panel {
    background: #16213e;
    padding: 20px;
    border-top: 2px solid #667eea;
}

.info-panel p {
    margin-bottom: 10px;
    color: #ddd;
}

.info-panel strong {
    color: #667eea;
}

.info-panel ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.info-panel li {
    margin: 5px 0;
    color: #bbb;
}

.note {
    color: #f5576c;
    font-style: italic;
}

@media (max-width: 768px) {
    .tracker-main {
        grid-template-columns: 1fr;
        height: calc(100vh - 110px);
    }

    .sidebar {
        order: 2;
        height: 42vh;
    }

    .canvas {
        order: 1;
    }

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

    .tracker-header h1 {
        font-size: 1.5rem;
    }

    .zoom-controls {
        width: 100%;
        justify-content: center;
    }

    .info-panel {
        font-size: 0.9rem;
        padding: 15px;
    }
}
