* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: #0b0c10; color: #c5c6c7; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* Thin Header */
.thin-header {
    background: #1f2833;
    padding: 8px 20px;
    border-bottom: 1px solid #45a29e;
    text-align: center;
}
.thin-header h1 {
    font-size: 1.2rem;
    color: #66fcf1;
    letter-spacing: 2px;
}

.app-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Thin Menu Dashboard */
.thin-menu {
    display: flex;
    background: #1f2833;
    padding: 5px 10px;
    gap: 10px;
    border-bottom: 1px solid #2a3644;
}
.nav-btn {
    background: transparent;
    color: #c5c6c7;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: 0.2s;
}
.nav-btn:hover { background: #2a3644; }
.nav-btn.active { background: #45a29e; color: #0b0c10; font-weight: bold; }

.content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-section { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.tool-section.active { display: flex; }

/* Thin Map Tabs */
.thin-tabs {
    display: flex;
    background: #0b0c10;
    padding: 5px 10px;
    gap: 5px;
    border-bottom: 1px solid #1f2833;
}
.tab {
    background: #1f2833;
    color: #c5c6c7;
    border: 1px solid #2a3644;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: 0.2s;
}
.tab:hover { background: #2a3644; }
.tab.active { background: #45a29e; color: #0b0c10; border-color: #45a29e; font-weight: bold; }

.map-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.map-viewer.hidden { display: none !important; }

/* Toolbar for Grid */
.map-toolbar {
    padding: 5px 10px;
    background: #111216;
    border-bottom: 1px solid #1f2833;
    display: flex;
    justify-content: flex-end;
}
.btn-sm {
    background: #1f2833; color: #c5c6c7; border: 1px solid #45a29e; padding: 4px 12px; font-size: 0.8rem; cursor: pointer; border-radius: 3px; transition: 0.2s;
}
.btn-sm:hover { background: #45a29e; color: #0b0c10; }
.btn-secondary { background: transparent; border-color: #c5c6c7; }
.btn-secondary:hover { background: #2a3644; color: #fff; }

.map-container {
    flex: 1;
    position: relative;
    background: #050508;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: crosshair;
}

.map-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.grid-overlay {
    position: absolute;
    pointer-events: none;
    display: grid;
    z-index: 10;
}
.grid-overlay.hidden { display: none !important; }
.grid-cell { border: 1px solid rgba(0, 0, 0, 0.6); }

/* Marker Style */
.marker {
    position: absolute;
    width: 10px;
    height: 12px;
    background: #e94560;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -100%) rotate(-45deg);
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 0 5px #e94560;
    transition: 0.2s;
}
.marker:hover { transform: translate(-50%, -100%) rotate(-45deg) scale(1.3); }
.marker.high-score { background: #4caf50; box-shadow: 0 0 5px #4caf50; }

/* Modals */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal.hidden { display: none !important; }
.modal-content {
    background: #1f2833; padding: 20px; border-radius: 8px; border: 1px solid #45a29e; min-width: 280px; display: flex; flex-direction: column; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.modal-content input {
    background: #0b0c10; color: #fff; border: 1px solid #2a3644; padding: 10px; border-radius: 4px; outline: none; font-size: 0.9rem;
}
.modal-content input:focus { border-color: #45a29e; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
.modal-btns button {
    padding: 6px 15px; border: none; border-radius: 4px; cursor: pointer; background: #45a29e; color: #0b0c10; font-weight: bold; transition: 0.2s;
}
.modal-btns button:hover { filter: brightness(1.1); }
.modal-btns button.danger { background: #e94560; color: #fff; }
.modal-btns button.btn-secondary { background: #2a3644; color: #c5c6c7; font-weight: normal; }
.modal-btns button.btn-secondary:hover { background: #45a29e; color: #0b0c10; }

/* Converter Style */
.converter-container {
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}
.converter-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #1f2833;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a3644;
    margin-bottom: 20px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-group label {
    font-size: 0.9rem;
    color: #c5c6c7;
}
.input-group input {
    background: #0b0c10;
    color: #fff;
    border: 1px solid #2a3644;
    padding: 12px;
    border-radius: 4px;
    outline: none;
    font-size: 1rem;
    transition: 0.2s;
}
.input-group input:focus {
    border-color: #45a29e;
}
.converter-result {
    background: #111216;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #45a29e;
}
